Skip to content

Instantly share code, notes, and snippets.

View morvanabonin's full-sized avatar

Morvana Bonin morvanabonin

View GitHub Profile
@morvanabonin
morvanabonin / grep-commands.txt
Last active December 15, 2021 18:16
greps commands
# 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}'
@morvanabonin
morvanabonin / comandos_git_aula_versionamento
Created October 30, 2020 18:37
Comandos GIT visto na aula de versionamento
git config
git status
git diff
git add
git commit
git log
git pull
git push
git push -u origin
@morvanabonin
morvanabonin / commom_program.py
Last active March 11, 2018 04:13
programming-rule
# programa tradicional
if "Promoção" in email:
marque_como_spam()
if "ofertas" in email:
marque_como_spam()
if "bônus" in email:
...
@morvanabonin
morvanabonin / comandos-docker
Last active June 9, 2024 00:04
Comandos do Docker
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.
@morvanabonin
morvanabonin / docker-commands
Last active May 21, 2024 15:28
Docker commands
# 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
@morvanabonin
morvanabonin / hello-world-node
Last active August 29, 2015 14:25
Hello Word in Node with html file
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');
@morvanabonin
morvanabonin / git-commands
Last active December 15, 2021 14:05
Git commands
$ 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
@morvanabonin
morvanabonin / vim-commands
Last active August 29, 2015 14:13
VIM Editor Commands
: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
@morvanabonin
morvanabonin / matebell.txt
Last active August 29, 2015 14:11
Bell Matehackers Project
#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
@morvanabonin
morvanabonin / aprendendo_canvas.html
Last active August 29, 2015 14:10
Aprendendo jogos em Canvas
<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>