Skip to content

Instantly share code, notes, and snippets.

@leesmith
leesmith / hdd-to-ssd
Created August 1, 2013 18:56
HDD to SSD upgrade for Macbook Pro
http://thetechblock.com/upgrading-macbook-pro-ssd-superduper/
When I first purchased my MacBook Pro in early 2012 (13” unibody), I purchased it with the base specs. After considering Apple’s upcharge on upgrading individual components, I realized it was significantly cheaper to buy the MBP with a 320GB HD and 4GB RAM and then upgrade everything myself. 128GB SSD and 8GB RAM later (which is much cheaper now than it was then), my laptop was a freaking workhorse. The single biggest upgrade in performance was, by far, the SSD.
At the time, I couldn’t convince myself to spring for the 256GB drive, mostly because the price for the drive was around $450. Needless to say, prices have dropped. A lot. With 50GB of music taking a big chunk of my hard drive space, I was getting tired of having to move media off to external drives. I decided that it was time to upgrade. Again.
I took a long, hard look at the Optibay, which allows users to install a hard drive into their optical bays. In fact, I actually went so far as
@leesmith
leesmith / pre-commit
Created May 20, 2013 16:22
Git pre-commit hook to search for bad things in a commit
#!/bin/sh
if git-rev-parse --verify HEAD >/dev/null 2>&1; then
against=HEAD
else
# run against initial commit
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
for FILE in `git diff-index --check --name-status $against -- | cut -c3-` ; do
@leesmith
leesmith / ie-vm-scripts.md
Last active December 16, 2015 07:09
VirtualBox Internet Explorer VM's

Download VirtualBox

Install ALL versions of Internet Explorer: IE7, IE 8, and IE 9

curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash

Install individual IE VM (7-10)

@leesmith
leesmith / import-csv-excel.txt
Created February 25, 2013 15:09
Import CSV into Excel
1. Download the file
2. Find the downloaded file on your computer and rename it so that it ends with the letters ".txt" rather than ".csv"
3. In Excel, click File -> Open, then locate and select the downloaded and renamed file. An "import" dialog will open.
4. During the import process, designate that the file is "Delimited" with a "Comma", and that the "File Origin" is set to UTF-8.
5. Click "Finish"
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
@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
@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 / 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 "your.email@example.com"
@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 / 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