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
RSpec.configure do |config| | |
# ...snip | |
config.before(:each) do | |
DatabaseCleaner.start | |
GC.disable | |
end | |
config.after(:each) do | |
DatabaseCleaner.clean |
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
$(document).ready -> | |
$(document) | |
.on('ajax:before', ".single-line-qualification", (e) -> | |
debugger | |
# do validation and return false to cancel ajax | |
if e.target[1].value.trim() == '' | |
e.target[1].value = '' | |
alert 'You must enter a name!' | |
return false | |
) |
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
select * from users into outfile 'users.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n'; |
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
COPY (SELECT foo,bar FROM whatever) TO '/tmp/dump.csv' WITH CSV HEADER; |
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
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/ |
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
# 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 |
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
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 |
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 | |
require 'rubygems' | |
require 'geokit' | |
require 'csv' | |
Geokit::Geocoders::google = 'your_key' | |
places = CSV.read('places.csv', headers: true) |
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
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 |
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
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 |
OlderNewer