Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
/* | |
Originally by Marco Arment <me@marco.org>. | |
Edited by Martijn van der Ven <martijn@zegnat.net>. | |
This code is released in the public domain. | |
THERE IS ABSOLUTELY NO WARRANTY. | |
This class is aimed at PHP versions over 5.3 and below 5.5. |
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 | |
function slow_compare($str1, $str2, $length = null) { | |
$out = ($str1_len = strlen($str1 .= chr(0))) - ($str2_len = strlen($str2 .= chr(0))); | |
if (!is_int($length)) $length = $str1_len; | |
for ($i = 0; $i < $length; $i++) | |
$out |= ord($str1[$i % $str1_len]) ^ ord($str2[$i % $str2_len]); | |
return 0 === $out; | |
} |
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; |
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
RedirectMatch 303 /(.+)$ https://duckduckgo.com/?q=!+site:developer.mozilla.org+$1 | |
Redirect 303 / https://developer.mozilla.org/en-US/docs/JavaScript |
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
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
! http://blog.ghost.org/viewcounter/ | |
*/view.gif?page=/*$image |
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
* { | |
box-sizing: inherit; | |
overflow: inherit; | |
} | |
html { | |
box-sizing: border-box; | |
overflow: auto; | |
} |