My Recent Pastes (637 and counting)
Pastes by Caius Durling (637 and counting)
Below are the 15 most recent pasties by Caius Durling.
January 08, 2010
4:37PM EDT
by Caius Durling
View all 26 lines
require "osx/cocoa" include OSX class UpdatePastieCookie URL = NSURL.URLWithString("http://pastie.org/")
January 08, 2010
1:46PM EDT
by Caius Durling
View all 7 lines
namespace :deploy do namespace :rake_tasks do task :singleton, :roles => :db, :only => {:primary => true} do # Do nothing, overrides the brightbox gem implementation. end
January 07, 2010
7:18PM EDT
by Caius Durling
View all 17 lines
#!/usr/bin/env ruby # My rewrite of http://pastie.org/770933 # class Engine def start!
January 07, 2010
7:16PM EDT
by Caius Durling
View all 22 lines
#!/usr/bin/env ruby # My rewrite of http://pastie.org/770933 # class Engine def start!
December 31, 2009
8:55PM EDT
by Caius Durling
View all 17 lines
@foo = false def blah if @foo puts "@foo holds something"
December 31, 2009
12:30PM EDT
by Caius Durling
View all 21 lines
class Foo def self.var @@variable end
December 29, 2009
10:27AM EDT
by Caius Durling
View all 12 lines
def method_missing method, *args "#{method.to_s} #{args.map {|x| x.to_s }}" end def echo_block
October 28, 2009
11:13PM EDT
by Caius Durling
View all 21 lines
a = (0..9).to_a def split_and_sum array, *split_indexes # We always want to start with 0..(first split) ranges = [0..split_indexes.first]
October 28, 2009
10:43PM EDT
by Caius Durling
View all 10 lines
a = (0..9).to_a def split_and_sum array, split_index first_range = 0..split_index last_range = (array.length-split_index-1)..(array.length-1)
October 13, 2009
8:33AM EDT
by Caius Durling
View all 16 lines
class Moon def self.gravity :none end
August 25, 2009
7:09AM EDT
by Caius Durling
# Every page will load blank echo "* { display: none; }" > ~/hide.css && \ defaults write com.apple.Safari WebKitUserStyleSheetLocationPreferenceKey "~/hide.css" && \ killall Safari && open -a Safari
August 23, 2009
6:03PM EDT
by Caius Durling
View all 7 lines
>> # The usual way ?> class MyError < StandardError; end => nil >> # What I consider a nicer way of doing it
August 18, 2009
3:35PM EDT
by Caius Durling
View all 13 lines
// // NSMenuHeaderFix.h // Instamenu // // Created by Caius Durling on 18/08/2009.
