Skip to content

Instantly share code, notes, and snippets.

View humrochagf's full-sized avatar
:octocat:

Humberto Rocha humrochagf

:octocat:
View GitHub Profile
@humrochagf
humrochagf / openpgp.md
Created November 11, 2022 20:54
Keyoxide identity proof

$argon2id$v=19$m=64,t=512,p=2$APKMnk3G/9yJecJbkk5xKQ$O+JNM+9Zok7sOFr6KGuctA

@humrochagf
humrochagf / .gitconfig
Last active March 17, 2021 01:49
Git config with alias for a prettier log
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !git lg1

Keybase proof

I hereby claim:

  • I am humrochagf on github.
  • I am humrochagf (https://keybase.io/humrochagf) on keybase.
  • I have a public key ASCzBZPsGdxoKCKKdnv2EkCRylrKrcMvEbKWtKA-bT9mnwo

To claim this, I am signing this object:

@humrochagf
humrochagf / index.html
Created February 27, 2019 23:36
Tio Gilberto
<!doctype html>
<html lang="pt-br">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hello, world!</title>
</head>
<body>
@humrochagf
humrochagf / utmkeeper-com-mautic.html
Created September 21, 2018 13:07
Integração do utmkeeper com o mautic
<script src="/caminho/do/utmkeeper.js"></script>
<script>
(function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://meusite.com/mtc.js','mt');
var config = {
postLoad: function(utms) { mt('send', 'pageview', utms); }
@humrochagf
humrochagf / emailchecker.py
Created July 4, 2018 12:57
Lendo emails do gmail
# Este é o código de como ler emails do gmail
# discutido no calango, ele foi escrito para rodar em
# python 3
import email
import imaplib
EMAIL = 'calangotestedeemail@gmail.com'
PASSWORD = '@Calango123'
SERVER = 'imap.gmail.com'
@humrochagf
humrochagf / currency.js
Created May 16, 2015 00:39
Javascript currency formating with comma decimal separation
function number_to_money(num, currency) {
currency = typeof currency !== 'undefined' ? currency : '$';
return currency + ' ' + num.toFixed(2).replace('.', ',').replace(/(?=(\d{3})+\,)/g, '.').replace(/^\./,'');
};
var numbers = [1, 12, 123, 1234, 12345, 123456, 1234567, 12345.67];
for (var i = 0; i < numbers.length; i++) {
document.write(number_to_money(numbers[i], 'R$') + '<br />');
};
#!/bin/bash
##
## Essential stuff
##
sudo apt-get update && sudo apt-get dist-upgrade -y
sudo apt-get install -y build-essential aria2 git mercurial fonts-inconsolata myspell-pt-br unzip unrar p7zip-full
##