Skip to content

Instantly share code, notes, and snippets.

clickity clack

Joshua Priddle itspriddle

clickity clack
Block or report user

Report or block itspriddle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
itspriddle / rspec_any_instance_test.rb
Created Mar 26, 2012 — forked from tfwright/rspec_any_instance_test.rb
Demonstrates unexpected behavior from .any_instance
View rspec_any_instance_test.rb
require 'rspec/mocks'
describe Object do
it "should not care how many times a stubbed method is called" do
View test.rb
module Blah
def configuration
@configuration ||={}
def configure(&block)
yield configuration
View test.rb
module Blah
def configuration
@configuration || {}
def configure(&block)
@configuration ||= {}
yield @configuration
itspriddle / will_paginate.rb
Created Oct 6, 2011
extends will_paginate to play well with Twitter's Bootstrap
View will_paginate.rb
# config/initializers/will_paginate.rb
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options[:renderer] ||= BootstrapLinkRenderer
super.try :html_safe
class BootstrapLinkRenderer < LinkRenderer
View gist:1106724
Original Source:
= Christian Neukirchen's Ruby Style Guide
You may not like all rules presented here, but they work very well for
me and have helped producing high quality code. Everyone is free to
code however they want, write and follow their own style guides, but
when you contribute to my code, please follow these rules:
console.log """
Ooh ooh
We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
View format_this.rb
:one => 1,
:two => 2,
:three => 3,
:four => 4,
:five => 5,
:six => 6,
:seven => 7,
:eight => 8,
:nine => 9,
if [ $# -eq 0 ]; then
echo "$0 /path/to/log"
# Escaped color codes
BLACK=`echo -e '\033[0;30m'`
DK_GREY=`echo -e '\033[1;30m'`
itspriddle / less.vim
Created Apr 17, 2010 — forked from bryanjswift/less.vim
LESS CSS for pathogen
View less.vim
au BufRead,BufNewFile *.less set ft=less syntax=less
You can’t perform that action at this time.