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
# some help and explanation https://www.thegeekstuff.com/2011/10/grep-or-and-not-operators | |
egrep '[[]]' Comparator-DNS-Error.log | grep -v .ip6.arpa. | grep -Ev '3.131.52.32|13.59.106.13|3.18.34.0' | |
grep -rin "3.131.52.32" Comparator-DNS-Error.log | awk '{print $13}' |
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
git config | |
git status | |
git diff | |
git add | |
git commit | |
git log | |
git pull | |
git push | |
git push -u origin |
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
# programa tradicional | |
if "Promoção" in email: | |
marque_como_spam() | |
if "ofertas" in email: | |
marque_como_spam() | |
if "bônus" in email: | |
... |
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
Segue a lista de comandos docker e sua utilidade: | |
docker attach – Acessar dentro do container e trabalhar a partir dele. | |
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem. | |
docker commit – Cria uma imagem a partir de um container. | |
docker cp – Copia arquivos ou diretórios do container para o host. | |
docker create – Cria um novo container. | |
docker diff – Exibe as alterações feitas no filesystem do container. | |
docker events – Exibe os eventos do container em tempo real. | |
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele. |
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
# enter a specific docker conteiner | |
docker exec -it -u <use> <name_container> bash | |
docker exec -it <name_container> bash //without user | |
# up all docker containers | |
docker-compose up -d | |
# stop all docker containers | |
docker-compose stop |
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
Create a html file into same directory of file js. | |
var http = require('http'); | |
var fs = require('fs'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
var content = fs.readFileSync('./index.html'); | |
res.end(content); | |
}).listen(1337, '127.0.0.1'); |
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
$ git commit -a -m "Something message important here" | |
//To commit and add changed files. | |
$ git commit -am "Something message important here" | |
//To commit and add changed files. | |
$ git add | |
//To add new files (always when you will commit new files, you need to use git add not git -a -m/ -am) | |
$ git log |
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
:tabnew | |
Open a new tab | |
:tabn número | |
Browse among tabs, example: | |
tabn 2 (go to tab number 2) | |
:tabnext | |
Go to next tab also possible use :tabn |
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
#include <PCM.h> | |
const unsigned char sample[] PROGMEM = { | |
130, 111, 95, 102, 106, 117, 123, 125, 125, 130, 133, 136, 141, 142, 141, 139, 139, 137, 139, 139, 139, 140, 138, 137, 133, 130, 126, 124, 121, 121, 123, 124, 128, 133, 132, 134, 144, 153, 160, 162, 163, 156, 151, 145, 143, 139, 135, 136, 127, 120, 117, 122, 119, 114, 110, 105, 103, 98, 98, 94, 93, 93, 97, 100, 101, 106, 113, 119, 121, 125, 126, 129, 137, 143, 146, 148, 150, 150, 148, 146, 140, 137, 137, 134, 129, 130, 127, 126, 122, 121, 118, 119, 124, 120, 120, 122, 128, 131, 138, 144, 146, 150, 156, 157, 159, 162, 161, 156, 147, 144, 136, 126, 118, 110, 105, 102, 98, 94, 94, 95, 97, 101, 100, 104, 111, 114, 111, 107, 111, 111, 113, 122, 123, 127, 135, 141, 146, 150, 152, 156, 154, 155, 154, 147, 141, 138, 134, 126, 118, 112, 114, 118, 119, 115, 118, 121, 123, 122, 123, 125, 129, 138, 144, 148, 152, 158, 154, 149, 151, 154, 152, 148, 144, 135, 131, 129, 127, 120, 109, 104, 94, 90, 86, 86, 84, 87, 97, 103, 111, 114, 123, 134, 133, 131, 135, 133, 12 |
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
<canvas id="nome_canvas" width="largura" height="altura"> | |
Este é um exemplo de como começar com Canvas. Utilizamos a tag <canvas>. Os atributos width e height informam a largura e a altura, respectivamente, da área de desenho. É importante também informar um id para podermos trabalhar com ele no código Javascript. (trecho adaptado do livro HTML5 Canvas e JavaScript) | |
</canvas> | |