Skip to content

Instantly share code, notes, and snippets.

View amiel's full-sized avatar

Amiel Martin amiel

View GitHub Profile
script_console_running = ENV.include?('RAILS_ENV') && IRB.conf[:LOAD_MODULES] && IRB.conf[:LOAD_MODULES].include?('console_with_helpers')
rails_running = ENV.include?('RAILS_ENV') && !(IRB.conf[:LOAD_MODULES] && IRB.conf[:LOAD_MODULES].include?('console_with_helpers'))
irb_standalone_running = !script_console_running && !rails_running
if script_console_running
require 'logger'
Object.const_set(:RAILS_DEFAULT_LOGGER, Logger.new(STDOUT))
end
$.fn.text_without_children = function(selector) {
var tmp = $("<div></div>").html(this.html()),
collection = (typeof selector == 'undefined') ? tmp.children() : tmp.find(selector);
collection.remove();
return tmp.text();
};
alias gb='for k in `git branch|perl -pe s/^..//`;do echo -e `git show --pretty=format:"%Cblue%cr%Creset" $k|head -n 1`\\t$k;done'
# Output
# ------
# ~/Development/github(master)$ gb
# 4 weeks ago config-gem
# 9 days ago dropdown
# 5 weeks ago faucet
# 3 weeks ago health
export PATH="/usr/local/texlive/2008/bin/universal-darwin/:/opt/local/bin:/opt/local/sbin:$PATH:~/bin:/usr/local/mysql-5.0.67-osx10.5-x86/bin/:/usr/local/bin"
export MANPATH=/opt/local/share/man:$MANPATH
export LC_CTYPE=en_US.UTF-8
alias irb='irb --readline -r irb/completion'
# alias mate='open -a TextMate.app'
#define split =='/'-'%'?_=('+'+'+'+'('):'>'>'>')||(_
#define while main(_){while(((_=getchar())&&((_
while
#define while \
(@ a=
split
#ifndef __STRICT_ANSI__
//,<STDIN>){while(@a&&print(chr(($a=ord(shift@a))==10?126:$a
#endif
==126?
require_dependency 'will_paginate'
require_dependency 'will_paginate/finder'
unless Time.instance_methods.include? 'at_end_of_day'
Time.class_eval do
def at_end_of_day
self.at_beginning_of_day + 1.day
end
end
<%= Group.timespan_filter(@range).count :conditions => :etc %>
require 'httparty'
require 'rack'
class Rack::Validate
attr_reader :app, :options
def initialize(app, options={})
@app = app
@options = options
[["201", "hurl", "http://hurl.r09.railsrumble.com"], ["734m", "LAZEROIDS!", "http://lazeroids.r09.railsrumble.com"], ["a-coders-diarrhea", "idealist", "http://idealist.r09.railsrumble.com"], ["aaron-longwell", "The Line Diet", "http://linediet.r09.railsrumble.com"], ["acts_as_ninjas", "Bartender Cocktail Recipies", "http://bartender.r09.railsrumble.com"], ["agile-bastards", "Everybody Loves Beer", "http://lovesbeer.r09.railsrumble.com"], ["agile-nomads", "PeepNote", "http://peepnote.r09.railsrumble.com"], ["agilitic-featuring-meboo", "PingMyRide", "http://agilitic.r09.railsrumble.com"], ["allcaps", "Decaf Sucks", "http://allcaps.r09.railsrumble.com"], ["andrew", "Rostered", "http://rostered.r09.railsrumble.com"], ["antga-me", "antga.me", "http://antgame.r09.railsrumble.com"], ["awesome", "Twt App", "http://valuable.r09.railsrumble.com"], ["bendyworks", "Yield the Floor", "http://yieldthefloor.r09.railsrumble.com"], ["big-bad-machine", "Twitter Competition Manager", "http://roundem.r09.railsrumble.com"], ["big
api_key.txt