This serves as a base canary gist for @rwjblue.
A few useful links for the main source/gist are:
… | |
// hotfix sass sourcemaps | |
var appSassFiles = pickFiles('app', { | |
srcDir: '/styles', | |
destDir: '/assets/styles' | |
}); | |
var bootstrapSassFiles = pickFiles('bower_components/bootstrap-sass-official/assets/stylesheets', { | |
srcDir: 'bootstrap', | |
destDir: '/assets/styles/bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap' |
require 'rubygems' | |
require 'backports' # aliases Proc#=== to Proc#call | |
rs = (0..10000).to_a.sample(30) | |
rs.each do |r| | |
case r | |
when lambda { |n| n.zero? } then puts "#{r} is zero" | |
when lambda { |n| (n % 5).zero? } then puts "#{r} is fiven" | |
when lambda { |n| (n % 4).zero? } then puts "#{r} is fourven" |
$ ruby --version | |
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0] | |
$ time ruby -e "def foo(&block); block.call; end; 2_000_000.times{ foo{1+1} };" | |
real 0m1.556s | |
user 0m1.482s | |
sys 0m0.075s | |
$ time ruby -e "def foo; yield; end; 2_000_000.times{ foo{1+1} };" |
App.collectionController = Em.ArrayProxy.create(Ember.PaginationSupport, { | |
content: [], | |
fullContent: App.store.findAll(App.Job), | |
totalBinding: 'fullContent.length', | |
didRequestRange: function(rangeStart, rangeStop) { | |
var content = this.get('fullContent').slice(rangeStart, rangeStop); | |
this.replace(0, this.get('length'), content); | |
} | |
}); |
#!/bin/sh | |
bundle exec rspec -f d `git status | grep _spec | awk '{ print $NF }'` |
#!/usr/bin/env ruby | |
# | |
# Vagrant users are constantly switching between a local editor and a | |
# terminal into their VM to work on code then run the tests. | |
# | |
# This script (when used as a server) listens on a TCP port inside the | |
# VM for test commands to execute. The script (when used as a client) | |
# also handles sending the appropriate "run this test" command to that | |
# same port on the VM. | |
# |
# BASELINE STARTUP TIMES WITHOUT DRIP | |
system ~/projects/jruby $ jruby -v | |
jruby 1.7.1.dev (1.9.3p327) 2012-11-26 810defe on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [darwin-x86_64] | |
system ~/projects/jruby $ time jruby -e 1 | |
real 0m1.238s | |
user 0m1.985s | |
sys 0m0.091s |
This serves as a base canary gist for @rwjblue.
A few useful links for the main source/gist are:
class TestConnection | |
def repeat_test | |
while true do | |
if packet_loss > 0 | |
`say 'link down'` | |
end | |
end | |
end | |
def packet_loss |
source :rubygems | |
gem 'pry' | |
gem 'capybara' | |
gem 'capybara-webkit' | |
gem 'celluloid' |