Skip to content

Instantly share code, notes, and snippets.

View landon9720's full-sized avatar

Landon Kuhn landon9720

View GitHub Profile
@landon9720
landon9720 / copy-csv.sh
Created February 2, 2016 19:39
copy compressed csv file from s3 to psql
aws s3 cp s3://your_bucket/your_key - | gzcat | pv | psql your_db -c "copy your_table from stdin delimiter ',' csv;"
@landon9720
landon9720 / null-uuid.txt
Created February 2, 2016 19:24
UUID with all zeros
00000000-0000-0000-0000-000000000000
rows.sortBy(r => (r.lastName, r.firstName))
aws s3 cp s3://yourbucket/yourkey.gz - | gzcat
pv < yourfile.csv | psql -c "copy yourtable from STDIN;"
brew install gist; gist -f filename -Po
implicit def `joda datetime ordering`: Ordering[DateTime] = Ordering.fromLessThan(_ isBefore _)
@landon9720
landon9720 / gist:3005647
Created June 27, 2012 17:47
disable OS X quarantine, disable OS X dock bounce notification
sudo defaults write com.apple.LaunchServices LSQuarantine -bool NO
sudo defaults write com.apple.dock no-bouncing -bool TRUE
@landon9720
landon9720 / game_of_life.scala
Created June 27, 2012 13:33
Conway's Game of Life, using Processing, written in Scala
// Conway's Game of Life, using Processing, written in Scala
// see: http://en.wikipedia.org/wiki/Conway's_Game_of_Life
// see: http://processing.org/
// see: http://www.scala-lang.org/
// run using processing-scala-sbt:
// https://github.com/landon9720/processing-scala-sbt
// this code is by Landon Kuhn