Skip to content

Instantly share code, notes, and snippets.

@leesmith
leesmith / workflow.md
Created August 29, 2012 15:39
Agile git and the story branch pattern

-- December 18, 2008 at 23:39 PST

I've been using git for source code management for over a year now and I'm totally hooked. I won't rave about all the usual reasons WhyGitIsBetterThanX since it's been done already. Instead, I'm going to share how I use git for easy agile development.

The basic idea is to never do anything in the master branch except use it to

@leesmith
leesmith / restore-into-local-db.txt
Created August 16, 2012 18:58
Restore heroku pg database to local pg database
# View backups and pick one to pull down
heroku pgbackups
# Download chosen backup
curl -o my_backup.dump `heroku pgbackups:url <backup_num>`
# Restore into local database
pg_restore --verbose --clean --no-acl --no-owner -h myhost -U myuser -d mydb my_backup.dump
@leesmith
leesmith / gist:3094856
Created July 12, 2012 00:52 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@leesmith
leesmith / brew.txt
Created July 2, 2012 18:21
Homebrew: install specific version of formula
cd /usr/local
brew versions postgresql
git checkout -b postgresql-8.4.4 [some hash]
brew install postgresql
git checkout master
git branch -d postgresql-8.4.4
http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula
@leesmith
leesmith / notes.txt
Created June 20, 2012 14:49
wkhtmltopdf EY install notes
cd /data/regions_brandworks/shared
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
tar xfj wkhtmltopdf-0.9.9-static-i386.tar.bz2
sudo mv wkhtmltopdf-i386 /usr/local/bin/wkhtmltopdf
@leesmith
leesmith / setup.md
Created May 16, 2012 00:27
Ruby on Rails development setup on Ubuntu 12.04 (vim, git, rbenv)

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

@leesmith
leesmith / geokitr.rb
Created May 3, 2012 18:47
Basic geokit geocoding
#!/usr/bin/env ruby
require 'rubygems'
require 'geokit'
require 'csv'
Geokit::Geocoders::google = 'your_key'
places = CSV.read('places.csv', headers: true)
@leesmith
leesmith / openssl.txt
Created May 3, 2012 15:52
Password generation with openssl
openssl rand -base64 6
openssl rand -hex 4
openssl rand -base64 8 |md5 |head -c8;echo
date |md5 | head -c8; echo
ping -c 1 yahoo.com |md5 | head -c8; echo
@leesmith
leesmith / psql.txt
Created April 17, 2012 02:54
Ubuntu postgresql notes
# install database server
apt-get install postgresql libpq-dev
# install postgresql gem
gem install pg
# create postgres (super)user
createuser --superuser lsmith -U postgres
# change postgres user password
@leesmith
leesmith / gist:2307505
Last active October 2, 2015 19:48
OSX software
Alfred http://www.alfredapp.com/
Shiftit http://code.google.com/p/shiftit/
Spectacle http://spectacleapp.com/
Adium http://adium.im/
Dropbox https://www.dropbox.com/
VMware Fusion http://www.vmware.com/products/fusion/overview.html
Teleport http://abyssoft.com/software/teleport/
TextWrangler http://www.barebones.com/products/textwrangler/
Skype http://www.skype.com/
iTerm2 http://www.iterm2.com/