Skip to content

Instantly share code, notes, and snippets.

View mattpolito's full-sized avatar

Matt Polito mattpolito

View GitHub Profile
@mattpolito
mattpolito / install.rb
Created March 2, 2011 14:02
creates symlinks for your config files into your home directory when in Dropbox
#!/usr/bin/ruby
require 'fileutils'
HOME_DIR = File.expand_path("~")
DROPBOX_DIR = File.expand_path("~/Dropbox/config_files")
files = Dir["#{DROPBOX_DIR}/.*"]
files.shift(2)
files.delete(".*.*.sw*") # remove any vim swap files that may have entered from editing
@mattpolito
mattpolito / update.rb
Created March 2, 2011 14:04
updates your vim bundles when using git
#!/usr/bin/ruby
require 'fileutils'
DROPBOX_DIR = File.expand_path("~/Dropbox/config_files")
VIM_BUNDLES_DIR = DROPBOX_DIR + "/.vim/bundle"
files = Dir["#{VIM_BUNDLES_DIR}/*"]
files.each do |file|
unless !File.directory?("#{file}/.git")
FileUtils.cd(file)
When /^I fill in payment info that results in success$/ do
When %{I fill in payment info with:
| Card Number | 1 |
| Expiration | 1/2012 |
| Card Verification | 999 |
| Zipcode | 60120 |}
end
When /^I fill in payment info with:$/ do |table|
within "fieldset.payment.info" do
@mattpolito
mattpolito / .irbrc
Created April 6, 2011 14:22
big pimpin' irbrc
# Color definitions
ANSI = {}
ANSI[:RESET] = "\e[0m"
ANSI[:BOLD] = "\e[1m"
ANSI[:UNDERLINE] = "\e[4m"
ANSI[:LGRAY] = "\e[0;37m"
ANSI[:GRAY] = "\e[1;30m"
ANSI[:RED] = "\e[31m"
ANSI[:GREEN] = "\e[32m"
ANSI[:YELLOW] = "\e[33m"
@mattpolito
mattpolito / gist:908483
Created April 7, 2011 19:18 — forked from sparkertime/gist:868498
Senor CrankyPants
/* MrCrankyPants - block users and images from Propane!
* to use, place it in ~/Library/Application Support/Propane/unsupported/caveatPatchor.js (yes, it must be that file name)
*
* Created by ripping code off of https://gist.github.com/825404 and https://gist.github.com/310162
*/
Campfire.MrCrankyPants = Class.create({
options: {
blockedUsers: ['Abe L.', 'George W.'],
usersDisallowedToPostImages: ['Theodore R.'],
@mattpolito
mattpolito / poop.rb
Created April 7, 2011 21:13
Poopin'
class Poop
class << self
def outta_my_butt
"( 0 )"
end
end
# or for all you hipsters
# def self.outta_my_butt
# "( 0 )"
# end
@mattpolito
mattpolito / gist:1146988
Created August 15, 2011 15:23
keymando Mail.app setup
only "Mail" do
nmap "c", "<Cmd-n>" # New message
nmap "j", "<Down>" # Down
nmap "k", "<Up>" # Up
nmap "e", "<Shift-Cmd-e>" # Archive
nmap "<Shift-3>", "<Cmd-Backspace>" # Delete
nmap "s", "<Shift-Cmd-l>" # Star
nmap "r", "<Cmd-r>" # Reply
nmap "a", "<Shift-Cmd-r>" # Reply all
nmap "f", "<Shift-Cmd-f>" # Forward
@mattpolito
mattpolito / keymandorc.rb
Created August 17, 2011 21:02
Keymandorc
# Start Keymando at login
# -----------------------------------------------------------
start_at_login
# Disable Keymando when using these applications
# -----------------------------------------------------------
# disable "Remote Desktop Connection"
# disable /VirtualBox/
# Basic mapping
Feature:
Background:
Given the year is 1972
And there is a crack commando unit
And that unit has been sent to prison by a "military court"
And it was a crime they did not commit
Scenario:
Given the men have escaped from a "maximum security stockade" to the "Los Angeles underground"
And today they are still wanted by the government
@mattpolito
mattpolito / gist:1232825
Created September 21, 2011 18:05
propane keymando
only /Propane/ do
map "<Cmd-Option-Left>", "<Cmd-Shift-[>"
map "<Cmd-Option-Right>", "<Cmd-Shift-]>"
end