Skip to content

Instantly share code, notes, and snippets.

View amiel's full-sized avatar

Amiel Martin amiel

View GitHub Profile
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
require 'httparty'
require 'rack'
class Rack::Validate
attr_reader :app, :options
def initialize(app, options={})
@app = app
@options = options
api_key.txt
[["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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Equal Heights Test</title>
<style type="text/css" media="screen">
#container{ width: 960px; margin: 20px auto; }
@amiel
amiel / .gitignore
Created November 15, 2010 18:38 — forked from redoPop/.gitignore
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@amiel
amiel / caveatPatchor.js
Created February 22, 2011 01:31 — forked from protocool/caveatPatchor.js
fork of caveatPatch.js for propane that supports gravatars
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
#! /usr/bin/ruby
# data set:
# id | name | score | postal | color
# 1 | john | 14 | 12345 | blue
# 2 | jane | 10 | 12345 | blue
# 3 | jeff | 6 | 12345 | green
# define a simple class for holding the dataset
@amiel
amiel / helpers.rb
Created October 27, 2011 21:59 — forked from adrianpike/helpers.rb
Page title helper for I18n with to_s for :show!
def page_title()
object_name = controller_name.singularize
if controller.instance_variables.include?(('@' + object_name).to_sym)
locals = {
object_name.to_sym => controller.instance_variable_get('@' + object_name).to_s
}
else
locals = {}
end
class Asset < AR
end
class Alert < AR
belongs_to :asset
has_many :logs
accepts_nested_attributes_for :logs
end
class Log < AR