Public Gists by gavinlaking

Gravatar
Fri Oct 09 03:10:44 -0700 2009
1
2
3
180.upto(230) do |green|
  if green % 10 == 0
    puts "<p style='background:#fa" + green.to_s(base=16) + "ae;'>Sexy</p>"
Gravatar
Tue Aug 25 03:05:11 -0700 2009
1
2
3
/* ------------------------------------------------------------------------- */
// Convert str to UTF-8 (if not already), then convert that to HTML named entities.
// and numbered references. Compare to native htmlentities() function.
Gravatar
Mon Jun 08 04:34:01 -0700 2009
1
2
3
For example, convert this:
 
["AUD", "Australian Dollar"],
Gravatar
Tue May 12 08:54:12 -0700 2009

      
gist: 108808 Showing how to reference at...
Gravatar
Fri May 08 07:51:53 -0700 2009
1
2
3
<% for comment in @article.comments %>
 <p>Name: <%=h comment.name %><br />
 Comment: <%=h comment.body %></p>
gist: 70212 Textmate/Ruby script to con...
Gravatar
Wed Feb 25 07:23:16 -0800 2009
1
2
3
#!/usr/bin/env ruby
#
# Originally written by http://redartisan.com/tags/csv
Gravatar
Wed Feb 04 05:21:49 -0800 2009
1
2
3
##
# Calendar helper with proper events
# http://www.cuppadev.co.uk/webdev/making-a-real-calendar-in-rails/