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
[default] Deleting any previously set forwarded ports... | |
/Library/Ruby/Gems/1.8/gems/virtualbox-0.7.1/lib/virtualbox/abstract_model/dirty.rb:172:in `method_missing': undefined method `nat_driver' for #<VirtualBox::NetworkAdapter:0x1dc10d0> (NoMethodError) | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/actions/vm/forward_ports.rb:117:in `clear_ports' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/actions/vm/forward_ports.rb:116:in `each' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/actions/vm/forward_ports.rb:116:in `clear_ports' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/actions/vm/forward_ports.rb:60:in `clear' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/actions/vm/forward_ports.rb:53:in `execute!' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/actions/runner.rb:85:in `send' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/actions/runne |
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
[default] Creating VM 'default' | |
[default] Importing base VM (/Users/ikallen/.vagrant/boxes/ubuntu10.04/box.ovf)... | |
[default] Persisting the VM UUID (01d258dc-7865-41b7-8566-6d5de86f12d9)... | |
[default] Matching MAC addresses... | |
[default] Deleting any previously set forwarded ports... | |
[default] Forwarding ports... | |
[default] Forwarding "ssh": 22 on adapter #1 => 2222 | |
[default] Creating shared folders metadata... | |
[default] Booting VM... | |
[default] Waiting for VM to boot... |
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
$ vagrant ssh | |
/Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/version_matcher.rb:28:in `split_version': private method `split' called for nil:NilClass (NoMethodError) | |
from /Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/version_matcher.rb:18:in `version_match?' | |
from /Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/version_matcher.rb:7:in `assert_version_match' | |
from /Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/relatable.rb:189:in `read_relationship' | |
from /Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/relatable.rb:146:in `nat_driver' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/ssh.rb:137:in `port' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/ssh.rb:136:in `each' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/ssh.rb:136:in `port' | |
from /Librar |
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
<?xml version="1.0"?> | |
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.10-macosx"> | |
<Machine uuid="{70347077-b7ca-4d2f-9e4a-3f8e48a020cf}" name="Ubuntu 10.04 Lucid Lynx Server amd64_1" OSType="Ubuntu_64" lastStateChange="2010-06-21T03:33:22Z"> | |
<Hardware version="2"> | |
<CPU count="1" hotplug="false"> | |
<HardwareVirtEx enabled="true" exclusive="false"/> | |
<HardwareVirtExNestedPaging enabled="true"/> | |
<HardwareVirtExVPID enabled="true"/> | |
<PAE enabled="false"/> | |
</CPU> |
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
/Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/version_matcher.rb:9:in `assert_version_match': Required version: 3.2; Current: (VirtualBox::Exceptions::UnsupportedVersionException) | |
from /Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/relatable.rb:189:in `read_relationship' | |
from /Library/Ruby/Gems/1.8/gems/virtualbox-0.7.3.dev/lib/virtualbox/abstract_model/relatable.rb:146:in `nat_driver' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/ssh.rb:137:in `port' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/ssh.rb:136:in `each' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/ssh.rb:136:in `port' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/ssh.rb:38:in `connect' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/commands/ssh.rb:62:in `ssh_connect' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.4.2.dev/lib/vagrant/comma |
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
import scala.runtime.RichLong | |
def seconds = new RichLong(System.currentTimeMillis()/1000) | |
var now = seconds | |
var later = seconds | |
// error: value to is not a member of scala.runtime.RichLong | |
now to later | |
// UPDATE: this was caused by writing code against the 2.8 docs but running | |
// against 2.7.7 ! It would be nice if the docs mentioned which version a new | |
// method was introduced in ;) |
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
~ $ mv Vagrantfile vm-workspace/ | |
~ $ cd !$ | |
cd vm-workspace/ | |
~/vm-workspace $ vagrant up | |
[default] Importing base box 'api-v1.0'... | |
[default] Matching MAC address for NAT networking... | |
[default] Clearing any previously set forwarded ports... | |
[default] Forwarding ports... | |
[default] -- 22 => 2222 (adapter 1) | |
[default] Creating shared folders metadata... |
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
class WtfException(Exception): | |
pass | |
class AdaptiveResponse(object): | |
def __init__(self, params, message): | |
self.params = params | |
self.message = message | |
def __repr__(self): |
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
hard_timelimit = 30 | |
def fetch(url, timelimit=10) | |
old_timeout = socket.getdefaulttimeout() | |
if old_timeout == 0: | |
# we *never* want a hang-forever socket connections | |
old_timeout = hard_timelimit | |
socket.setdefaulttimeout(timelimit) | |
# do shit with urllib2 (build a request with Accept headers, deal transient error retries, etc) | |
# note that urlopen also takes a timeout param |
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
import logging, sys, traceback | |
from stuff import DoStuff | |
try: | |
DoStuff.shit_can_happen() | |
except ShitHappens, e: | |
exc_type, exc_value, exc_traceback = sys.exc_info() | |
stacktrace = "".join(traceback.format_exception(exc_type, exc_value, exc_traceback)) | |
logger.debug(stacktrace) |