Public Gists by capitalist

Gravatar
Fri Oct 02 07:52:44 -0700 2009
1
2
3
# Neater Github gem dependencies for Rails
 
module GithubGem
Gravatar
Tue Sep 01 07:13:09 -0700 2009
1
2
3
if defined?(ActiveResource)
  # Makes activeresource properly encode records
  class ActiveResource::Base
Gravatar
Wed Aug 26 14:44:47 -0700 2009
1
2
3
function edithosts {
if [ -x "`which $EDITOR`" ] || [ -x "`which $1`" ]
then
Gravatar
Fri Jul 10 19:30:22 -0700 2009
1
2
3
module PythonishDecorator
  def method_added(name)
    return unless @decorations
Gravatar
Wed Jul 08 05:49:04 -0700 2009
1
2
3
HOWTO: iPhone AT&T Tethering
============================
 
Gravatar
Fri Jun 12 07:39:39 -0700 2009
1
2
3
# copy to your Capistrano recipe file
namespace :deploy do
  task :clear_cached_assets, :roles => :web do
Gravatar
Thu Jun 11 22:57:58 -0700 2009
1
2
3
# PRINT TO KINDLE in Mac OSX (for Kindle DX)
#
# HUH?
Gravatar
Sat May 09 11:04:39 -0700 2009
1
2
3
# This is a code example for the Ruby HTTP library Typhoeus
 
# here's an example for twitter search
Gravatar
Mon Feb 16 19:20:43 -0800 2009
1
2
gem list '\A(?:(?:d[mo])[_-]|data_?(?:mapper|objects)|extlib)' --no-versions \
  | xargs sudo gem uninstall -aIx
Gravatar
Tue Feb 03 19:53:41 -0800 2009
1
2
3
# This is a trivial HTTP proxy server, intended for use as a troubleshooting tool
# ONLY (not for real, actual, production use). I wrote this because I couldn't find
# a simple HTTP proxy that I could use to test HTTP proxy support in Net::SSH.
Gravatar
Tue Jan 20 15:24:37 -0800 2009
1
2
3
class Reporter
 
  class << self
Gravatar
Tue Nov 04 14:44:17 -0800 2008
1
2
3
# This Gist is here to explain the wonders of alias_method_chain
#
# It's also pulling double duty as an example of the gist method in training wheels.
Gravatar
Mon Sep 22 08:30:09 -0700 2008
1
2
a = %w(a b c d)
a.inject([]) {|arr,e| arr[-1]=='a' ? arr.insert(-2,e) : arr.push(e)}
Gravatar
Mon Jul 21 13:23:42 -0700 2008
1
this is just a test...