Skip to content

Instantly share code, notes, and snippets.

View levicole's full-sized avatar

Levi Cole levicole

  • Kolide
  • Nashville, TN
View GitHub Profile
class Foo
attr_accessor :this, :that
def initialize(this, that)
self.this, self.that = this, that
end
end
class MyClass
def instantiate_a_foo
Foo.new("this", "and this")
gem "rails", "3.0.pre", :path => "/Users/levikennedy/projects/rails"
%w(activesupport activemodel actionpack actionmailer activerecord activeresource).each do |lib|
gem lib, '3.0.pre', :path => "/Users/levikennedy/projects/rails#{lib}"
end
git "git://github.com/rails/rails.git"
git "git://github.com/rails/arel.git"
git "git://github.com/rails/rack.git"
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- rails/all (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/levikennedy/projects/punchy/config/boot.rb:16
from /Users/levikennedy/projects/punchy/config/application.rb:1:in `require'
from /Users/levikennedy/projects/punchy/config/application.rb:1
from ./script/console:2:in `require'
from ./script/console:2
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
response = case level_of_awesomeness
when 1
"meh"
when 2
"ok"
when 3
"not bad"
when 4
"looking good!"
when 5
// usage: $("#element").copyFields("#to", "#from")
(function($) {
$.fn.copyFields = function(to, from) {
// find all the inputs in to
var to = $(to + " input");
// find all the inputs in from
var from = $(from + " input");
// when you click on the element
$(this).click(function() {
//loop through all the from inputs and put the value in the to input...
require 'rubygems'
require 'gosu'
include Gosu
class MouseInfo < Window
CENTER = 640/2
BOTTOM = 480
def initialize
super(640, 480, false)
@clicked = ""
require 'rubygems'
require 'gosu'
include Gosu
class MouseInfo < Window
CENTER = 640/2
BOTTOM = 480
def initialize
super(640, 480, false)
@clicked = ""
render :xml => Twilio::Verb.new { |v|
v.gather(:numDigits => 1, :timeout => 5, :action => recording_script_notification_url(@notification)) do
v.play @notification.voicemessage_url
v.say "If you would like to record again, press one, otherwise stay on the line"
end
v.say "Your notification is being sent"
v.redirect send_notification_notification_url(@notification)
}.response
aasm_column :state
aasm_initial_state :division_selection
aasm_state :division_selection
aasm_state :track_selection
aasm_state :track_selected
aasm_event :select_division do
transitions :to => :track_selection, :from => [ :division_selection ]
end