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
/** | |
* 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
/** | |
* 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
/** | |
* 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
/** | |
* 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
# How to install `ipkg` on a Synology DS214 | |
After a couple of days of trying to get `ipkg` woking on my DS214 I found [this article](https://github.com/trepmag/ds213j-optware-bootstrap) by [trepmag](https://github.com/trepmag). It is written for the DS213j, but it’s been working for me and [others](https://github.com/alberthild) for the DS214 too. | |
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you. | |
## Guide | |
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
/** | |
* Dependency Injection | |
* Copyright (c) 2014, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* === EXAMPLE === | |
* //Some module... | |
* (function () { | |
* var di = window.di; | |
* |
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
/** | |
* Self-overwriting Function Statement (SOFS) | |
* Copyright (c) 2013, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* === EXAMPLE === | |
* console.log('---'); | |
* console.log('SOFS return:', sofs()); | |
* console.log('SOFS return:', sofs()); | |
* console.log('---'); |
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
/** | |
* Simple express sever | |
* Copyright (c) 2014, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* Assumes this folder structure | |
* /public | |
* /server | |
* | |
* Express: http://expressjs.com |
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
/** | |
* Minimal Events | |
* Copyright (c) 2013 marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
*/ | |
// TODO: Rework “once” | |
window.evts = (function () { | |
'use strict'; |