Skip to content

Instantly share code, notes, and snippets.

View ryansch's full-sized avatar

Ryan Schlesinger ryansch

View GitHub Profile
@ryansch
ryansch / gist:409176
Created May 21, 2010 18:01
Launches xterms
#!/bin/bash
SIZE=`xdpyinfo | grep dimensions | cut -c 18-26`
main=off
secondary=off
displaylink=off
offset=0
@ryansch
ryansch / hooks_controller.rb
Created September 28, 2010 15:03
Rails Controller for Chargify Webhooks
require 'md5'
class Chargify::HooksController < ApplicationController
protect_from_forgery :except => :dispatch
before_filter :verify, :only => :dispatch
EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change ].freeze
def dispatch
event = params[:event]
@ryansch
ryansch / Capfile
Created December 8, 2010 00:07 — forked from tompata/Capfile
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
# Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
after 'deploy:finalize_code', 'deploy:web:disable'
after 'deploy:start', 'deploy:web:enable'
namespace :deploy do
@ryansch
ryansch / rightscale_error.log
Created March 25, 2011 04:11
Converge error with common chef repos added
********************************************************************************
*RS> Converging ****
*RS> Run list: right_scripts_cookbook::SYS_Timezone_set___11H1,
*RS> right_scripts_cookbook::SYS_Syslog_remote_logging_client___11H1,
*RS> right_scripts_cookbook::MAIL_Postfix_local_delivery___11H1,
@ryansch
ryansch / chef-solo.log
Created March 29, 2011 23:47
Debug log of failed chef-solo run.
[Tue, 29 Mar 2011 16:45:23 -0700] DEBUG: Processing rvm_default_ruby[ree-1.8.7-2011.03@system]
[Tue, 29 Mar 2011 16:45:23 -0700] DEBUG: rvm_default_ruby[ree-1.8.7-2011.03@system] using Chef::Provider::RvmDefaultRuby
[Tue, 29 Mar 2011 16:45:24 -0700] ERROR: rvm_default_ruby[ree-1.8.7-2011.03@system] (/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.8.16/lib/chef/mixin/recipe_definition_dsl_core.rb line 59) had an error:
undefined method `insert' for nil:NilClass
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:75:in `method_missing'
/tmp/vagrant-chef/cookbooks-0/rvm/providers/environment.rb:34:in `class_from_file'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/provider.rb:81:in `instance_eval'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/provider.rb:81:in `action_create'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/resource.rb:263:in `send'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/resource.rb:263:in `run_ac
@ryansch
ryansch / rvm_error.log
Created April 8, 2011 18:41
rvm get latest error
$ rvm get latest
Original installed RVM version:
rvm 1.5.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
rvm-<html>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
165 165 0 165 0 0 1610 0 --:--:-- --:--:-- --:--:-- 2037
@ryansch
ryansch / rvm.sh
Created April 8, 2011 20:34
RVM 1.6.0 default /etc/profile.d/rvm.sh
#
# RVM profile
#
# /etc/profile.d/rvm.sh # sh extension required for loading.
#
if [ -n "${BASH_VERSION:-}" -o -n "${ZSH_VERSION:-}" ] ; then
# Load user rvmrc configurations, if exist
for file in /etc/rvmrc "$HOME/.rvmrc" ; do
[[ -s "$file" ]] && source $file
@ryansch
ryansch / mysql_error.log
Created April 8, 2011 23:25
mysql2 gem error
$ rake -T
(in /home/bar/foo)
rake aborted!
/usr/local/rvm/gems/ruby-1.9.2-p180@foo/gems/mysql2-0.2.7/lib/mysql2/mysql2.so: undefined symbol: rb_prohibit_interrupt - /usr/local/rvm/gems/ruby-1.9.2-p180@foo/gems/mysql2-0.2.7/lib/mysql2/mysql2.so
/home/bar/foo/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
color ry-solarized
"color torte
"highlight NonText guifg=#4a4a59
"highlight SpecialKey guifg=#4a4a59
set guifont=Menlo:h12
" Use the same symbols as TextMate for tabstops and EOLs
set listchars=tab:▸\ ,eol:¬
ps1_rvm()
{
if command -v rvm-prompt >/dev/null 2>/dev/null ; then
if [[ ! $(rvm-prompt) == $OLD_RVM ]]; then
export OLD_RVM=$(rvm-prompt)
printf "$(rvm-prompt) "
fi
fi
}