Skip to content

Instantly share code, notes, and snippets.

View guysherman's full-sized avatar

Guy Sherman guysherman

View GitHub Profile
const argv = process.execArgv.join();
const isDebug = argv.includes('inspect') || argv.includes('debug');
class ProgressReporter {
constructor(prefix) {
this.prefix = prefix;
this.lastProgress = 0;
}
printProgress(percent, isFinal) {
@guysherman
guysherman / refresh-db.sh
Last active February 28, 2019 02:56
Script to clone an AWS postgres db to local
#! /usr/bin/env bash
set -euxo pipefail
PGSSLMODE=require pg_dump -h $1 -p $2 -U $3 -f dump.sql $5
psql -U $4 -c "DROP DATABASE IF EXISTS $5"
psql -U $4 -c "CREATE DATABASE $5"
psql -U $4 -d $5 -f dump.sql
@guysherman
guysherman / keybase.md
Created September 20, 2016 20:46
My Keybase Proof

Keybase proof

I hereby claim:

  • I am guysherman on github.
  • I am guysherman (https://keybase.io/guysherman) on keybase.
  • I have a public key ASDNcd5kG1hBFTqmQfNO_D1YTpxwdvpDre6fGG8s5TPnbwo

To claim this, I am signing this object: