Skip to content

Instantly share code, notes, and snippets.

View JamesDullaghan's full-sized avatar
🎯
Focusing

James D JamesDullaghan

🎯
Focusing
View GitHub Profile
var PurdyPercent = function (num, options) {
this.settings = {
hide_decimal_on_whole : true,
decimals : 2,
truncate : false, // (soon)
match_decimals: true, // forces floats to match defined decimal count
rounding : 'default', //default, up, down (soon)
postfix : '%'
};
@mrsweaters
mrsweaters / purdy.js
Last active December 24, 2015 00:39
Make percentages purdy. Whole numbers don't display decimals by default, will force defined decimal length for floats, all customizable.
var PurdyPercent = function (num, options) {
this.settings = {
hide_decimal_on_whole : true,
decimals : 2,
truncate : false, // (soon)
match_decimals: true, // forces floats to match defined decimal count
postfix : '%'
};
// helper methods

Spark 0.7.2 on OS X

These were the steps required to get Spark 0.7.2 up and running in standalone cluster mode (master and worker running on same machine) on OS X.

Scala version

With Homebrew, I was already up to Scala 2.10.2. This can build Spark 0.7.2, but it won't run. To install previous version of Scala and switch back/forth: