Skip to content

Instantly share code, notes, and snippets.

View nevans's full-sized avatar

nicholas a. evans nevans

View GitHub Profile
@rmoriz
rmoriz / install-ruby-debug-ruby-1.9.3.sh
Created November 29, 2011 02:17 — forked from hoverlover/install-ruby-debug-ruby-1.9.3.sh
ruby-debug in ruby-1.9.3 and rbenv
#!/bin/bash
cd /tmp
wget http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
wget http://rubyforge.org/frs/download.php/74596/ruby_core_source-0.1.5.gem
wget http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
wget http://rubyforge.org/frs/download.php/63094/ruby-debug19-0.11.6.gem
export RBENV_INCLUDE=$HOME/.rbenv/versions/1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0
gem install archive-tar-minitar
HAI
BTW Cheater's quine
I HAS A quine
GIMMEH LINEZ quine OUTTA "quine.lol"
I HAS A loop_max ITZ ALL quine
I HAS A loop_index ITZ 0
IM IN YR loop
IZ loop_index LIEK loop_max O RLY?
YA RLY
@pjb3
pjb3 / baltimore_hipster_guide.mdown
Created May 15, 2011 17:22
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.
@kbaum
kbaum / gist:892247
Created March 29, 2011 12:12
prune_workers_from_terminated_instance.rb
module Resque
def self.unregister_workers_for_host(host)
Resque.workers.select{|worker| worker.id.split(':').first==host}.each(&:unregister_worker)
end
end
Resque.unregister_workers_for_host("ip-10-250-192-51")
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
@bitbckt
bitbckt / resque.rb
Created January 20, 2010 21:32
munin plugin for resque
#!/usr/bin/env ruby
require 'rubygems'
require 'resque'
HOST = ENV['host'] ? ENV['host'] : '127.0.0.1'
PORT = ENV['port'] ? ENV['port'] : '6379'
Resque.redis = "#{HOST}:#{PORT}"