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 | |
$path = 'README.md'; | |
$lines = explode("\n", file_get_contents($path)); | |
foreach ($lines as &$line) { | |
$tokens = explode(' ', $line); | |
foreach ($tokens as &$token) { | |
$token = preg_replace('/(.+?)\.(html|php)/', '[$0]($0)', $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 | |
$platform = call_user_func(function() { | |
$token = $_SERVER['HTTP_USER_AGENT']; | |
if (isset($_GET['platform']) === true) { | |
$platform = $_GET['platform']; | |
return in_array($platform, array('iOS', 'Android', 'Other')) === true ? | |
$platform : | |
'Other'; |
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 | |
$map = array(); | |
$base = '/path/to'; | |
foreach (scandir($base) as $file) { | |
if ($name[0] === '.') { | |
continue; | |
} |
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 | |
$key = isset($argv[1]) ? $argv[1] : 'ABC'; | |
$users = array( | |
'ABC' => array( | |
'photoset_id' => '12345678901234567',, | |
'api_key' => '0123456789abcdef01234567890abcde', | |
'secret' => 'abcdef1234567890', | |
'auth_token' => '12345678901234567-1234567890abcdef' | |
), |
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(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened'); |
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 prototype = XMLHttpRequest.prototype, | |
open = prototype.open, | |
send = prototype.send; | |
prototype.open = function() { | |
alert('open: ' + JSON.stringify(arguments)); | |
open.apply(this, arguments); | |
}; |
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)); | |
} | |
?> |