Skip to content

Instantly share code, notes, and snippets.

miguelmota / iso_to_unix.js
Created Jun 20, 2022
JavaScript ISO timestamp to unix timestamp seconds
View iso_to_unix.js
Math.floor(new Date('Fri, 17 Jun 2022 12:28:34 -0700').getTime() / 1000)
miguelmota / hdpaths.txt
Created Jun 20, 2022
ETH HD Derivation Paths. Ledger Legacy, Ledger Live, Trezor, MetaMask
View hdpaths.txt
Ledger (legacy): 44'/60'/0'/{account_index} (eg. 44'/60'/0'/0, 44'/60'/0'/1, 44'/60'/0'/2, etc)
ledger (live): m/44'/60'/{account_index}'/0/0 (eg. m/44'/60'/0'/0/0, m/44'/60'/1'/0/0, m/44'/60'/2'/0/0, etc)
trezor: m/44'/60'/0'/0/{account_index} (eg. m/44'/60'/0'/0/0, m/44'/60'/0'/0/1, m/44'/60'/0'/0/2, etc)
metamask: m/44'/60'/0'/0/{account_index} (eg. m/44'/60'/0'/0/0, m/44'/60'/0'/0/1, m/44'/60'/0'/0/2, etc)
miguelmota / goerli_dai.txt
Created Jun 17, 2022
goerli dai contract address mint
View goerli_dai.txt
miguelmota / goerli_usdc.txt
Created Jun 17, 2022
goerli usdc contract address mint
View goerli_usdc.txt
miguelmota /
Created Jun 15, 2022
Linux remove user from group
sudo gpasswd -d <user> <group>
miguelmota / express.js
Created Jun 13, 2022
Node.js express payload json url size limits
View express.js
app.use(express.json({ limit: '500kb' }))
app.use(express.urlencoded({ extended: false, limit: '500kb', parameterLimit: 50 }))
miguelmota /
Last active Jun 13, 2022
[Fix] Docker container creation causes kernel oops on linux-aws
uname -r # 5.13.0-1028 is buggy
sudo systemctl stop docker
sudo systemctl stop docker.socket
sudo systemctl disable docker
sudo systemctl disable docker.socket
sudo apt-get update
sudo apt dist-upgrade -y && sudo apt autoremove -y
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get autoclean
sudo reboot
miguelmota /
Created Jun 8, 2022
Linux rsync ssh using host from ssh config
rsync -avuz build/ --chmod=ugo=rwX -e ssh myhost:/var/www/public
miguelmota / config
Last active Jun 8, 2022
Linux start ssh-agent globally
View config
Host *
AddKeysToAgent yes
miguelmota /
Created Jun 8, 2022
Bash SSH cache ssh key passphrase
# start session
ssh-agent bash
# enter passphrase once
ssh-add ~/.ssh/id_rsa
# list keys
ssh-add -l