Skip to content

Instantly share code, notes, and snippets.

if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
@tomichj
tomichj / 0_reuse_code.js
Last active May 3, 2017 20:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tomichj
tomichj / data_binding.coffee
Created April 15, 2015 20:21
# Simple, light-weight data binding in coffeescript using jQuery.
# Simple, light-weight data binding using jQuery.
#
#
# Allows bi-directional data binding of DOM elements and/or JS objects.
#
# A dom element with [data-bind="key"], and it will publish changes
# and subscribe to changes from other elements bound to the same key.
#
# <input id="first_name" type="text" data-bind="firstname"/>
#
@tomichj
tomichj / mac-install
Last active August 29, 2015 14:05
Mac OS X Base System Configuration
#!/bin/bash
if test ! $(which brew)
then
echo " Installing Homebrew for you."
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" > /tmp/homebrew-install.log
fi
# brew packages
brew install openssl libyaml gnutls git rbenv ruby-build tree blueutil gmp imagemagick wget coreutils hub z grc spark
@tomichj
tomichj / toggle_bluetooth.sh
Last active August 29, 2015 14:02
Mac OS X Keyboard Maestro script to toggle bluetooth on and off
# first install blueutil, 'brew install blueutil'
# next create a new Keyboard Maestro macro
# add a Execute Shell Action action to script and paste in the following:
bluetooth=$(/usr/local/bin/blueutil)
is_on="Power: 1"
if [[ "$bluetooth" =~ "$is_on" ]];
then
/usr/local/bin/blueutil power 0
else