Skip to content

Instantly share code, notes, and snippets.

Vagrant::Config.run do |config|
config.vm.provision SprinkleProvisioner
end
@heim
heim / configure.rb
Created April 7, 2011 11:01
Exercise solution
class Configuration
attr_accessor :tail_logs
attr_accessor :max_connections
attr_accessor :admin_password
def initialize
@app_server = AppServer.new
end
def app_server
def counter(start=0, increment=1)
start -=increment #not cheating
lambda do
start += increment
end
end
result = counter(0, 3)
puts result.call
#Why does this work:
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "vagrant_main"
end
#But not this:
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
class HelloWord {
void helloWord() {
System.out.println("Hello Word");
}
}
[2010-11-10 13:40:01] make
ld: warning: in main.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in dmydln.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in dmyencoding.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in dmyversion.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in miniprelude.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in array.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in bignum.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in class.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in compar.o, file was built for i386 which is not the architecture being linked (x86_64)
[2010-11-06 20:04:55] make
array.c: In function ‘ary_resize_capa’:
array.c:150: error: expected expression before ‘;’ token
array.c:151: error: expected expression before ‘;’ token
array.c:153: error: expected expression before ‘;’ token
array.c:153: error: expected expression before ‘;’ token
array.c:164: error: expected expression before ‘;’ token
array.c:170: error: expected expression before ‘;’ token
array.c: In function ‘ary_double_capa’:
array.c:179: error: expected expression before ‘;’ token
public function set model(value:DepositumOgHusleieModel):void {
var that:Object = this;
_model = value;
_model.addEventListener(DepositumOgHusleieModel.INNBETALING_SUCCESS_EVENT, function():void {
that.visible = false;
});
}
package no.frykt;
import java.util.Properties;
import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;
package no.frykt;
import java.util.Properties;
import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;