Skip to content

Instantly share code, notes, and snippets.

View tomkersten's full-sized avatar

Tom Kersten tomkersten

View GitHub Profile
@tomkersten
tomkersten / index.html
Created February 29, 2012 03:06
Playing around w/ d3.js...
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title></title>
<style>
.chart rect {
fill: steelblue;
stroke: white;
}
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Swap panes and maintain cursor
bind-key C-j swap-pane -D -d
bind-key C-k swap-pane -U -d
@tomkersten
tomkersten / gist:1447681
Created December 8, 2011 17:17
[Hacky script that] Pulls tickets from a chiliproject/redmine installation & dumps them to STDOUT. Works fine/well with @teddziuba's fork of hubot (https://github.com/teddziuba/hubot)
#!/usr/bin/env ruby
require 'httparty'
class Issue
BASE_URI = "http://your-chiliproject-uri-here/issues"
CHILI_API_KEY = ENV["HUBOT_CHILIPROJECT_API_KEY"] || raise("You must set the 'HUBOT_CHILIPROJECT_API_KEY' environment variable!")
include HTTParty
base_uri BASE_URI
#!/bin/bash
source /home/duckworth/.local_zshrc
CHICAGO_HOUR=`date +"%H"`
EHV_HOUR=$(($CHICAGO_HOUR+7))
echo "It's now $CHICAGO_HOUR o'clock in Chicago and $EHV_HOUR o'clock in EHV"
h1 Pub/Sub Updates
ul.data
testing
@tomkersten
tomkersten / nginx.log
Created September 27, 2011 03:01
Why isn't this working?
# After shutting down the app servers, the clients (open browsers) get a dump
# of all messages which have been held back...and this is dumped out to the nginx log
2011/09/26 22:55:57 [error] 5042#0: *1 connect() failed (111: Connection refused) while
connecting to upstream, client: 204.51.3.162, server: somedomain.com, request:
"GET /stream/0D9A1580 HTTP/1.1", upstream: "http://127.0.0.1:5000/stream/0D9A1580",
host: "somedomain.com", referrer: "http://somedomain.com/tags/0D9A1580/"
" ---------------------------------------------------------------------------
" Folding
" ---------------------------------------------------------------------------
set foldmethod=syntax " Syntax highlighting items specify folds
set foldtext=getline(v:foldstart) " Set text displayed in "foldbar" when code is folded
set fillchars=fold:\ " Fill foldline "empty space" with...empty spaces (instead of default "-" character)
set foldcolumn=1 " Sets width of "foldcolumn" on left of screen used to display foldstatus indicators
set foldlevel=1 " Folds below 1-level. Class/Module-level definitions expanded...all others folded by default
" 'open' folds with the space bar
" ----------------------------------------------------------------------------
" Terminal setup
" ----------------------------------------------------------------------------
set term=xterm-256color
set t_Co=256 "Set terminal to 256 colors
" ----------------------------------------------------------------------------
" Syntax highlighting
" ----------------------------------------------------------------------------