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
@@ -70,16 +70,16 @@ | |
}); | |
// enter key submits form | |
- $items.on('enterKeyDown', function onEnterKeyDown(e) { | |
+ $widget.on('enterKeyDown', function onEnterKeyDown(e) { | |
$form.submit(); | |
}); | |
// spacebar triggers 'check' event |
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
$('.my_answers').each(function(){if(/(\d+), \d+, \1\)/.test(this.getAttribute('onclick')))this.style.backgroundColor='green'}); |
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
<?php | |
/** | |
* A minimal PhotoBackup API endpoint developed in PHP. | |
* | |
* @version 1.0.0 | |
* @author Martijn van der Ven <martijn@zegnat.net> | |
* @copyright 2015 Martijn van der Ven | |
* @license http://opensource.org/licenses/MIT The MIT License | |
*/ |
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
# Running DLNA server via `minidlnad` | |
alias dlna_remove_log="if [ -f ~/.config/minidlna/minidlna.log ];then rm ~/.config/minidlna/minidlna.log;fi" | |
alias dlna_stop="if [ -f ~/.config/minidlna/minidlna.pid ];then cat ~/.config/minidlna/minidlna.pid | xargs kill;fi" | |
alias dlna_init="minidlnad -f ~/.config/minidlna/minidlna.conf -P ~/.config/minidlna/minidlna.pid" | |
alias dlna_start="dlna_stop;dlna_remove_log;dlna_init" | |
alias dlna_rescan="dlna_stop;dlna_remove_log;dlna_init -R" |
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
/** | |
* Send JSON encoded data to the browser and end all further processing. | |
* @method endWithJson | |
* @param array $data A data array. | |
* @throws InvalidArgumentException | |
* @return void | |
*/ | |
private function endWithJson($data) | |
{ | |
if (!is_array($data)) { |
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
Number.extend({ | |
'sign': function() { | |
// http://stackoverflow.com/a/21294663/3225372 | |
return typeof this === 'number' ? this ? this < 0 ? -1 : 1 : this === this ? this : NaN : NaN; | |
}, | |
'isPositive': function() { | |
return this.sign() === 1; | |
}, | |
'isNegative': function() { | |
return this.sign() === -1; |
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
LICENSE AGREEMENT | |
OmniMix Uno End User License Agreement | |
Copyright (c) 2006 - 2015, Christian Danner - https://www.danner-net.de/om.htm. | |
All rights reserved. | |
THIS IS A LEGAL AGREEMENT between "you", the end user of the OmniMix Uno software, and Christian Danner, its author. |
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
/** | |
* Create an array containing every possible way to write a given string in mixed-case. | |
* | |
* @param {String} str - A string to find every case-combination for. | |
* @return {Array} Every possible case-combination. | |
*/ | |
function mixedCase(str) { | |
'use strict'; | |
str = str.toLowerCase(); | |
var length = str.length, |
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
<a href="http://causeyoucantyouwontandyoudontstop.com/" class="kick-it">Kick it!</a> |
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
var gaunt = function (data) { | |
'use strict'; | |
var input = String(data), map = {9: '0', 32: '1'}, result = '', output = '', i, j; | |
for (i = 0, j = input.length; i < j; i += 1) { | |
result += map[input.charCodeAt(i)] || ''; | |
} | |
for (i = 0, j = result.length; i < j; i += 8) { | |
output += String.fromCharCode(parseInt(result.substr(i, 8), 2)); | |
} | |
return output; |