Public Gists by briandoll

Gravatar
Fri Nov 20 14:50:53 -0800 2009
1
2
3
class ActiveRecord::Base
  def self.table_name_prefix
    "appname."
Gravatar
Wed Oct 21 14:50:42 -0700 2009
1
2
3
The interesting world of the asterisk in Ruby:
 
Of course we can multiply with it and it's quite handy in a regex, but there are two other interesting uses.
Gravatar
Tue Sep 29 22:16:17 -0700 2009
1
2
3
class Test::Unit::TestCase
 
  def assert_each(assertions)
Gravatar
Wed Aug 26 13:08:09 -0700 2009
1
2
3
module RailsNamingConventions
 
  def file_name_to_class_name(file_name)
Gravatar
Thu Jun 04 11:22:47 -0700 2009
1
2
3
# From Alex Chaffee
# http://pivotallabs.com/users/alex/blog/articles/865-monkey-patch-du-jour
# Add caller line number to sql logging
Gravatar
Tue Jan 13 17:40:38 -0800 2009
1
2
3
public void testSnappyHappy() {
  Map snappy = null;
  Map happy = new HashMap();
Gravatar
Tue Jan 13 17:38:33 -0800 2009
1
2
3
public void testSnappyHappy() {
  Map snappy = null;
  Map happy = new HashMap();
gist: 30097 http://emphaticsolutions.co...
Gravatar
Fri Nov 28 13:17:02 -0800 2008
1
2
3
%ruby script/console
Loading development environment (Rails 2.1.0)
>> (Time.now + 30.minutes).class
gist: 30095 http://emphaticsolutions.co...
Gravatar
Fri Nov 28 13:09:21 -0800 2008
1
2
3
<h3><a href='<%= @link %>'><%= @title %>:</a></h3>
<small>The most recent 5 entries:</small><br/>
<% @items.each do |item| %>
gist: 30094 http://emphaticsolutions.co...
Gravatar
Fri Nov 28 13:07:46 -0800 2008
1
2
3
require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'
gist: 30093 http://emphaticsolutions.co...
Gravatar
Fri Nov 28 13:06:46 -0800 2008
1
2
3
<%- cache "statulous_blog", (Time.now + 60.minutes) do -%>
  <%= render_rss_feed("http://statulous.blogspot.com/feeds/posts/default?alt=rss") %>
<%- end -%>
gist: 6402 @see: http://emphaticsoluti...
Gravatar
Wed Aug 20 10:03:06 -0700 2008
1
2
3
# Add unique header support to soap4r clients
# http://emphaticsolutions.com/index.php/2008/05/06/soap-headers-per-request-in-ruby/
#
gist: 5748 AppleScript to convert .MOD...
Gravatar
Sat Aug 16 12:36:40 -0700 2008
1
2
3
--
-- convertMod2Dv.app
--
gist: 2594 undefined
Gravatar
Fri Jul 25 21:30:12 -0700 2008
1
2
3
s = Time.now
e = s + 100.days
i = s
gist: 1833 marcel's rest/crud conventions
Gravatar
Wed Jul 23 10:57:07 -0700 2008
1
2
3
# Marcel Molina's REST/CRUD conventions
# http://project.ioni.st/post/2283#snippet_2283
 
gist: 384 awk ldap query to yaml
Gravatar
Mon Jul 21 15:33:12 -0700 2008
1
2
3
# This is an awk script, but no awk colour coding is available here.
 
#