Skip to content

Instantly share code, notes, and snippets.

View charlieegan3's full-sized avatar
🥑
avocado

Charlie Egan charlieegan3

🥑
avocado
View GitHub Profile
@zflat
zflat / pg_migrate_steps.sh
Last active March 17, 2022 04:51
Migrate pg dump from Heroku to local sqlite3 development (and beyond)
# Export the Heroku PG database to a local dump file
# https://devcenter.heroku.com/articles/heroku-postgres-import-export#export
heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
# Install postregs & Setup password
# https://help.ubuntu.com/community/PostgreSQL
# List databases
sudo -u postgres psql -l
@lucasdinonolte
lucasdinonolte / gist:4016361
Created November 5, 2012 09:45
Copy current git branch to clipboard
git branch | grep "*" | awk '{ print $2 }' | pbcopy
@supr
supr / gist:1166302
Created August 23, 2011 19:50
For golang http.Handler to serve static files on /foo mounted at /xyz/foo
package main
import (
"http"
)
func main() {
http.Handle("/foo/", http.StripPrefix("/foo", http.FileServer(http.Dir("/xyz/foo/"))))
http.ListenAndServe(":6543", nil)
}