Skip to content

Instantly share code, notes, and snippets.

1 10.96.32.3 (10.96.32.3) 0.386 ms 0.493 ms 0.519 ms
2 10.1.30.41 (10.1.30.41) 0.786 ms 0.774 ms 0.759 ms
3 10.1.19.14 (10.1.19.14) 0.519 ms 10.1.15.14 (10.1.15.14) 0.728 ms 0.724 ms
4 216.182.224.80 (216.182.224.80) 0.721 ms 216.182.224.82 (216.182.224.82) 0.697 ms 0.687 ms
5 205.251.245.64 (205.251.245.64) 0.827 ms 72.21.222.148 (72.21.222.148) 1.015 ms 205.251.245.64 (205.251.245.64) 1.047 ms
6 72.21.220.60 (72.21.220.60) 1.136 ms 1.136 ms 1.019 ms
7 207.46.37.6 (207.46.37.6) 1.458 ms 1.634 ms 1.408 ms
8 ge-5-0-0-0.ash-64cb-1b.ntwk.msn.net (207.46.40.171) 2.052 ms ge-3-3-0-0.ash-64cb-1a.ntwk.msn.net (207.46.40.169) 1.626 ms ge-5-0-0-0.ash-64cb-1b.ntwk.msn.net (207.46.40.171) 2.022 ms
9 xe-8-2-0-0.sn1-96cb-1b.ntwk.msn.net (207.46.46.181) 30.958 ms xe-8-3-0-0.sn1-96cb-1a.ntwk.msn.net (207.46.43.114) 30.953 ms 30.939 ms
10 ge-0-3-0-0.dal-64cb-1b.ntwk.msn.net (207.46.47.132) 31.608 ms 31.900 ms 31.885 ms
@biscuitvile
biscuitvile / .rspec
Created June 10, 2012 13:45 — forked from coreyhaines/.rspec
Loading just active record
--colour
-I app
@biscuitvile
biscuitvile / bowling.rb
Created June 26, 2012 15:27 — forked from steveklabnik/bowling.rb
Bowling kata
class Game
attr_reader :rolls
def initialize(rolls)
@rolls = rolls
end
def score
frames.inject(0) do |score, frame|
score += FrameScorer.new(frame).score
@biscuitvile
biscuitvile / Guardfile
Created July 27, 2012 01:34 — forked from okonet/Guardfile
Example of a Guardfile
guard 'coffeescript', :input => 'app', :output => 'public/javascripts/app', :cli => ''
guard 'coffeescript', :input => 'spec/coffeescripts', :output => 'spec/javascripts'
guard 'compass' do
watch(/app\/stylesheets\/(.*)\.s[ac]ss/)
end
spec_location = "spec/coffeescripts/%s_spec"
guard 'jasmine-headless-webkit' do
watch(%r{^spec/coffeescripts/(.*)_spec\..*}) { |m| newest_js_file(spec_location % m[1]) }
@biscuitvile
biscuitvile / split_keep.rb
Created July 28, 2012 16:50
Playing with a String extension 'split_keep' for Taskdown format
class String
def split_keep(regex)
return self unless match(regex)
segments = split(regex)
delimiters = scan(regex)
counter = 0
segments.each do |segment|
unless segment == segments.first
@biscuitvile
biscuitvile / foo_controller.rb
Created August 6, 2012 13:28 — forked from lloeki/foo_controller.rb
Streaming (CSV) data in Rails 3.2
class FooController
respond_to :csv
def index
@foos = Foo.scoped
if stale?(:last_modified => Foo.something)
respond_with @gta do |format|
format.csv { stream_csv @foo }
end
end
@biscuitvile
biscuitvile / dirty-buxin.txt
Created October 11, 2012 03:09
Turbux and Dirty
Turbux
https://github.com/jgdavey/vim-turbux
http://vimeo.com/34879707
Dirty
https://github.com/rbxbx/dirty
Combine for more power!
map <silent> <leader>s :call Send_to_Tmux("dirty spec\n")<CR>
@biscuitvile
biscuitvile / shorter_backtraces.rb
Created October 29, 2012 14:51
Shorter RSpec backtraces
RSpec.configure do |config|
# RSpec automatically cleans stuff out of backtraces;
# sometimes this is annoying when trying to debug something e.g. a gem
config.backtrace_clean_patterns = [
/\/lib\d*\/ruby\//,
/bin\//,
/gems/,
/spec\/spec_helper\.rb/,
/lib\/rspec\/(core|expectations|matchers|mocks)/
]
@biscuitvile
biscuitvile / deploy.rb
Created November 5, 2012 21:45
deployment on ec2
# Multi-stage deployment
set :stages, %w(staging production)
require 'capistrano/ext/multistage'
# RVM bootstrap
$:.unshift(File.expand_path("~/.rvm/lib"))
require 'rvm/capistrano'
set :rvm_ruby_string, '1.9.2-p290@example'
set :rvm_type, :user
@biscuitvile
biscuitvile / acceptance_helper.rb
Created November 10, 2012 23:26 — forked from guilleiguaran/acceptance_helper.rb
RSpec+Capybara acceptance test example
# acceptance/acceptance_helper.rb
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
# Put your acceptance spec helpers inside /spec/acceptance/support
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}