Instantly share code, notes, and snippets.

Working from home forever and ever

Max Claus Nunes maxcnunes

View GitHub Profile
pull_pr() {
git fetch origin refs/pull/$pr_num/head:pr/$pr_num
# Simple version using only "find"
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
View v8-profile-cpu-100-usage.txt
Code move event for unknown code: 0x3c010c699080
Code move event for unknown code: 0x3c010c69b9c0
Code move event for unknown code: 0x3c010c5729a0
Code move event for unknown code: 0x3c010c57daa0
Code move event for unknown code: 0x3c010c5c8f00
Code move event for unknown code: 0x3c010c5d90a0
Statistical profiling result from v8.log, (22371 ticks, 0 unaccounted, 0 excluded).
[Shared libraries]:
ticks total nonlib name
View sqlectron-npm-run-dist.log
μ sqlectron/sqlectron-gui master ❯ npm run dist
> @ dist /Users/maxcnunes/Development/sqlectron/sqlectron-gui
> npm run compile && build --arch all
> @ compile /Users/maxcnunes/Development/sqlectron/sqlectron-gui
> rimraf app/out && cross-env NODE_ENV=production babel-node scripts/compile.js -v
> cleaning old distribution files
brew install dnsmasq
mkdir -pv $(brew --prefix)/etc/
echo 'address=/.dev/' > $(brew --prefix)/etc/dnsmasq.conf
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver" > /etc/resolver/dev'
View load-connection-uri-from-env-config.go
func connectionURIFromEnvConfig() string {
errMsg := "no valid connection string provided"
connConfig, err := url.Parse(os.Getenv("DB_PORT"))
if err != nil {
dbHost, dbPort, err := net.SplitHostPort(connConfig.Host)
if err != nil {
View postgres-dblink.sql
View react-intl FormattedHTMLMessage
values={{ emailSupport: }}
defaultMessage={"Please contact <a href=\"mailto:{emailSupport}\">support</a>."} />
alias c='docker-compose'
alias cb='docker-compose build'
alias cup='docker-compose up'
alias cr='docker-compose run --service-ports --rm'
alias crl='docker-compose run --service-ports --rm local'
alias crd='docker-compose run --service-ports --rm develop'
alias crt='docker-compose run --rm test'
alias crp='docker-compose run --rm provision'
alias crci='docker-compose run --rm ci'
alias crwt='docker-compose run --rm watchtest'
View get-npm-package-version
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[ ",]//g')