This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 tbsp olive oil 15 mL | |
1 small onion | |
3 cloves garlic, minced | |
1 tsp chili powder 5 mL | |
1 tsp ground cumin 5 mL | |
1 1/3 cups ketchup 325 mL | |
2/3 cup dr. pepper 150 mL | |
1/4 cup soy sauce 60 mL | |
1/4 cup cider vinegar 60 mL | |
1 drop liquid smoke |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MBP:~ ed$ ruby -e 'while line = gets; puts line.split; end' <~/Desktop/generated_query.sql | grep JOIN | wc -l | |
15 | |
MBP:~ ed$ gem install launchy | |
MBP:~ ed$ launchy http://www.amazon.com/Great-Gonzos-Best-Ted-Nugent/dp/B00001X599 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RED="\[\033[0;31m\]" | |
# YELLOW="\[\033[0;33m\]" | |
# GREEN="\[\033[0;32m\]" | |
# PS1="$RED\$(date +%H:%M) \w$YELLOW \$(parse_git_branch)$GREEN\$ " | |
function __git_dirty { | |
git diff --quiet HEAD &>/dev/null | |
[ $? == 1 ] && echo "!" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# github + launchy = gaunchy | |
# open your current repo (+ path) in your browser | |
# $ gaunchy.rb app/models | |
require 'rubygems' | |
require 'git' | |
require 'launchy' | |
g = Git.open('.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://www.five-ten-sg.com/libpst/packages/libpst-0.6.34.tar.gz | |
cd libpst-0.6.34 | |
./configure | |
make | |
make test | |
make install | |
readpst -o ~/contacts ~/MS.pst | |
Opening PST file and indexes... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg_dump -Uuser db | gzip > filename.gz | |
scp host:~/filename.gz . | |
psql -U postgres | |
drop database db;create database db; | |
\quit | |
gunzip filename.gz | |
psql db < filename | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MobileProvider < ActiveRecord::Base | |
validates_uniqueness_of :name | |
end | |
class Mobile < ActiveRecord::Base | |
include ActionView::Helpers::NumberHelper | |
belongs_to :user | |
belongs_to :mobile_provider | |
before_validation :strip_non_numeric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jody@jodys-macbook-pro-2 ~/code/benefic (master) $ git pull | |
remote: Counting objects: 11, done. | |
remote: Compressing objects: 100% (6/6), done. | |
remote: Total 6 (delta 5), reused 0 (delta 0) | |
Unpacking objects: 100% (6/6), done. | |
From github.com:domain7/benefic | |
e58ffce..fa0dd49 master -> origin/master | |
Updating e58ffce..fa0dd49 | |
Fast-forward | |
.../_client_organization_contact.html.erb | 10 +++++----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script> | |
var geocoder = new google.maps.Geocoder(); | |
function success(position) { | |
var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); | |
geocoder.geocode({'latLng' : latlng}, function(results, status){ | |
$('#saddr').val(results[0].formatted_address); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
routes | |
map.connect "/images/letterpress/:letterpress.png", :controller => 'pages', :action => 'letterpress' | |
controller | |
def letterpress | |
send_file "tmp/letterpress/#{params[:letterpress]}.png", :disposition => 'inline' | |
end | |