This file contains 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
#define echoPin 3 //Pino 13 recebe o pulso do echo | |
#define trigPin 2 //Pino 12 envia o pulso para gerar o echo | |
long disAnterior = 0; //Variavel utilizada para corrigir ruido do sensor de distancia. | |
//Ele armazena a distancia da medicao anterior, caso haja uma diferenca muito grande, ele desconsidera a medicao. | |
void setup() { | |
// Primeira function executada, logo apos entra em loop. | |
// Aqui se faz a as configuracoes necessarias | |
This file contains 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
# | |
# Launches configured Graylog 2.3.1 instance | |
# | |
# - Docker-compose 1.16 required | |
# - Please configure following according to your network: | |
# * gelf-address URL (for each container) | |
# * GRAYLOG_WEB_ENDPOINT_URI | |
# - After launch define GELF tcp and GELF udp inputs in graylog web ui | |
# - Containers send logging to the graylog itself | |
# - By default tuned to 30 days retention |
This file contains 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
<?php | |
// Context: I'm trying to argue that DI (and DIC) are great, and DIC libs suck. | |
// Happy to be proven wrong! | |
final class Router { | |
private $dependencies; | |
public function __construct (Dependencies $dependencies) { | |
$this->dependencies = $dependencies; | |
// You might say that this is Service Locator, but it's not. This router is toplevel, | |
// and toplevel must have access to dependencies. After that it can all just bubble nicely using proper DI. |
This file contains 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
vmap <C-c> "+yi | |
vmap <C-x> "+c | |
vmap <C-v> c<ESC>"+p | |
imap <C-v> <ESC>"+pa |
This file contains 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 | |
beep -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 250 -f 622.26 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 369 |
This file contains 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
/* Side notes for calling out things | |
-------------------------------------------------- */ | |
/* Base styles (regardless of theme) */ | |
.bs-callout { | |
margin: 20px 0; | |
padding: 15px 30px 15px 15px; | |
border-left: 5px solid #eee; |
This file contains 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 application(environ, start_response): | |
import sys | |
path = 'YOUR_WWW_ROOT_DIRECTORY' | |
if path not in sys.path: | |
sys.path.append(path) | |
from pyinfo import pyinfo | |
output = pyinfo() | |
start_response('200 OK', [('Content-type', 'text/html')]) | |
return [output] |
This file contains 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
<?php | |
use Psr\Log\LoggerInterface; | |
/** | |
* Assembles and dispatches the SOAP request body XML and returns the | |
* Response body XML from the vendor API. | |
*/ | |
class Request | |
{ |
OlderNewer