Skip to content

Instantly share code, notes, and snippets.

View whippersnapper's full-sized avatar

Ling whippersnapper

View GitHub Profile
@whippersnapper
whippersnapper / gist:f74103c02840c9e02a2f
Created August 12, 2014 19:18
D3js Directive Wrapper
'use strict';
angular.module('demoapp')
.directive('donut', function () {
return {
restrict: 'E',
scope: {
data: '='
},
link: function postLink(scope, element, attrs) {
@whippersnapper
whippersnapper / .bash_profile
Last active October 14, 2015 15:17
Detached Switchable JDK
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi
}