Skip to content

Instantly share code, notes, and snippets.

View cbartlett's full-sized avatar

Colin Bartlett cbartlett

View GitHub Profile
[interactive]
singlekey = true
def find_business_by_tel(what, filter=nil, page=1, page_length=40)
what = what.gsub(/\D/, '')#keep only digital caracteres
return find_business(what, 'canada', filter, page, page_length)
end
@cbartlett
cbartlett / gist:4255000
Created December 11, 2012 01:31
automating rebase interactive
$ git commit -m 'fixup! eef2f127e9f'
(Where eef2f127e9f is the sha1 of the commit you want to fix up into)
$ git rebase -i head~10
(Where 10 is the number of commits back you need to go)
$ ruby imdb-bot.rb http://www.imdb.com/title/tt0106856/
Detected IMDB link for movie "Falling Down".
[Can I Stream It?](http://www.canistream.it/search/movie/Falling%20Down)
@cbartlett
cbartlett / gist:5762084
Created June 12, 2013 00:41
The Andrew Stinger Dictionary
C-Suite: Executives of a company with titles that start with "Chief"
C$: Colin
PFA: Please Find Attached
TAT: Turn Around Time
=== Things to do in NYC with a ~7 Year Old ===
Brooklyn
Williamsburg
- McCarren Park
- Pool
- Brooklyn Flea - Sunday 10-4
- East River State Park
- Brooklyn Bowl - Sat/Sun 12-6
- Leonard Library - Mon-Sun 10-6
@cbartlett
cbartlett / bitly.rb
Created November 7, 2013 20:43 — forked from jehiah/bitly.rb
# Bit.ly API implementation - thanks to Richard Johansso http://gist.github.com/112191
require 'httparty'
class Api::Bitly
include HTTParty
base_uri 'api.bit.ly'
format :json
# Usage: Bitly.shorten("http://example.com")
def self.shorten(url)
@cbartlett
cbartlett / Procfile
Created February 17, 2014 22:23
Easiest static site hosting on Heroku
web: node web.js
@cbartlett
cbartlett / keybase.md
Created February 18, 2014 16:14
keybase.md

Keybase proof

I hereby claim:

  • I am cbartlett on github.
  • I am cbartlett (https://keybase.io/cbartlett) on keybase.
  • I have the public key with fingerprint 4180 AF08 DF39 0D92 7A10  6075 0511 671C D8E3 3B47

To claim this, I am signing this object:

// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com