Skip to content

Instantly share code, notes, and snippets.

View adambair's full-sized avatar

Adam Bair adambair

View GitHub Profile
@adambair
adambair / gist:2776441
Created May 23, 2012 17:13
all_products_sales
{
"name":"Corsair - Obsidian 650D System Cabinet - Black",
"description":"",
"url":"http://www.bestbuy.com/site/Corsair - Obsidian 650D System Cabinet - Black/3228633.p?id=1218390965457",
"image":[
{
"style":"thumbnail",
"url":"http://s3.amazonaws.com/zazoola/production/products/images/2/thumbnail.png?1337745723"
},
@adambair
adambair / .tmux.conf
Created March 21, 2012 14:27 — forked from jondkinney/README.md
j2fly's vim setup, install with: exec 3<&1;bash <&3 <(curl https://raw.github.com/gist/2040114/vim.sh 2> /dev/null)
# Our .tmux.conf file
# Setting the prefix from C-b to C-a
# START:prefix
set -g prefix C-a
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
@adambair
adambair / protip-tmux-radness
Created March 20, 2012 16:58 — forked from renaehodgkins/tmux-protip-radness
protip tmux radness
#protip add 'new-session' to your .tmux.conf -- then add 'tmux attach' to the end
of your .bashrc/.profile/.zshrc or whatever to automatically connect or
create a new session. It's fucking rad.
https://img.skitch.com/20120320-drb6wifhbmy3n2137s2chymrn1.jpg
@adambair
adambair / v1
Created February 22, 2012 22:03
-------------------------------------------------------------
iIIIIIIIIIIIIIIi,
II 'IIi. Intridea, Inc
II 'Ii www.intridea.com
II iii II
II 'ii II Document Title Here
II II 12/05/2011 - 12/06/2011
II iii II
II. iii .II Adam Bair, Partner
def apple_product_titleize(name)
name[0] + name[1].capitalize + name[2..-1]
end
@adambair
adambair / data.csv
Created December 12, 2011 16:14 — forked from clr/data.csv
Planet Finder RubyGames
Life DistanceWithin3AU TempUnder375 Water Atmosphere ClassM GasGiant
0 0 0 0 1 0 1
0 1 1 0 1 0 0
0 1 0 0 0 0 0
0 0 0 0 1 0 0
0 1 0 0 1 0 1
0 1 0 1 0 0 1
0 1 1 0 1 0 1
1 0 1 1 1 0 0
0 1 0 0 1 0 1
@adambair
adambair / rstat.rb
Created November 3, 2011 17:08
Print out Git stats on a repo using Ruby
#!/usr/bin/ruby
require 'yaml'
contributions = {}
`git log --shortstat -z`.each("\0") do |commit|
commit.match(/Author: (\w+) /)
author = $1
commit.match(/(\d+) files changed, (\d+) insertions\(\+\), (\d+) deletions\(\-\)/)
@adambair
adambair / dsa.js.coffee
Created October 28, 2011 13:17
Destructuring Assignment in CoffeeScript
first, last = ["Jake", "Mauer"]
first, last = "Jake Mauer".split(" ")
# Also see http://blog.carbonfive.com/2011/09/28/destructuring-assignment-in-coffeescript
<div id="primary_nav" class="clearfix">
<ul class="clearfix">
<li class="first"><a href="http://intridea.com/services">Services</a></li>
<li class=""><a href="http://intridea.com/products">Products</a></li>
<li class=""><a href="http://intridea.com/portfolio">Portfolio</a></li>
<li class=""><a href="http://intridea.com/blog">Blog</a></li>
<li class="last"><a href="http://intridea.com/about">About</a></li>
</ul>
</div> <!-- / #primary_nav -->
@adambair
adambair / gist:1319793
Created October 27, 2011 15:00
Learning Rails
# Rails Core
-Text, Reference
http://guides.rubyonrails.org/
http://api.rubyonrails.org/
# Rails for Zombies
- Paid, Interactive, Videos
http://www.codeschool.com/courses/rails-for-zombies