Skip to content

Instantly share code, notes, and snippets.

View rkh's full-sized avatar
👀
heeeyyyy

Konstantin Haase rkh

👀
heeeyyyy
View GitHub Profile

Building MLVM version of OpenJDK (Java 1.7) on Mac OS X

Take a look at the comments and code in update.sh.

I use update-usr-local.sh after a successful build to copy the new JVM into /usr/local.

I add pickjdk.sh into my ~/.bash_profile to allow easy switching between multiple JVMs.

I use create_tarball.sh to make a copy of the build to share.

# Example of the implementation
class Template
module CompileSite; end
if RUBY_VERSION < '1.9'
def compile(klass, name, source)
klass.class_eval <<-RUBY
::Template::CompileSite.class_eval do
def #{name}(locals)
select
yearweek(field, 1)
from
table;
require 'geoip'
module Rack
# Rack::GeoIPCountry uses the geoip gem and the GeoIP database to lookup the country of a request by its IP address
# The database can be downloaded from:
# http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
#
# Usage:
# use Rack::GeoIPCountry, :db => "path/to/GeoIP.dat"
#