Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Probably not looking at GitHub…

Dominic Mitchell happygiraffe

💭
Probably not looking at GitHub…
View GitHub Profile
View Main.java
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.Charset;
public class Main {
public static void main(String[] args) throws IOException {
System.out.println("file.encoding=" + System.getProperty("file.encoding"));
System.out.println("sun.jnu.encoding=" + System.getProperty("sun.jnu.encoding"));
View happygiraffe.js
/**
* @see https://github.com/asyncjs/Javascript-Jungle/wiki/api
*/
jj.createCreature('happygiraffe-snowman', function (creature) {
'use strict';
// the div element for the creature.
var element = creature.el,
snowman = '☃',
View macport-upgrade-git.sh
# Upgrade git in mac ports.
# First, bring the ports collection up to date.
# -d for debug output.
sudo port -d sync
# Then, upgrade git.
# -d for debug output.
# -n for not upgrading dependencies
View pickjdk.sh
#!/bin/bash
#
# Provides a function that allows you to choose a JDK. Just set the environment
# variable JDKS_ROOT to the directory containing multiple versions of the JDK
# and the function will prompt you to select one. JAVA_HOME and PATH will be cleaned
# up and set appropriately.
# Usage:
# Include in .profile or .bashrc or source at login to get 'pickjdk' command.
# 'pickjdk' alone to bring up a menu of installed JDKs on OS X. Select one.
View show-perl-prototypes.sh
# die you bastards
git grep -E '\bsub +[A-Za-z0-9_]+ *\([^)]'