This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| docker exec -it web "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import redis | |
| from flask import Flask | |
| app = Flask(__name__) | |
| cache = redis.Redis(host='redis', port=6379) | |
| def get_hit_count(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "extends": ["plugin:vue/recommended", "airbnb-base"], | |
| "parserOptions": { | |
| "parser": "babel-eslint" | |
| }, | |
| "settings": { | |
| "import/resolver": { | |
| "alias": { | |
| "extensions": [ | |
| ".js", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pathlib | |
| import os | |
| # define the path | |
| currentDirectory = pathlib.Path('.') | |
| # define the pattern | |
| currentPattern = "*.svg" | |
| for currentFile in currentDirectory.glob(currentPattern): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| soffice --headless --convert-to xlsx:"Calc MS Excel 2007 XML" --infilter="csv:44,34,UTF8" $@; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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]]}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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") |