Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Coding

Miguel Mota miguelmota

:octocat:
Coding
View GitHub Profile
@miguelmota
miguelmota / README.md
Last active Jun 15, 2021
Ethereum L2 block times
View README.md
Ethereum xDai Polygon (matic) Optimism Arbitrum
~13.5s ~5s ~1s ? ?
@miguelmota
miguelmota / audio_recorder.sh
Created Jun 14, 2021
Arch linux microphone sound audio recorder
View audio_recorder.sh
yay -S audio-recorder
@miguelmota
miguelmota / dhcpcd.conf
Created Jun 14, 2021
Arch linux change DNS nameservers
View dhcpcd.conf
static domain_name_servers=8.8.8.8 8.8.4.4
@miguelmota
miguelmota / multicall.go
Created Jun 12, 2021
Golang MultiCall solidity contract call example
View multicall.go
package main
import (
"context"
"encoding/hex"
"fmt"
"strings"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
@miguelmota
miguelmota / generate_private_key.js
Created Jun 9, 2021
Node.js generate ethereum private key using crypto random bytes
View generate_private_key.js
console.log(require('crypto').randomBytes(32).toString('hex'))
@miguelmota
miguelmota / connection_info.sh
Created Jun 2, 2021
Linux view network manager saved WiFi passwords
View connection_info.sh
sudo cat /etc/NetworkManager/system-connections/<SSID_GOES_HERE>>.nmconnection
@miguelmota
miguelmota / npm_git.sh
Created May 25, 2021
NPM install from git url (ie github repo url)
View npm_git.sh
npm install git+https://github.com/myorg/myrepo.git@mybranch
@miguelmota
miguelmota / netlify.toml
Created May 21, 2021
Netlify redirect all except for certain path example config
View netlify.toml
[[redirects]]
from = "/whitepaper.pdf"
to = "/whitepaper.pdf"
status = 200
force = true
[[redirects]]
from = "/*"
to = "https://another-site.com/:splat"
status = 301
@miguelmota
miguelmota / processes.txt
Last active May 17, 2021
Arch Linux process list
View processes.txt
avahi-daemon - name resolution and servcie discovery. Similar to "Bonjour" service
boltd - thunderbolt device manager daemon
cups - printer service
cups-browsed - daemon for browsing shared printers
colord - manages device color profiles
dbus-daemon - the D-Bus message bus daemon
dunst - desktop notifications
gconfd-2 - registry of gnome libraries/applications
dconf-service - low-level configuration system and settings management tool
gpg-agent - secret keys manager daemon
@miguelmota
miguelmota / .env
Created May 13, 2021
CircleCI docker hub build and push + slack notifications
View .env
DOCKER_IMAGE=myorg/myimage
DOCKER_PASS=mydockerhubpassword
DOCKER_USER=mydockerhubusername
SLACK_ACCESS_TOKEN=myslackaccesstoken
SLACK_DEFAULT_CHANNEL=myslackchannel