Skip to content

Instantly share code, notes, and snippets.

View vinbarnes's full-sized avatar

Kevin R. Barnes vinbarnes

View GitHub Profile
#!/usr/bin/env ruby
# twail.rb
# Twitter stream tail
# Copyright 2010 Jonathan Rudenberg
# Licensed under the MIT License
#
# Prerequisites: gem install json twitter-stream
require 'optparse'
@vinbarnes
vinbarnes / hack
Created July 20, 2010 19:12 — forked from ymendel/hack
#!/bin/sh
BRANCHES=`git branch`
if [ $? != 0 ]; then
exit
fi
GIT_SVN=0
git branch -r | grep 'git-svn' > /dev/null
if [ $? = 0 ]; then
GIT_SVN=1
#!/usr/bin/env ruby
require 'rubygems'
require 'mechanize'
MY_NAME = 'Yossef Mendelssohn'
CHECKIN_REQUEST_URL = 'http://www.southwest.com/flight/retrieveCheckinDoc.html'
prompt = false
conf = ARGV[0]
def pick(n, x)
raise "impossible" if x > n
return [n] if x == 1
return [1] * x if x == n
choice = rand(n-x+1)
[ choice + 1 ] + pick(n - choice - 1, x - 1)
end
require 'spec/runner/formatter/progress_bar_formatter'
class NescafeFormatter < Spec::Runner::Formatter::ProgressBarFormatter
def example_failed(example, counter, failure)
super
dump_failure(counter, failure)
end
end

Writing Commit Messages

One line summary (< 50c)

Longer description (wrap at 72c)

Summary

$('div.message').html(function(index, oldhtml) {
return oldhtml.replace(/Removing/,'Fucking')
});
require "stateful"
class Folder < ActiveRecord::Base
include Stateful
# ...
stateful do
state :active
state :inactive
#!/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'
@vinbarnes
vinbarnes / baltimore_hipster_guide.mdown
Created May 15, 2011 19:09 — forked from pjb3/baltimore_hipster_guide.mdown
Hipster's Guide to Baltimore by @bmuller

Food

  • Little Italy has a number of great places (I think Amicci's has the best happy hour) and is accessible by the circulator's Orange Line.
  • Best pizza/risotto is Joe Squared on North Ave (purple line accessible).
  • Best Mexican is La Guadalupana on 500 South Wolfe Street (Orange/Green route will get you there). You will need to know some basic Spanish to order there, but the food is amazing.
  • Best odd assortment of random food is Lexington Market, the longest running market in the world(according to Wikipedia). It's accessible by heading north on the light rail and then walking West and would be good for lunch one day.
  • Best fancy food is Woodberry Kitchen, which is light rail accessible.
  • Best late night food is Never on Sunday on N Charles across the street from Helmand, which is open until 3:30am.
  • Best sushi is an easy pick - Kiku (1017 Light Street). It's a literal Mom and Pop operation with an amazing chirashi.