Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / team-workflow.md
Created August 29, 2012 16:18
Git workflow for agile teams

Mar 2nd, 2009

An efficient workflow for developers in Agile teams that handles features and bugs while keeping a clean and sane history.

At Hashrocket we use git both internally and in our Agile mentoring and training. Git gives us the flexibility to design a version control workflow that meets the needs of either a fully Agile team or a team

@leesmith
leesmith / dump.txt
Created October 27, 2012 01:08
Mysqldump and gzip one-liner
mysqldump db_name -u root -p | gzip -c | cat > db_name.sql.gz
@leesmith
leesmith / setup.md
Last active October 13, 2015 14:48
Ruby development setup on OSX Mountain Lion from scratch

Ruby development setup on OSX Mountain Lion from scratch

Install Xcode from app store

Install Xcode command line tools from the "Xcode > Preferences > Downloads" menu

Generate ssh key & copy to github

ssh-keygen -t rsa -C "[email protected]"
@leesmith
leesmith / exercise-schedule.md
Last active December 11, 2015 21:49
Strength training workout program

Strength Training

Directions

Frequency

Perform workout three times per week, resting at least a day between sessions. One cycle lasts 6 weeks followed by a week of rest.

Time needed

@leesmith
leesmith / browserpad.txt
Created January 30, 2013 23:08
Notepad in a browser
data:text/html;charset=utf-8, <title>TextEditor</title> <link rel="shortcut icon" href="http://g.etfv.co/https://docs.google.com"/> <style> html{height: 100%;} body{background: -webkit-linear-gradient(#f0f0f0, #fff); padding: 3%; height: 94%;} .paper { font: normal 12px/1.5 "Lucida Grande", arial, sans-serif; width: 50%; height: 80%; margin: 0 auto; padding: 6px 5px 4px 42px; position: relative; color: #444; line-height: 20px; border: 1px solid #d2d2d2; background: #fff; background: -webkit-gradient(linear, 0 0, 0 100%, from(#d9eaf3), color-stop(4%, #fff)) 0 4px; background: -webkit-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -moz-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -ms-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -o-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; -webkit-background-size: 100% 20px; -moz-background-size: 100% 20px; -ms-background-size: 100% 20px; -o-background-size: 100% 20p
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS