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
/** | |
* Handlebars eachIn helper | |
* Copyright (c) 2013, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* Description: | |
* A Handlebars helper to iterate over object properties rather than arrays. | |
* | |
* Usage: | |
* <script id="list-object" type="text/x-handlebars-template"> |
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
/** | |
* Canvas Loading Spinner | |
* Copyright (c) 2013, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
*/ | |
(function(){ | |
'use strict'; | |
var _lineCaps = ['butt', 'round', 'square'], |
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
/** | |
* parseUrl | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* Needs to run in a browser, uses String.prototype.lastIndexOf method. | |
* Regexp stolen from: http://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/ | |
*/ | |
var parseUrl = (function (element) { | |
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
/** | |
* HTTP Status Codes | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* Taken from: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
* Visual Studio find regex: ^(\d{3}) ([^\r\n]+)\r\n | |
* Visual Studio replace regex: '$1': '$2', // | |
* Notes wrapped in parens moved manually | |
*/ |
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
/** | |
* Autogrow, version 1.0 | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* A jQuery plugin that converts a textarea to a (Facebook-like) auto-growing textarea. | |
* Built for jQuery 1.5.1 | |
*/ | |
$.fn.autogrow = function () { | |
var refresh = function (area, element) { |
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
/** | |
* Default Arguments | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* Set default arguments to a function | |
* @param {function} fn - The function to decorate | |
* @param {*} [args...] - Any default arguments | |
* @returns {function} - The new decorated function | |
* |
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
/*! | |
Underscore.js templates as a standalone implementation. | |
JavaScript micro-templating, similar to John Resig's implementation. | |
Underscore templates documentation: http://documentcloud.github.com/underscore/#template | |
Modifyed by marlun78 | |
*/ | |
(function () { | |
'use strict'; |
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
/*! | |
* Array Extras, version 1.0 | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* Depends on type.extras.js | |
*/ | |
(function(ns){ | |
// Returns the first index at which a given type can be found in the array, or -1 if it is not present. |
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
/** | |
* Type Extras, version 1.0 | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
*/ | |
(function (ns) { | |
// Returns an given element's internal [[Class]] property as a lower-case string | |
var _toString = Object.prototype.toString, | |
typeOf = function (object) { |
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
/** | |
* Make Placeholders jQuery plugin, version 1.0 | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* === Description === | |
* | |
* Use as a fallback for HTML5s placeholder attribute when not supported by the browser. It does this by creating a | |
* placeholder element that has to be positioned over the input. This plugin does not position it for you, but it | |
* makes it very easy for you to do so. |