This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.
Save the Default.sublime-theme file into packages/user
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
var util = require('util') | |
function hook_stdout(callback) { | |
var old_write = process.stdout.write | |
process.stdout.write = (function(write) { | |
return function(string, encoding, fd) { | |
write.apply(process.stdout, arguments) | |
callback(string, encoding, fd) | |
} |
# Struct utilities | |
# Author:: Matt Sullivan (mailto:matt.j.sullivan@gmail.com) | |
# Attempt to require Ruby Gems; 1.8.X gem support only | |
begin | |
require 'rubygems' | |
rescue LoadError | |
# Ruby Gems not installed | |
end |
#Refer: http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Delaying_only_some_traffic | |
#Refer: http://www.bomisofmab.com/blog/?p=100 | |
#Refer: http://drija.com/linux/41983/simulating-a-low-bandwidth-high-latency-network-connection-on-linux/ | |
#Setup the rate control and delay | |
sudo tc qdisc add dev lo root handle 1: htb default 12 | |
sudo tc class add dev lo parent 1:1 classid 1:12 htb rate 56kbps ceil 128kbps | |
sudo tc qdisc add dev lo parent 1:12 netem delay 200ms | |
#Remove the rate control/delay | |
sudo tc qdisc del dev lo root |
If: | |
- you add and commit with the wrong email address in git, and | |
- your remote has a hook set up to prevent you from pushing with the bad address | |
Then you need to amend the author of your commit before push can succeed: | |
1. fix your email address in git config: | |
$ git config user.name "Your Name" |
-- PostgreSQL 9.2 beta (for the new JSON datatype) | |
-- You can actually use an earlier version and a TEXT type too | |
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8 | |
-- Inspired by | |
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html | |
-- http://ssql-pgaustin.herokuapp.com/#1 | |
-- JSON Types need to be mapped into corresponding PG types | |
-- |
if $('#my_div_in_complex_page').length > 0 | |
class Foo | |
... |
This post has sat as a draft on my computer for well over a year now. I always intended to finish it, but am beyond caring. So I’m just going to publish it in its current form in hopes that it sparks some interesting conversation and avoids beating a dead horse.
Cucumber is a divisive tool. Some people absolutely love it and have an irrational dedication to using it for every single project. Others hate it, either because they haven’t tried it, or tried it on one project and ended up with a steaming pile of sh…step definitions.
I’ve been using cucumber since one of the first few releases. While I have been burned by it on projects, I also have a great appreciation for it.
What’s wrong with cucumber? Technically, nothing. It’s a brilliant tool for creating DSLs to test our applications. The problem with cucumber is YOU: you don’t understand why to use it, when to use it or how to use it. Don’t worry, though, it’s not entirely your fault. Many people are responsible f