Skip to content

Instantly share code, notes, and snippets.

View jotafeldmann's full-sized avatar
🐙
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

Jota Feldmann jotafeldmann

🐙
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
  • São Paulo, SP, Brazil
View GitHub Profile
@System-Glitch
System-Glitch / go-worker.go
Last active January 5, 2022 15:11
A resilient Go worker
package main
// This is an example of a resilient worker program written in Go.
//
// This program will run a worker, wait 5 seconds, and run it again.
// It exits when SIGINT or SIGTERM is received, while ensuring any ongoing work
// is finished before exiting.
//
// Unexpected panics are also handled: program won't crash if the worker panics.
// However, panics in goroutines started by the worker won't be handled and have
@jotafeldmann
jotafeldmann / ubuntu_installation_for_mac.md
Last active August 17, 2019 06:14
Ubuntu 18.4 installation for MacAir 2012
performance (netflix) - https://qconsp.com/system/files/keynotes-slides/qcon_sp_keynote_-_martin_spier.pdf
- metricas impressionantes deles (requests, logs, latencia, instancias etc)
- arquitetura (caches nos provedores)
- 3 regioes aws
- ec2 reserved (se nao tá streaming, usa pra recomendacoes, encoding etc)
- build: amis ubuntu
- deploy: 4000 por dia
- tudo stateless
- ferramentas (captura de metricas da redhat, flamegraph, flamescope etc)
@mort3za
mort3za / git-auto-sign-commits.sh
Last active January 30, 2024 10:31
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@Kovrinic
Kovrinic / .gitconfig
Last active April 11, 2024 11:50
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@jotafeldmann
jotafeldmann / javascript.js
Last active February 27, 2019 18:33
JavaScript: prints the current called function name and arguments from inside the function. VS Code snippet.
{
/*
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
@renatodex
renatodex / app_model.js
Created September 12, 2016 18:12
App Model Idea
var AppModel = function() {
this.extend = function(model_setup) {
return function(model_data) {
return new factory_methods(model_setup, model_data);
}
}
this.factory_methods = function(model_setup, model_data) {
@alanhoff
alanhoff / README.md
Last active June 21, 2020 19:57
Pré NodeConf

Pré NodeConf

Não é segredo para ninguém que nos dias 4 e 5 de Julho acontecerá em São Paulo a primeira NodeConf da América Latina. Pensando nisso resolvemos criar um pré evento que consiste em uma série de eventos ao vivo e 100% gratuito no YouTube para que os participantes possam aprender um pouco mais sobre a plataforma e participar da NodeConf com uma boa base de conhecimento.

Os assuntos apresentados serão complementares aos assuntos que os palestrantes abordarão durante a NodeConf Brazil, portanto não perca tempo e adicione um

@bruno-de-queiroz
bruno-de-queiroz / core.sh
Last active January 30, 2018 13:58
Autocomplete example and annotation parser for bash scripts to make easier to expose functions and flags, to create help info and short command list for autocompletion script
#!/bin/bash
#
# Autocomplete example and annotation parser for bash scripts to make easier to expose functions and flags,
# to create help info and short command list for autocompletion script
#
# Usage:
#
# source $SCRIPT_PATH/core.sh
# ...
# #@flag -e|--environment