Skip to content

Instantly share code, notes, and snippets.

View esron's full-sized avatar
🏠
Working from home

Esron Silva esron

🏠
Working from home
  • Red Hat
  • Petrolina - PE, Brasil.
  • X @oesron
View GitHub Profile
https://github.com/app-sre/qontract-reconcile.git 30af65af14a2dce962df923446afff24dd8f123e
https://github.com/app-sre/container-images.git c260deaf135fc0efaab365ea234a5b86b3ead404
invalid input
https://github.com/esron/laravel_docker.git a001dcf954889e149e0d22847d144ebe32690e30
https://github.com/esron/nest-hello-word.git not_valid_commit
-- Arquivo de inicialização do ESP
-- Configura wifi
wifi.setmode(wifi.STATION)
station_cfg={}
station_cfg.ssid="Rede WIFI"
station_cfg.pwd="qualasenhadowifi"
wifi.sta.config(station_cfg)
-- register event callbacks for WiFi events
ledPin = 1
gpio.mode(ledPin, gpio.OUTPUT)
gpio.write(ledPin, gpio.LOW)
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive", function(client,request)
local buf = ""
local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP")
if(method == nil)then
_, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP")
@esron
esron / index.html
Created February 28, 2021 19:05
Pagina pra testar os botões no ESP
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Esp 8266 Web Server</title>
<style>
html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}
.button { background-color: #4CAF50; border: none; color: white; padding: 16px 40px;
text-decoration: none; font-size: 30px; margin: 2px; cursor: pointer;}
.button2 {background-color: #555555;}
@esron
esron / MacrosRoll20Tormenta20.txt
Created February 5, 2021 23:35
Exemplos de Macros Roll20 Tormenta20
Exemplos de Macros Tormenta20 Roll20
fonte: https://www.multiversos.com.br/multigames-tutorial-roll20-segundo-episodio-te-ensina-a-usar-macros/
Macro de ataque:
&{template:t20-attack}{{character=NOME DO PERSONAGEM}}{{attackname=NOME DO ATAQUE}}{{attackroll=[[(1d20cs>MARGEM DE CRITICO)+MODIFICADOR]]}} {{damageroll=[[DANO+MODIFICADORES]]}} {{criticaldamageroll=[[(DANO*MULTIPLICADOR DE CRÍTICO)+MODIFICADORES]]}}{{typeofdamage=TIPO DE DANO}}{{description=DECRIÇÃO DESEJADA, PODENDO TER IMAGENS, GIFS OU OUTROS BOTÕES}}
Macro de teste simples:
&{template:t20}{{character=NOME DO PERSONAGEM}}{{rollname=NOME DA ROLAGEM}}{{theroll=[[DADO A SER ROLADO+MODIFICADOR DA ROLAGEM]]}}
@esron
esron / csv-to-xlsx.sh
Last active May 23, 2024 09:31
Converts Files in CSV to xlsx using LibreOffice and UTF-8 as enconde
#!/bin/bash
soffice --headless --convert-to xlsx:"Calc MS Excel 2007 XML" --infilter="csv:44,34,UTF8" $@;
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
@esron
esron / isPrime.py
Created November 24, 2019 15:21
Determ if a positive integer is prime
def isPrime(n):
if n <= 3:
return n > 1
if not n % 2 or not n % 3:
return False
i = 5
while(i * i <= n):
@esron
esron / covnertSVGtoPNG.py
Created August 25, 2019 00:39
Python Script to covnert all SVG files in the current directory to PNG
import pathlib
import os
# define the path
currentDirectory = pathlib.Path('.')
# define the pattern
currentPattern = "*.svg"
for currentFile in currentDirectory.glob(currentPattern):
@esron
esron / .eslintrc
Created April 16, 2019 12:26
eslintrc for sysvale_projects
{
"extends": ["plugin:vue/recommended", "airbnb-base"],
"parserOptions": {
"parser": "babel-eslint"
},
"settings": {
"import/resolver": {
"alias": {
"extensions": [
".js",