Public Gists by joho

gist: 237759 object#respond_to for mutlt...
Gravatar
Wed Nov 18 03:34:03 -0800 2009
1
2
3
class Object
  # sometimes it's handy to know
  def respond_to_any?(*method_names)
gist: 235748 Envato job ad - senior ruby...
Gravatar
Sun Nov 15 21:08:32 -0800 2009
1
2
3
Senior Ruby on Rails Developer
===
 
gist: 213060 Going to track all the modi...
Gravatar
Sun Oct 18 20:25:00 -0700 2009
1
2
3
Kona one20
---
http://bikes.konaworld.com/09/09_one20primo_uk.cfm
Gravatar
Thu Sep 17 22:07:00 -0700 2009
1
2
3
class SignupController < ActionController::Base
  def step_two
    @signup = Signup.find(params[:id])
Gravatar
Fri Aug 28 18:20:52 -0700 2009
1
2
3
reinstall mysql - 64bit 10.5 build
  - then reload the db
remove old macports dir - http://trac.macports.org/wiki/FAQ#uninstall
gist: 169465 Extracted from our health c...
Gravatar
Mon Aug 17 17:40:30 -0700 2009
1
2
3
require 'open-uri'
require 'hpricot'
 
Gravatar
Wed Jul 29 21:06:52 -0700 2009
1
2
3
~ $ python
Python 2.4.4 (#1, Mar 4 2008, 21:21:26)
[GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2
Gravatar
Mon Jul 06 19:09:23 -0700 2009
1
2
3
require File.dirname(__FILE__) + '/../spec_helper'
 
def app
gist: 138105 our first week without ryan
Gravatar
Tue Jun 30 03:36:21 -0700 2009
1
2
3
Marking the end of an era
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
gist: 138059 A little jquery script to s...
Gravatar
Tue Jun 30 00:44:12 -0700 2009
1
2
3
<!DOCTYPE>
<html>
  <head>
Gravatar
Thu May 28 20:32:20 -0700 2009
1
2
3
# extracted from marty andrew's presentation on ruby static code analysis
# http://www.slideshare.net/martin_j_andrews/code-quality-analysis
 
Gravatar
Mon May 25 21:34:18 -0700 2009
1
2
3
irb(main):005:0> n = "James"
=> "James"
irb(main):006:0> n.strip!
gist: 114594 i needed handy little chunk...
Gravatar
Tue May 19 20:30:52 -0700 2009
1
2
3
require 'test/unit'
 
class Array
Gravatar
Mon Apr 27 02:50:14 -0700 2009
1
2
3
TEST_INPUT_PATH = '/Users/joho/Desktop/Grand Designs S09E10.avi'
TIMES_TO_TEST = 10
 
gist: 100355 A sintatra app & php page f...
Gravatar
Wed Apr 22 23:15:02 -0700 2009
1
2
3
<?php
if ($_SERVER['REMOTE_ADDR'] == "127.0.0.1")
{
Gravatar
Tue Apr 07 18:29:52 -0700 2009
1
2
3
class ActiveSupport::OrderedHash < Hash
  def first
    [@keys.first, self[@keys.first]]
gist: 81616 A little ruby script to giv...
Gravatar
Wed Mar 18 22:49:11 -0700 2009
1
2
3
require 'rubygems'
require 'open-uri'
require 'json'
Gravatar
Wed Mar 18 21:51:24 -0700 2009
1
2
3
# can someone please explain this to me?
 
left = { :a => 'a', :b => 'b' } # => {:a=>"a", :b=>"b"}
Gravatar
Mon Mar 16 16:43:06 -0700 2009
1
2
3
# this is my least favourite boolean/operator precedence gotcha
# got any of your own to share?
 
Gravatar
Mon Mar 09 20:55:43 -0700 2009
1
2
3
- @items && @items.each do |item|
  - name = item.gsub(/views\/.+\/(.+).haml/, '\1')
    - unless name == "index" || name[/^hide-/]