My Recent Pastes (502 and counting)
All Pasties (over 502 and counting)
Below are summaries of the 15 most recent pasties by Caius Durling.
January 06, 2009
5:01AM EDT
by Caius Durling
1 2 3 4 5 |
if arg_str && arg_str != ":" then arg_array, msg = split_out_message(arg_str) else arg_array = Array.new end |
January 06, 2009
2:29AM EDT
by Caius Durling
View more (28 lines)
1 2 3 4 5 |
class Numeric # Converts an integer of seconds to days, hours, minutes + seconds # eg: 4200.to_time_length #=> "0 days 1 hours 10 mins and 0 secs" def to_time_length |
January 06, 2009
1:11AM EDT
by Caius Durling
View more (31 lines)
1 2 3 4 5 |
@n = 86400 @i = 0 @ints = [60, 60, 24, 7] def parse_units( amount, index ) |
January 05, 2009
6:28PM EDT
by Caius Durling
View more (30 lines)
1 2 3 4 5 |
class ParamError < Exception; end def multiply_by_5( int ) # Check it is an int |
January 04, 2009
7:44AM EDT
by Caius Durling
View more (36 lines)
1 2 3 4 5 |
class Foo def self.klass self.to_s end end |
January 04, 2009
2:08AM EDT
by Caius Durling
View more (241 lines)
1 2 3 4 5 |
require "rubygems" require "httparty" require "yaml" module Google |
January 04, 2009
2:08AM EDT
by Caius Durling
View more (240 lines)
1 2 3 4 5 |
require "rubygems" require "httparty" require "yaml" module Google |
January 04, 2009
1:02AM EDT
by Caius Durling
View more (18 lines)
1 2 3 4 5 |
require "rubygems" require "httparty" class Translate include HTTParty |
January 03, 2009
3:35AM EDT
by Caius Durling
View more (59 lines)
1 2 3 4 5 |
# Checks if a regex has been uttered and replies if it has def lets_work_some_regex_magic(stem, sender, reply_to, msg) # ^(?:.*?: )?s\/.*?\/.*?(?:\/.*?)?$ # http://rubular.com/regexes/5523 |
January 01, 2009
7:33PM EDT
by Caius Durling
View more (15 lines)
1 2 3 4 5 |
caius@Claudius:~$ botcontrol dir plugins /usr/lib/ruby/gems/1.8/gems/butler-1.9.0/lib/access/yamlbase.rb:34:in `initialize': Path must be a directory (/home/caius/.butler/bots//access/user) (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/butler-1.9.0/lib/butler/bot.rb:82:in `new' from /usr/lib/ruby/gems/1.8/gems/butler-1.9.0/lib/butler/bot.rb:82:in `initialize' from /usr/lib/ruby/gems/1.8/gems/butler-1.9.0/lib/butler.rb:186:in `new' |
January 01, 2009
12:12PM EDT
by Caius Durling
View more (59 lines)
1 2 3 4 5 |
# Setup the classes we want to store class Foo def name "foo" end |
December 27, 2008
10:03AM EDT
by Caius Durling
View more (58 lines)
1 2 3 4 5 |
require "rubygems" require "sinatra" get "/" do erb :index |
December 26, 2008
6:19PM EDT
by Caius Durling
View more (20 lines)
1 2 3 4 5 |
class Notes { public void showNote(int noteNumber) { |
December 26, 2008
6:18PM EDT
by Caius Durling
View more (20 lines)
1 2 3 4 5 |
class Notes { public void showNote(int noteNumber) { |
December 26, 2008
4:54PM EDT
by Caius Durling
View more (39 lines)
1 2 3 4 5 |
import java.util.*; public class Part3 { public static void main (String[] args) { |
Pastie