This file contains hidden or 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
Macbook:vagrant_example (master) $ time vagrant up | |
[default] Provisioning enabled with chef_solo... | |
[default] Box base was not found. Fetching box from specified URL... | |
[default] Downloading with Vagrant::Downloaders::HTTP... | |
[default] Downloading box: http://files.vagrantup.com/lucid32.box | |
[default] Extracting box... | |
[default] Verifying box... | |
[default] Cleaning up downloaded box... | |
[default] Importing base box 'base'... | |
[default] Matching MAC address for NAT networking... |
This file contains hidden or 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
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
# follow instructions | |
rvm install ree | |
rvm use ree | |
git clone https://github.com/mitchellh/vagrant.git | |
cd vagrant | |
gem install bundler | |
git checkout 77a1b9a6efe4f5cdc993 |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'httparty' | |
require 'json' | |
# Get one at https://code.google.com/apis/console/b/0 | |
GOOGLE_TRANSLATE_KEY = "" | |
def translate_to_en(text) | |
JSON.parse(HTTParty.get("https://www.googleapis.com/language/translate/v2?key=#{GOOGLE_TRANSLATE_KEY}&q=#{URI.encode(text)}%20d%C3%A5&source=fi&target=en", :format => 'text').to_s)["data"]["translations"][0]["translatedText"] |
This file contains hidden or 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
upload_gem: scp pkg/GEM_FILE user@public_host:/var/www/testbot | |
update_server: ssh user@server 'wget -q http://public_host/testbot/GEM_FILE && gem install GEM_FILE --no-ri --no-rdoc && rm GEM_FILE' | |
restart_server: ssh user@server 'testbot --server stop; testbot --server start' | |
#### To use development versions the runners should be started like this: #### | |
testbot --runner --connect ... --auto_update --dev_gem_root http://public_host/testbot |
This file contains hidden or 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
macbook:bb (master) $ time ../bin/testbot_cloud start | |
Starting 5 runners... | |
srv-hfme2 is being created... | |
srv-tigqo is being created... | |
srv-aap3y is being created... | |
srv-u61ix is being created... | |
srv-tigqo is up, installing testbot... | |
srv-u61ix is up, installing testbot... | |
srv-tigqo ssh connection failed, retrying... | |
srv-tigqo ssh connection failed, retrying... |
This file contains hidden or 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
div.input { | |
background-color: #555 !important; | |
border-top: 1px solid #aaa !important; | |
} | |
.topic_container { | |
background-color: #222 !important; | |
color: #aaa !important; | |
} |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'xmpp4r' | |
require 'xmpp4r/muc/helper/simplemucclient' | |
# Most of this is borrowed from https://gist.github.com/941931 | |
# Added support for multiple rooms and external handling of messages. | |
# We want the MUC functionality to just handle shit for us. Unfortunately we | |
# have to override/repeat the join method in order to add the directive that |
This file contains hidden or 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
# config = .. | |
datacenter = VmwareDataCenter.new(config) | |
datacenter.create_vm(:name => "ServerName", :cpus => 1, :memory => 512, :disk => 5000, | |
:datastore => "VolumeName", :install_identifier_mac => "some mac addr", | |
:install_pxe_network_name => "network to look for pxe server on") | |
# server cookbook https://github.com/joakimk/cookbooks/tree/master/pxe_install_server |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'pivotal-tracker' | |
class String | |
ANSI_COLORS = [:black, :red, :green, :yellow, :blue, :magenta, :cyan, :white] | |
def colorize(color) | |
num = ANSI_COLORS.index(color) or raise("Bad color #{ color }") | |
"\e[3#{ num }m" + self + "\e[0m" |
This file contains hidden or 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
The two rubies: | |
- 1.9.2 "ruby-1.9.2-p180-patched" (using https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch) | |
- 1.9.3 "ruby-1.9.3-preview1" | |
The app: | |
- Rails 3.1rc4 app with some scaffolds. | |
Results: | |
Ruby: Rails environment load time: Full spec suite: Unit tests: |