Skip to content

Instantly share code, notes, and snippets.

View neophiliac's full-sized avatar

Kurt Sussman neophiliac

View GitHub Profile
# Bindings
unbind-key C-b
set-option -g prefix C-z
bind-key z send-prefix
bind-key C-z last-window
bind r source-file ~/.tmux.conf
bind k confirm-before kill-window
# Settings
set-option -g default-terminal "screen-256color"
@jbhannah
jbhannah / he-ipv6.sh
Created May 23, 2011 17:51
Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
#!/bin/sh
# Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
# /etc/network/if-up.d/he-ipv6.sh
# Written by Jesse B. Hannah (http://jbhannah.net) <[email protected]>
# Based on instructions provided by Hurricane Electric (http://tunnelbroker.net)
###
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@karmi
karmi / .gitignore
Created May 15, 2011 11:15
Import your Gmail messages into ElasticSearch and search them with a simple web application.
.DS_Store
*.log
Gemfile.lock
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'
@lukemorton
lukemorton / index.php
Created April 12, 2011 18:21
Create a new Kohana app easily
<?php
/**
* The directory in which your application specific resources are located.
* The application directory must contain the bootstrap.php file.
*
* @see http://kohanaframework.org/guide/about.install#application
*/
$application = '../application';
@igrigorik
igrigorik / ruby-1.9-tips.rb
Created February 3, 2011 17:19
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@igrigorik
igrigorik / faraday-em-http.rb
Created January 30, 2011 01:12
using Faraday with EM-Synchrony & EM-Http
require 'faraday'
require 'net/http'
require 'pp'
# Repos:
# https://github.com/technoweenie/faraday
# https://github.com/pengwynn/faraday_middleware
# Blog posts:
# http://adventuresincoding.com/2010/09/writing-modular-http-client-code-with-faraday
Given /^I expect to pay \$(\d+) via amazon$/ do |arg1|
price = arg1.to_f
mock_pipeline_request = mock('pipeline_request',
:url => sekret_payment_path(:transaction_amount => price))
Remit::API.any_instance.
expects(:get_recurring_use_pipeline).
with{ |opts| opts[:transaction_amount] == price }.
returns(mock_pipeline_request)
@creationix
creationix / streamtest.js
Created January 1, 2011 08:57
A sample client for creationix/jsonparse that consumes the twitter feed and filters out messages and names
var Parser = require('./jsonparse');
var Http = require('http');
var p = new Parser();
// IMPORTANT, put your username and password in here
var username = "yourTwitterUsername", password = "yourPassword";
var client = Http.createClient(80, "stream.twitter.com");
var request = client.request("GET", "/1/statuses/sample.json", {
"Host": "stream.twitter.com",
"Authorization": (new Buffer(username + ":" + password)).toString("base64")
});
# === In capistrano stage config (config/deploy/staging.rb, et al.)
set :deployed_url, 'https://paydici.com'
# Pivotal Tracker
set :pivotal_project_id, 39238
set :pivotal_token, 'OMG SEEKRIT TOKEN'
set :deliver_when_deploying_to, [:live,:dev]
before "deploy", "deploy:gather_information"
after "deploy", "deploy:tag_pivotal_stories", "deploy:summarize"