Skip to content

Instantly share code, notes, and snippets.

View sainnr's full-sized avatar

Vladimir Salin sainnr

View GitHub Profile
@delitescere
delitescere / bootstrap.md
Last active February 18, 2021 10:21
Portola (OpenJDK using musl) on Alpine

Get the JDK source (per the OpenJDK instructions):

hg clone http://hg.openjdk.java.net/portola/portola
cd portola
bash ./get_source.sh

You need an existing Alpine with an already-built JDK. I have a Docker image of Alpine with glibc-based Zulu JDK:

@tralamazza
tralamazza / decode.js
Created August 27, 2014 11:53
nodejs PoE passive skill tree encoded URL decoder
module.exports = function(str) {
var buf = Buffer(str.replace(/-/g, '+').replace(/_/g, '/'), 'base64');
nodes = [];
for (var i = 6; i < buf.length; i += 2)
nodes.push(buf.readUInt16BE(i));
return {
version: buf.readInt32BE(0), // just a guess
charClass: buf[4],
_: buf[5], // what's this?
nodes: nodes