Skip to content

Instantly share code, notes, and snippets.

View tgraham's full-sized avatar

Travis Graham tgraham

View GitHub Profile
[AirPingy] tgraham → vagrant up
[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Running any VM customizations...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] Failed to connect to VM!
@tgraham
tgraham / gist:1163546
Created August 22, 2011 21:00 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: IT Manager/Consultant
Favorite Python project: Don't have one, am I supposed to?
Favorite Conference: acts_as_conference
Python Experience Level: Absolutely nada, zip, zilch, zero.
@tgraham
tgraham / .bash_profile
Created August 10, 2011 13:13
Blinged prompt
export CLICOLOR=1
# 1 2 3 4 5 6 7 8 9 0 1
export LSCOLORS=HxFxCxDxBxegedabagacad
source ~/.colors
# PS1='\n\[\e[1;32m\]\u\[\e[0m\]:\w \[\e[1;30m\]$(vcprompt)\[\e[0m\]→'
# PS1="\n\[$ERED\][\[$ECYAN\]$(hostname -s)\[$ERED\]]\[$NO_COLOR\] \[$EGREEN\]\u\[$NO_COLOR\]:\w \[$EBLACK\]\$(vcprompt)\[$NO_COLOR\]→ "
PS1="${BRIGHT_BLUE}[${BRIGHT_GREEN}$(hostname -s)${BRIGHT_BLUE}] ${BRIGHT_YELLOW}\u ${BRIGHT_RED}\$(vcprompt)${BRIGHT_WHITE}→ ${RESET}"
- ['stock', 'bond'].each do |fund_type|
- for fund in allocation.funds.find_all {|funds| funds.type == fund_type} do
%tr
%td= fund.type.humanize[0]
%td
- if (allocation.type == 'recommended') && (!current_user.admin?)
= truncate(fund.name)
- else
= link_to truncate(fund.name), "#edit_fund_#{allocation.funds.index(fund)}", class: 'nyroModal'
[Pingy] tgraham [git:master] → bundle exec
/Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.11/lib/bundler/cli.rb:351:in `exec': wrong number of arguments (ArgumentError)
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.11/lib/bundler/cli.rb:351:in `exec'
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.11/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.11/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.11/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.11/lib/bundler/vendor/thor/base.rb:389:in `start'
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.11/bin/bundle:13:in `<top (required)>'
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@global/bin/bundle:19:in `load'
from /Users/tgraham/.rvm/gems/ruby-1.9.2-p180@glob
# This is based on the official RSpec tm-bundle
require 'rubygems'
ENV['TM_PROJECT_DIRECTORY'] ||= File.dirname(ENV['TM_FILEPATH'])
rspec_rails_plugin = File.join(ENV['TM_PROJECT_DIRECTORY'],'vendor','plugins','rspec','lib')
if File.exist?(File.join(ENV['TM_PROJECT_DIRECTORY'], 'Gemfile'))
require "rubygems"
require "bundler"
Bundler.setup
## .bash_profile
export CLICOLOR=1
# 1 2 3 4 5 6 7 8 9 0 1
export LSCOLORS=HxFxCxDxBxegedabagacad
source ~/.colors
# PS1='\n\[\e[1;32m\]\u\[\e[0m\]:\w \[\e[1;30m\]$(vcprompt)\[\e[0m\]→'
@tgraham
tgraham / gist:710907
Created November 22, 2010 23:13
Nginx redirect
Put this in your server{} block in your nginx config file:
if ($host = 'tricklesofchange.com' ) {
rewrite ^/(.*)$ http://www.tricklesofchange.com/$1 permanent;
}
This will force a 301 redirect on all requests coming in.