Public Gists by chendo

Gravatar
Tue Nov 17 15:44:59 -0800 2009
1
2
3
/* Instructions:
 *
 * Download to ~/.mailplane.css
Gravatar
Sun Nov 01 17:02:27 -0800 2009
1
2
3
What did you do to get good at Rails?
 
I just kept at it and worked with it on a professional basis. Constantly learning about new things and working with people who do Rails is also a good start.
Gravatar
Tue Sep 22 17:32:08 -0700 2009
1
2
3
# Symbol#to_proc is already defined in Rails
class Symbol
  def to_proc
Gravatar
Mon Aug 24 01:01:56 -0700 2009
1
2
3
# Daft Golf
# Encode the entire lyrics of Harder Better Faster Stronger in the least amount of characters
# without cheating. Source of lyrics: http://lyricwiki.org/Daft_Punk:Harder,_Better,_Faster,_Stronger
Gravatar
Mon Jun 29 21:50:35 -0700 2009
1
2
3
# SMS Rickroll script
# Word by word.
# Total messages to be sent: 450
Gravatar
Sat Jun 13 04:12:10 -0700 2009
1
2
3
# put this inside spec_helper.rb
def p(*objs)
  puts objs.map { |o| inspect.gsub('<', '&lt;').gsub('>', '&gt;') }.join("\n")
Gravatar
Sun May 31 15:42:38 -0700 2009
1
2
3
# Genetic algorithm playaround
# chendo 2009
require 'rubygems'
Gravatar
Tue Apr 07 20:10:15 -0700 2009
1
2
3
# http://mozy.com/contest
# Question 4
# chendo's solution
Gravatar
Tue Feb 17 21:09:29 -0800 2009
1
2
3
# http://www.slate.com/id/2101150/sidebar/2101387/ent/2101353/
 
poem = <<-EOF.downcase.gsub(/[^a-z]/, '')
gist: 10335 or maybe not. ignore this
Gravatar
Thu Sep 11 16:07:01 -0700 2008
1
2
3
/* Adding icon to status bar in 1.x */
  NSString *pathToDefault = [NSString stringWithFormat:@"%@/Default.png", [[NSBundle mainBundle] bundlePath]];
NSURL *urlToDefault = [NSURL fileURLWithPath:pathToDefault];