Skip to content

Instantly share code, notes, and snippets.

View lenary's full-sized avatar

Sam Elliott lenary

View GitHub Profile
module Inflector
## Stolen From Rails. Thanks Guys!
def camelize(lower_case_and_underscored_word, first_letter_in_uppercase = true)
if first_letter_in_uppercase
lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
else
lower_case_and_underscored_word.first + camelize(lower_case_and_underscored_word)[1..-1]
end
end
My New App
Basically, this is going to be a three way app, between RSS, Email and HTML.
Clients:
Input an RSS feed
Can Recieve an Email of Updates
a HTML page of the feed
#!ruby
# i'm sure this needs a require line
Camping.goes :Nuts
module Nuts::Controllers
class Index < R '/'
def get
@t = Time.now.to_s
render :sundial
end
end

What kind of car would a geekmobile be?

  • De Lorean lenny
  • Universal Ecto1 (Ghostbusters) lenny Supporters: Antipaganda
    • turbo awd ghostbusters car marc
    • with back to the future delorian mod kit adapted for it. XanT1
  • a bicycle with an alien in the basket lenny
  • a van RK Supporters: Waldo
  • make a van look like a shuttlecraft. Antipaganda
  • ( )
  • 100 Broken Windows
  • 1962-1966 [Disc 1]
  • 1962-1966 [Disc 2]
  • 1967-1970 [Disc 1]
  • 1967-1970 [Disc 2]
  • 2007 - Live At Abbey Road
  • 2009: Software Freedom Law Show
  • 60 Second Idea to Improve the World
  • A Beautiful Lie
19:16 Leftmost: Looks right to me.
19:17 Lenary: considers the irony of the above line
19:17 Physchim62 has joined (n=chatzill@unaffiliated/physchim62)
19:18 Amgine: <laughs>
19:18 Amgine: Punishment will be forthcoming.
19:18 Lenary: there is no irony
19:18 Lenary: if youre most to the left, you can only look right
19:19 Amgine: Ah, unless you are on a globe, or within a sphere, or...
19:19 alhen_hidden has left IRC (Connection timed out)
19:24 Amgine: <puts a magnet up against leftmost cat to see if xe is ironic>
class Foo < Sinatra::Default
get '/' do
'hi'
end
end
class Bar < Sinatra::Default
get '/' do
'bye'
end
class Attendee < ActiveRecord::Base
belongs_to :conference
has_many :submissions, :foreign_key => "presenter_id"
has_many :attendences, :foreign_key => "attendee_id", :class_name => "Submission"
end

Backpack

backpackit.com

The first of a trio of 37 Signals' tools in our round-up, Backpack is one of those web applications that once you've been using it for a while, you wonder how you lived without it. Use it to make notes, to-do lists, store files or share information. You can post information to a Backpack page via email, and paste an iframe into a note to display, for example, a Google Calendar. The free version of Backpack is limited to five pages, but for $7 (about £4.75) per month, you get 100 pages and a shared calendar. Best of all, it's a joy to use.

# Arrays
['a', 'b', 'c'] # Without interpolation
["a", "b", "c"] # With interpolation
%w(a b c) # Without interpolation
%W(a b c) # With interpolation
# Strings
'a' # Without interpolation
"a" # With interpolation and backslashes
`a` # Command Interpretation with interpolation and backslashes