Skip to content

Instantly share code, notes, and snippets.

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

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

Requires a working version of Java 1.8.

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

OpenJDK 1.7 builds for Mac OS X:

require 'rubygems'
require 'mechanize'
require 'httparty'
# Ugly code, for an ugly hack.
# Hey, if Lighthouse didn't suck then none of this would happen.
# It's been lotsa fun coding it though, so I suppose I should be thankful for the "opportunity"
@nahi
nahi / gist:1029091
Created June 16, 2011 11:57
AES-256-CBC encryption/decryption w/o using JCE on JRuby
# Java's JCE requires extra JVM config download named Jurisdiction Policy Files where AES keysize > 128bit.
# You can do encrypt/decrypt using BouncyCastle via JRuby's Java integration like this.
# Use this at your own risk.
require 'java'
require 'openssl'
java_import 'org.bouncycastle.crypto.BlockCipher'
java_import 'org.bouncycastle.crypto.engines.AESLightEngine'
java_import 'org.bouncycastle.crypto.modes.CBCBlockCipher'
@qmx
qmx / gist:1407191
Created November 29, 2011 23:43 — forked from anonymous/gist:1406238
yammer moving away from scala
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
require 'benchmark'
require 'time'
string = "2010-11-10 23:00:00 UTC"
n = 100_000
(ARGV[0] || 5).to_i.times do
Benchmark.bm(20) do |b|
b.report 'Time.parse' do
n.times do
@gleicon
gleicon / base_62.rb
Created March 26, 2012 14:44
base 62 encoding in ruby
ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
def base62_encode(num, alphabet=ALPHABET)
return alphabet[0] if num == 0
arr = []
base = alphabet.size
while num > 0 do
rem = num % base
num = num / base
arr << alphabet[rem]
@owenthereal
owenthereal / run-test262-nailgun.sh
Created October 17, 2012 03:21
Run ecmascript test262 suite for Dynjs with nailgun
#!/bin/sh
# Usage:
#
# * copy this file to the test262 folder
# * start nailgun server with `ng-server`
# * run suite with `sh run-test262-nailgun.sh <dynjs-folder>`
if [ $# = 0 ]
then
@maxandersen
maxandersen / archive.lua
Created March 3, 2013 18:54
somewhat complete archiving mails per quarter
archiveblocks = {
Q1 = { '01-Jan', '31-Mar' },
Q2 = { '01-Apr', '30-Jun' },
Q3 = { '01-Jul', '30-Sep' },
Q4 = { '01-Oct', '31-Dec' }
}
function archive(startyear, endyear, mailbox, account)
if (mailbox=='INBOX/_inbox') then return end
print('Archiving ' .. mailbox .. ' from ' .. startyear .. ' ' .. endyear)
@luke
luke / migrate_zerigo_to_route53.py
Last active February 6, 2016 19:44
Migration script for moving from Zerigo DNS to Amazon Route 53.
import logging
import zerigodns
import boto
from boto.route53.record import ResourceRecordSets
from boto.s3.website import RedirectLocation
# There is no API for these so we have to embed and lookup
# https://forums.aws.amazon.com/thread.jspa?threadID=116724
# http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
@mnicky
mnicky / clojure-blip-videos-orig-urls.txt
Created December 14, 2012 11:30
Direct links to Clojure videos on Blip TV
http://blip.tv/file/get/Richhickey-ClojureDataStructuresPart1411.flv
http://blip.tv/file/get/Richhickey-ClojureDataStructuresPart2306.flv
http://blip.tv/file/get/Richhickey-ClojureSequences733.flv
http://blip.tv/file/get/Richhickey-ClojureConcurrency252.flv
http://blip.tv/file/get/Richhickey-ClojureForJavaProgrammers2Of2680.mov
http://blip.tv/file/get/Richhickey-ClojureForJavaProgrammers1Of2174.flv
http://blip.tv/file/get/Richhickey-ClojureForLispProgrammersPart2299.mov
http://blip.tv/file/get/Richhickey-ClojureForLispProgrammersPart1372.flv
http://blip.tv/file/get/Richhickey-HammockdrivenDevelopment465.mov
http://blip.tv/file/get/Richhickey-MichaelFogusFertileGroundTheRootsOfClojure492.mov