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
javascript:(function(){var a=document.createElement("div");a.style.cssText="position: fixed;bottom: 10px;right: 10px;padding: 10px;background: yellow;z-index: 2147483647";window.console={log:function(b){a.innerHTML+=b+"<br />\n"}};"loading"!==document.readyState?document.body.appendChild(a):document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(a)},!1);var c=document.body.scrollTop,d=Date.now();window.addEventListener("scroll",function(b){b=document.body.scrollTop;var a=Date.now(); | |
console.log([b-c,a-d,b,a].join(", "));d=a;c=b},!0)})(); |
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 | |
foreach (scandir('.') as $dir) { | |
if ($dir[0] === '.' || is_dir($dir) === false) { | |
continue; | |
} | |
shell_exec("tar zcvf $dir.tgz $dir"); | |
} | |
?> |
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.from(document.querySelectorAll('input[type=checkbox]')).forEach(function(checkbox) { checkbox.checked = true; }); |
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 | |
foreach (scandir('.') as $file) { | |
if ($file[0] === '.') { | |
continue; | |
} | |
rename($file, substr($file, 0, -4) . ' 1' . substr($file, -4)); | |
} | |
?> |
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
javascript:(function(){var a=document.createElement("div");a.style.cssText="position: fixed;bottom: 10px;right: 10px;padding: 10px;background: yellow;z-index: 2147483647";window.console={log:function(e){a.innerHTML+=e+"<br />\n"}};"loading"!==document.readyState?document.body.appendChild(a):document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(a)},!1)})(); | |
"touchstart touchmove touchend touchcancel pointerdown pointermove pointerup pointercancel click dblclick mousedown mouseup mousemove".split(" ").forEach(function(a){document.addEventListener(a,function(a){var d=a.type,b,c;switch(d){case "touchstart":b=a.touches;break;case "touchmove":case "touchend":case "touchcancel":b=a.changedTouches}void 0===b?(c=1,b=a):(c=b.length,b=b[0]);console.log([d,b.button,b.buttons,c,a.target.nodeName,b.pageX,b.pageY,Date.now()].join(", "))},!0)}); |
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
$ git clone git@github.com:kanaka/websockify.git | |
$ sudo apt-get install python-numpy | |
$ cd /path/to/websockify | |
$ make | |
$ sudo ufw allow 2023 | |
$ ./run 2023 localhost:1314 |
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 | |
define('CLIENT_KEY', 'abcdef0123456789abcdef0123456789'); | |
define('SECRECT_KEY', '9876543210fedcba9876543210fedcba'); | |
define('ACCESS_TOKEN', 'aAbBcCdDeEfFgGhH'); | |
define('ACCESS_SECRET', 'sSTtUuvVwWxXyYzZ'); | |
define('VERIFIER', 'rRGghHiIkKlLmMnN'); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://api.appfigures.com/v2/oauth/access_token'); |
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 | |
define('CLIENT_KEY', 'abcdef0123456789abcdef0123456789'); | |
define('SECRECT_KEY', '9876543210fedcba9876543210fedcba'); | |
parse_str( | |
file_get_contents('https://api.appfigures.com/v2/oauth/request_token?oauth_consumer_key=' . CLIENT_KEY . '&oauth_callback=oob&oauth_signature_method=PLAINTEXT&oauth_signature=' . SECRECT_KEY . '%26'), | |
$output | |
); | |
print_r($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
(function() { | |
var div = document.createElement('div'); | |
div.style.cssText = [ | |
'position: fixed', | |
'bottom: 10px', | |
'right: 10px', | |
'padding: 10px', | |
'background: yellow', | |
'z-index: 2147483647' |
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 absolute($base, $relative) { | |
$stack = explode('/', $base); | |
array_pop($stack); | |
foreach (explode('/', $relative) as $part) { | |
if ($part === '.') { | |
continue; | |
} |