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
alias be="bundle exec" | |
alias bi="bundle install" | |
alias bu="bundle update" |
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
alias gco="git checkout" | |
alias gst="git status" | |
alias gcm="git commit -m" | |
alias gca="git commit --amend" | |
alias gpr="git pull --rebase" | |
alias gpl="git pull" | |
alias gpu="git push" | |
alias gri="git rebase -i" | |
alias gre="git rebase" | |
alias gad="git add" |
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
cookbook_paths: | |
- /Users/steveschwartz/workspace | |
recipes: | |
- pivotal_workstation::bash_profile-arch_flags # ONLY USE IF YOU ARE ON SNOW LEOPARD | |
- pivotal_workstation::meta_osx_base | |
- pivotal_workstation::meta_osx_development | |
- pivotal_workstation::meta_ruby_development | |
- pivotal_workstation::mongodb | |
- pivotal_workstation::pg_admin | |
- pivotal_workstation::solr |
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
Last login: Tue Nov 1 04:20:56 on console | |
steves-macbook:~ steveschwartz$ cd ~/workspace/ | |
steves-macbook:workspace steveschwartz$ soloist | |
running chef: sudo bash -c 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin chef-solo -j /var/folders/f9/f99vsO5cHRCsJ+7Fb+UNhE+++TI/-Tmp-/soloist20111101-253-1kys0lq-0 -c /var/folders/f9/f99vsO5cHRCsJ+7Fb+UNhE+++TI/-Tmp-/soloist20111101-253-1r2g8qc-0 -l info' | |
Password: | |
[Tue, 01 Nov 2011 05:02:33 -0400] INFO: *** Chef 0.10.4 *** | |
[Tue, 01 Nov 2011 05:02:37 -0400] INFO: Setting the run_list to ["pivotal_workstation::bash_profile-arch_flags", "pivotal_workstation::meta_osx_base", "pivotal_workstation::meta_osx_development", "pivotal_workstation::meta_ruby_development", "pivotal_workstation::mongodb", "pivotal_workstation::pg_admin", "pivotal_workstation::solr", "pivotal_workstation::ssl_certificate"] from JSON | |
[Tue, 01 Nov 2011 05:02:37 -0400] INFO: Run List is [recipe[pivotal_workstation::bash_profile-arch_flags], recipe[pivotal_workstation::meta_osx_base], re |
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
namespace :ubuntu do | |
desc "Setup Environment" | |
task :setup_env, :roles => :app do | |
update_apt_get | |
install_dev_tools | |
install_git | |
install_subversion | |
install_sqlite3 | |
# Install and setup RVM instead of old Rails stack | |
#install_rails_stack |
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 MyObject | |
def block_depth=(value) | |
Thread.current[:block_depth] = value | |
end | |
def block_depth | |
Thread.current[:block_depth] || 0 | |
end | |
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
# Validates whether the value of the specified attribute matches the format of an URL, | |
# as defined by RFC 2396. See URI#parse for more information on URI decompositon and parsing. | |
# | |
# This method doesn't validate the existence of the domain, nor it validates the domain itself. | |
# | |
# Allowed values include http://foo.bar, http://www.foo.bar and even http://foo. | |
# Please note that http://foo is a valid URL, as well http://localhost. | |
# It's up to you to extend the validation with additional constraints. | |
# | |
# class Site < ActiveRecord::Base |
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 'open-uri' | |
require 'rexml/document' | |
require 'rexml/xpath' | |
url = 'http://rpm.newrelic.com/accounts.xml?include=application_health' | |
headers = {'x-license-key' => 'YOUR LICENSE KEY'} |
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
#!/bin/sh | |
echo "js-zipped-served-from-rmsr-vs-cloudfront-vs-intercepted-cloudfront" | |
echo " " | |
echo "------------------------------------------------------------------------------------------------------------------------------------------------------" | |
for i in {1..5} | |
do | |
for loc in "http://cdn.ratemystudentrental.com/javascripts/all-rmsr.js?1275522132" "http://cdn0.ratemystudentrental.com/javascripts/all-rmsr.js?1275522132" "http://compressed.ratemystudentrental.com/javascripts/all-rmsr.js?1275522132" "http://cdn0.ratemystudentrental.com/javascripts/all-rmsr.js.gz?1275522132" | |
do | |
echo "vv $loc vv" |
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
Steves-Macbook:desktop steveschwartz$ wget http://cdn.ratemystudentrental.com/javascripts/all-rmsr.js.gz?1275522132--00:33:42-- http://cdn.ratemystudentrental.com/javascripts/all-rmsr.js.gz?1275522132 => `all-rmsr.js.gz?1275522132.6'Resolving cdn.ratemystudentrental.com... 208.78.103.49 | |
Connecting to cdn.ratemystudentrental.com[208.78.103.49]:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 85,785 [application/x-gzip] | |
100%[====================================================================================>] 85,785 431.60K/s in 0.19 seconds | |
00:33:43 (429.56 KB/s) - `all-rmsr.js.gz?1275522132.6' saved [85785/85785] | |
Steves-Macbook:desktop steveschwartz$ wget http://cdn0.ratemystudentrental.com/javascripts/all-rmsr.js.gz?1275522132--00:33:57-- http://cdn0.ratemystudentrental.com/javascripts/all-rmsr.js.gz?1275522132 => `all-rmsr.js.gz?1275522132.7'Resolving cdn0.ratemystudentrental.com... 216.137.33.166, 216.137.33.33, 216.137.33.228, ... |