Skip to content

Instantly share code, notes, and snippets.

View dexterous's full-sized avatar

Saager Mhatre dexterous

View GitHub Profile
// We're going to pick on Mad Service today. If you had a hand in writing this once upon a time, do not fret.
// This isn't accusation or finger-poiniting -- I see everyone's name all over this code, including my own, which
// makes it a nice target.
// This code just needs some tenderness. Let's cook it a hot bowl of soup and play some soft Jazz.
require 'fileutils'
require 'active_support'
require 'commands/servers/base'
puts "=> Ctrl-C to shutdown listener"
tail_thread = tail(Pathname.new("#{File.expand_path(RAILS_ROOT)}/log/#{RAILS_ENV}.log").cleanpath)
trap(:INT) { exit }
require 'rubygems'
require 'rspec'
describe 'Int with scope' do
class Ooga
def initialize
@bar = 'woot'
end
@kaiwren
kaiwren / quote.txt
Created October 30, 2010 19:16
Managers, management, churches and religion.
The first myth of management is that it exists. Managers are to management as churches are to religion.
@kaiwren
kaiwren / js_route.js
Created January 31, 2011 15:50
js routes from ruby routes
FooNamespace.Routes = {
myResourcePath: function(){ return '<%= my_resource_path(:format => 'json') %>' }
}
@nutrun
nutrun / earl.rb
Created March 3, 2011 02:49
Ruby strings that do web things
# Earl: Strings that do web things
#
#
# Examples:
#
# text = "Blah blah http://tinyurl.com/4bnjzbu blah http://tinyurl.com/4tefu9f"
#
# text.urls # => ["http://tinyurl.com/4bnjzbu", "http://tinyurl.com/4tefu9f"]
#
# text.locations # => ["http://nutrun.com/weblog/2010/11/17/supercharged-ruby-console-output.html", "http://nutrun.com"]
@kaiwren
kaiwren / gist:957742
Created May 5, 2011 19:41
Quote from the Buddha

From http://everything2.com/title/nontheist

The Buddha is the first historically known nontheist. Most Buddhists are nontheist.

The Buddha was often asked whether God existed. Usually, he replied with a complete silence. Once, however, he told the story of the man shot by a poisoned arrow.

When the doctor came and wanted to pull the arrow out of the wound, the man grabbed the doctor's hand and asked:

"Before you start treating me, Doctor, tell me, who was it that shot me? Was he of warrior class or some other class? Was he tall or was he short? Was he young or was he old? Was he dark skinned or light skinned?"

@dexterous
dexterous / shit_error.js
Created July 29, 2011 11:16
The (ho|e)rror!
// if you're going to send back...
{
'status' : 'Failure',
'message' : 'Resource creation failed',
'errors' : ['Problems creating resource in the system']
}
// ... you might as well just save everyone the trouble and send back...
{ 'shit happened': true }
@jasonrudolph
jasonrudolph / about.md
Last active January 6, 2024 07:40
Programming Achievements: How to Level Up as a Developer
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade