This file contains hidden or 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
Number.prototype.currency = function (format) { | |
var amt = this, neg; | |
// If no formatting string supplied | |
// or amount is not a number, return as is | |
if (!format || isNaN(amt)) return amt; | |
// Extract placeholders from format string | |
var formFig = format.match(/\#(.*)\#/g).pop(); | |
This file contains hidden or 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
# .gitignore Boilerplate | |
# | |
# For noise that might accidentally end up in Repos | |
# And anything that should be in S3 | |
# ------------------------------------------------- | |
# Noise | |
# ----- |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="date"></div> | |
</body> |
This file contains hidden or 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
/** | |
* RGBA & Hex Fallback | |
* | |
* Takes a hex code with comma separated alpha value. | |
* Falls back to just the hex if no alpha is provided. | |
* | |
* Params: | |
* $prop: The CSS property to apply the color value to | |
* $color: A hex code, or bracketed Hex + Opacity figure. eg: (#fff, 0.5) | |
* |
NewerOlder