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
require 'webrick' | |
include WEBrick # let's import the namespace so | |
# I don't have to keep typing | |
# WEBrick:: in this documentation. | |
def start_webrick(config = {}) | |
# always listen on port 8080 | |
config.update(:Port => 8080) | |
server = HTTPServer.new(config) |
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
//Example about Java's BigDecimals | |
BigDecimal vat = new BigDecimal("23"); | |
BigDecimal price = new BigDecimal("200"); | |
BigDecimal h = new BigDecimal("100"); | |
price.multiply(vat.divide(h)).add(price); |
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
Vagrant::Config.run do |config| | |
config.vm.box = "oneiric64" | |
config.vm.forward_port "http", 3000, 5000 | |
config.vm.provision :puppet do |puppet| | |
puppet.manifests_path = "puppetmanifests" | |
puppet.manifest_file = "oneiric64.pp" | |
puppet.module_path = "puppetmodules" | |
end |
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
# >---------------------------------------------------------------------------< | |
# | |
# _____ _ _ __ ___ _ | |
# | __ \ (_) | \ \ / (_) | | | |
# | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| | | |
# | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` | | |
# | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| | | |
# |_| \_\__,_|_|_|___/ \/ \/ |_/___\__,_|_| \__,_| | |
# | |
# This template was generated by rails_apps_composer, a custom version of |
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
require "rubygems" | |
require "mongoid" | |
require "test/unit" | |
Mongoid.configure do |config| | |
name = "ref_test" | |
config.master = Mongo::Connection.new.db(name) | |
config.logger = nil | |
end |
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
^[]2;[zsh] MLeMBP::/Users/milep^GTime: 16:31 up 2 days, 19:18, 5 users, load averages: 0.05 0.19 0.26 | |
MLeMBP.local::/Users/milep | |
Initializing zsh version number 4.3.9 | |
^[]2;[zsh] MLeMBP::/Users/milep^Gzsh-% ls | |
^[]2; ls ^GDesktop Downloads Library Music Public apps projects | |
Documents Dropbox Movies Pictures Sites dev scripts | |
^[]2;[zsh] MLeMBP::/Users/milep^Gzsh-% |
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
... |
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
% jruby -v | |
jruby 1.4.0RC1 (ruby 1.8.7 patchlevel 174) (2009-09-30 80c263b) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java] | |
% jruby script/console | |
Loading development environment (Rails 2.3.4) | |
/Users/milep/projects/eebu/src/eebu/vendor/gems/image_voodoo-0.6/lib/image_voodoo/awt.rb:15:in `to_java':TypeError: too big for signed byte: 253 | |
>> |
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
package jabber; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import org.jivesoftware.smack.ConnectionConfiguration; | |
import org.jivesoftware.smack.SASLAuthentication; | |
import org.jivesoftware.smack.XMPPConnection; | |
import org.jivesoftware.smack.XMPPException; | |
public class Main { |