View ...headless.rb
vm.customize do |cvm|
cvm.memory_size = 1024
cvm.vram_size = 12
cvm.cpu_count = 2
cvm.accelerate_3d_enabled = false
cvm.accelerate_2d_video_enabled = false
cvm.monitor_count = 1
cvm.bios.acpi_enabled = true
cvm.bios.io_apic_enabled = false
View install.sh
#!/usr/bin/env bash
export TMUX_INSTALL_VERSION=1.6
wget -q -O - "https://gist.github.com/raw/4561674/install_tmux_${TMUX_INSTALL_VERSION}_on_ubuntu_10.04.sh" | sudo bash
View traceroute.txt
Every 0.1s: traceroute www.cookbooks.io. Fri Jan 4 12:45:35 2013
traceroute to www.cookbooks.io. (54.240.176.220), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 2.170 ms 2.693 ms 3.721 ms
2 10.1.1.1 (10.1.1.1) 3.922 ms 4.627 ms 4.852 ms
3 nexthop.nsw.iinet.net.au (203.215.19.247) 19.622 ms 19.895 ms 21.551 ms
4 te1-1.syd-mas-bdr2.iinet.net.au (203.215.18.20) 22.949 ms te1-1.syd-mas-bdr1.iinet.net.au (203.215.18.18) 27.372 ms 27.608 ms
5 xe-1-1-0-0.syd-mas-core1.iinet.net.au (203.215.20.94) 28.053 ms 29.516 ms te1-2.syd-mas-bdr1.iinet.net.au (203.215.20.153) 31.803 ms
6 xe-1-1-0-0.syd-mas-core1.iinet.net.au (203.215.20.94) 32.698 ms te7-0-0.bdr1.syd4.internode.on.net (150.101.197.189) 19.010 ms xe-1-1-0-0.syd-mas-core1.iinet.net.au (203.215.20.94) 71.439 ms
7 gi7-0-0-100.bdr1.syd4.internode.on.net (150.101.197.153) 18.504 ms 21.391 ms 22.368 ms
View config
BUNDLE_BIN: .bundle/bin
BUNDLE_SHEBANG: ruby-local-exec
BUNDLE_DISABLE_SHARED_GEMS: '1'
BUNDLE_PATH: vendor
View gist:4239151
# This is a code example for the Ruby HTTP library Typhoeus
# here's an example for twitter search
# Including Typhoeus adds http methods like get, put, post, and delete.
# What's more interesting though is the stuff to build up what I call
# remote_methods.
class Twitter
include Typhoeus
remote_defaults :on_success => lambda {|response| JSON.parse(response.body)},
:on_failure => lambda {|response| puts "error code: #{response.code}"},
View temporary_dsl.rb
# An unintrusive, temporary DSL strategy.
#
# Why discusses Ruby DSLs and instance_eval vs. block arguments:
# http://hackety.org/2008/10/06/mixingOurWayOutOfInstanceEval.html
#
# This takes advantage of some Ruby 1.9 features to implement a DSL mixin that
# is temporary and doesn't override locally defined methods.
class DslInstance
attr_accessor :script
View failing_any_instance_spec.rb
class ::Cli
def start
::Api.new(self)
end
end
class ::Api
end
describe ::Cli do
View happy-birthday-taqtiqa.txt
Happy Birthday to you.
Happy Birthday to you.
Happy Birthday dear TAQTIQA.
Happy Birthday to you!