Skip to content

Instantly share code, notes, and snippets.

View boffbowsh's full-sized avatar

Paul Bowsher boffbowsh

View GitHub Profile
var _ = require("underscore");
var Queue = module.exports = function() {
this._queue = new Array();
this._waitingWorkers = new Array();
}
_.extend(Queue.prototype, {
clear: function() {
this._queue = new Array();
vagrant@vagrant-ubuntu-raring-64:~/docker/bin$ docker build < ./test
FROM ubuntu
RUN echo foo > bar
===> 546120c83189
FROM ubuntu
RUN echo moo > oink
===> fc5b04ef9d84
Build finished. image id: fc5b04ef9d84
fc5b04ef9d84
vagrant@vagrant-ubuntu-raring-64:~/docker/bin$ docker build < ~/griddle/nginx/test
vagrant@vagrant-ubuntu-raring-64:~/griddle/nginx$ cat test
FROM ubuntu
RUN echo foo > bar
FROM ubuntu
RUN echo moo > oink
vagrant@vagrant-ubuntu-raring-64:~/griddle/nginx$ docker build < test
FROM ubuntu
RUN echo foo > bar
===> d4afcc24d3b7
FROM ubuntu
Fletcher Sleepstake
Zara 12:45
Sarah 10:30
Ross M 11:35
Bowsh 10:50
Chris 9:45
Mark s 1:30
Helen 12:00
Oli 12:15 
Adam 10:34
boffbowsh@phobos$ traceroute s.wldcdn.net
traceroute: Warning: s.wldcdn.net has multiple addresses; using 87.248.210.253
traceroute to gpersonal.vo.llnwd.net (87.248.210.253), 64 hops max, 52 byte packets
1 hsrp2-vlan98.ixnlon.as35028.net (85.236.98.253) 0.419 ms 0.244 ms 0.255 ms
2 tge2-3.fr4.lon.llnw.net (195.66.226.133) 5.540 ms 0.346 ms 0.422 ms
3 tge2-2.fr3.lon.llnw.net (69.28.171.137) 3.647 ms 0.525 ms 7.300 ms
4 cdn-87-248-210-253.lon.llnw.net (87.248.210.253) 0.575 ms 0.534 ms 0.431 ms
5 * * *
@boffbowsh
boffbowsh / extract_fixtures.rake
Created March 9, 2012 09:27
Use FIXTURES=table_1,table_2 if you want to specify
desc 'Create YAML test fixtures from data in an existing database.
Defaults to development database. Set RAILS_ENV to override.'
namespace :db do
namespace :fixtures do
task :extract => :environment do
sql = "SELECT * FROM %s"
skip_tables = ["schema_migrations"]
ActiveRecord::Base.establish_connection
if ENV["FIXTURES"]
tables = ENV["FIXTURES"].split(",")
class MyModel < ActiveRecord::Base
# column :file
def file= contents
Redis[(key = generate_key)] = contents
write_attribute(:file, key)
end
def file
@boffbowsh
boffbowsh / gist:1665831
Created January 23, 2012 22:21
WTFRuby
1.9.3p0 :001 > case nil.class
1.9.3p0 :002?> when NilClass
1.9.3p0 :003?> p 'yay'
1.9.3p0 :004?> else
1.9.3p0 :005 > p 'wtf'
1.9.3p0 :006?> end
"wtf"
=> "wtf"
1.9.3p0 :007 > nil.class
=> NilClass
@boffbowsh
boffbowsh / penfold_order_scenarios.txt
Created August 24, 2011 13:38
Penfold Order scenarios
Order (new)
LineItems (all new)
Contact (new)
Contact (existing)
changed
no Account
Account (new)
Account (existing)
changed
unchanged
#!/bin/bash
echo
echo
echo
echo "APPLETV SCRIPT DETAILS:"