This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
affinity: rvm-exec 1.9.2@affinity env RACK_ENV=vanity_test BUNDLE_GEMFILE=./spec/services/affinity/Gemfile bundle exec thin start -c ./spec/services/affinity/ -p 5000 | |
activity: rvm-exec 1.9.2@activity env RACK_ENV=vanity_test BUNDLE_GEMFILE=./spec/services/activity/Gemfile bundle exec thin start -c ./spec/services/activity/ -p 4000 | |
humanity: rvm-exec 1.9.2@humanity env RACK_ENV=vanity_test BUNDLE_GEMFILE=./spec/services/humanity/Gemfile bundle exec thin start -c ./spec/services/humanity/ -p 4100 | |
publicity: rvm-exec 1.9.2@publicity env RACK_ENV=vanity_test BUNDLE_GEMFILE=./spec/services/publicity/Gemfile bundle exec thin start -c ./spec/services/publicity/ -p 4200 | |
sanity: rvm-exec 1.9.2@sanity env RACK_ENV=vanity_test BUNDLE_GEMFILE=./spec/services/sanity/Gemfile bundle exec thin start -c ../sanity/ -p 4500 | |
tenacity: rvm-exec 1.9.2@tenacity env RACK_ENV=vanity_test BUNDLE_GEMFILE=./spec/services/tenacity/Gemfile bundle exec thin start -c ./spec/services/tenacity/ -p 4300 | |
visibility: rvm-exec 1.9. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Hello World server | |
* Binds REP socket to tcp://*:5555 | |
* Expects "Hello" from client, replies with "World" | |
* @author Ian Barber <ian(dot)barber(at)gmail(dot)com> | |
*/ | |
$context = new ZMQContext(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function swap(array, left, right) { | |
let c1 = array[left]; | |
let c2 = array[right]; | |
array[left] = c2; | |
array[right] = c1; | |
return array | |
} | |
function permute(string, index=0) { | |
// we have finished permuting the string, return the string so it can be added to the list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec' | |
def flatten(array) | |
ret = [] | |
array.each do |i| | |
if i.is_a?(Array) | |
ret += flatten(i) | |
next | |
end | |
ret << i | |
end |