View Main.java
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
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
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
/** | |
* @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
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
# 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
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
#!/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
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
# die you bastards | |
git grep -E '\bsub +[A-Za-z0-9_]+ *\([^)]' |