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
test: | |
[junit] Running com.kenai.jffi.ClosureTest | |
[junit] Tests run: 35, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.424 sec | |
[junit] Running com.kenai.jffi.ForeignTest | |
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.438 sec | |
[junit] Running com.kenai.jffi.InvokerTest | |
[junit] Tests run: 13, Failures: 12, Errors: 0, Skipped: 0, Time elapsed: 0.678 sec | |
[junit] Test com.kenai.jffi.InvokerTest FAILED | |
[junit] Running com.kenai.jffi.JSR292Test | |
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.723 sec |
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
source "https://rubygems.org" | |
gem "protobuf" |
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
input { stdin {} } | |
filter {} | |
output { | |
stdout { | |
codec => rubydebug | |
} | |
} |
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
# encoding: utf-8 | |
puts "\nusing #{RUBY_DESCRIPTION}" | |
puts '"123"' + "\t\t=> " + "123".encoding.to_s | |
puts '"#{123}"' + "\t=> " + "#{123}".encoding.to_s | |
puts '"#{123.to_s}"' + "\t=> " + "#{123.to_s}".encoding.to_s | |
puts '123.to_s' + "\t=> " + 123.to_s.encoding.to_s |
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
FROM colinsurprenant/ubuntu-raring-amd64:latest | |
MAINTAINER Colin Surprenant <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update; apt-get upgrade -y; apt-get install -y git-core wget curl build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev libgdbm-dev libffi-dev libxml2-dev libxslt1-dev libncurses5-dev libfuse2 | |
# Fake a fuse install for openjdk-7 - see https://github.com/dotcloud/docker/issues/514 | |
RUN (cd /tmp ; apt-get download fuse; dpkg-deb -x fuse_* .; dpkg-deb -e fuse_*; rm fuse_*.deb; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst; dpkg-deb -b . /fuse.deb; dpkg -i /fuse.deb) |
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.configure("2") do |config| | |
config.ssh.forward_agent = true | |
config.vm.synced_folder "./", "/vagrant", :disabled => true | |
# AWS EC2 config | |
# | |
# $ vagrant up ec2 --provider=aws | |
# | |
# - make sure you correctly configure your AWS settings below |
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
# remove stopped containers | |
docker rm $(docker ps -a -q) | |
# remove untagged images | |
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") |
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
module SomeModule | |
module_function | |
def some_value; @some_value end | |
def some_value= v; @some_value = v end | |
end | |
SomeModule.some_value | |
# => nil | |
SomeModule.some_value = 1 | |
SomeModule.some_value |
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
require 'java' | |
require 'benchmark' | |
java_import "java.util.Comparator" | |
java_import "java.util.Collections" | |
# dummy Comparable object | |
class O | |
include Comparable | |
attr_reader :id | |
def initialize(id); @id = id; end |
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
sudo debootstrap raring raring > /dev/null | |
cd raring | |
# prevent init scripts from running during install/update | |
echo $'#!/bin/sh\nexit 101' | sudo tee usr/sbin/policy-rc.d > /dev/null | |
# see https://github.com/dotcloud/docker/issues/446#issuecomment-16953173 | |
sudo chmod +x usr/sbin/policy-rc.d | |
# shrink the image |