Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Schlesinger ryansch

View GitHub Profile
@ryansch
ryansch / gist:409176
Created May 21, 2010
Launches xterms
View gist:409176
#!/bin/bash
SIZE=`xdpyinfo | grep dimensions | cut -c 18-26`
main=off
secondary=off
displaylink=off
offset=0
@ryansch
ryansch / hooks_controller.rb
Created Sep 28, 2010
Rails Controller for Chargify Webhooks
View hooks_controller.rb
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]
View 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 Mar 25, 2011
Converge error with common chef repos added
View rightscale_error.log
********************************************************************************
*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 Mar 29, 2011
Debug log of failed chef-solo run.
View chef-solo.log
[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 Apr 8, 2011
rvm get latest error
View rvm_error.log
$ 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 Apr 8, 2011
RVM 1.6.0 default /etc/profile.d/rvm.sh
View 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
View mysql_error.log
$ 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)
View .gvimrc.local
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:¬
View ps1_rvm.sh
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
}
You can’t perform that action at this time.