Skip to content

Instantly share code, notes, and snippets.

View jeffkreeftmeijer's full-sized avatar
🦞

Jeff Kreeftmeijer jeffkreeftmeijer

🦞
View GitHub Profile
class Tosti
def self.validate(*ingredients, preparation_method)
ingredients.include?(:brood) && ingredients.length > 1 && preparation_method == :grill
end
end
class Tosti
def self.validate(*ingredients, preparation_method)
ingredients.include?(:brood) && ingredients.length > 1 && preparation_method == :grill
end
end
@jeffkreeftmeijer
jeffkreeftmeijer / hashtagerize.rb
Created November 26, 2009 16:03 — forked from matsimitsu/hashtagerize.rb
#Hashtagerize. The wet dream of hashtag-overusing-idiots out there.
#!/usr/bin/ruby
require 'cgi'
# #Hashtagerize. The wet dream of hashtag-overusing-idiots out there.
# You know who you are. Stop it.
IO.popen 'open http://twitter.com/?status=' << CGI::escape(ARGV.collect { |word| word[0] == 64 ? word : "##{word}" }.join(' '))
#!/usr/bin/ruby
require 'cgi'
# #Hashtagerize. The wet dream of hashtag-overusing-idiots out there.
# You know who you are. Stop it.
puts 'please type the text you want to #Hashtagerize and press [ENTER]...'
IO.popen 'open http://twitter.com/?status=' << CGI::escape(gets.split(' ').collect { |word| word[0] == 64 ? word : "##{word}" }.join(' '))
puts 'please type the text you want to #hashtagerize and press [ENTER]...'
open 'http://twitter.com/?status=' << gets.split(' ').collect { |word| word[0] == 64 ? word : "##{word}" }.join(' ')
puts 'please type the text you want to #hashtagerize and press [ENTER]...'
open 'http://twitter.com/?status=#' << gets.split(' ').collect { |word| word[0] == 64 ? word : "##{word}" }.join(' ')