View callService.php
<?php
/* For Hinet VDSL Wi-Fi AP D-Link WBR-2200 */
// Log in http://192.168.0.1 &
// Get UID in Cookie by Chrome DevTools
define('UID', 'ABCxyz1234');
function callService($data) {
$ch = curl_init();
View guessCountry.php
<?php
function guess_country_by_locale ($locale) {
$tokens = explode('-', strtolower($locale));
if (isset($tokens[1]) === true) {
$country = $tokens[1];
if ($country !== '') {
switch ($country) {
case 'hans':
View langCodes.json
{
"aa": "Afar",
"ab": "Abkhazian",
"ae": "Avestan",
"af": "Afrikaans",
"ak": "Akan",
"am": "Amharic",
"an": "Aragonese",
"ar": "Arabic",
"as": "Assamese",
View compositionEventLogger.bookmarklet.js
(function(){var b=document.createElement("div");b.style.cssText="position: fixed;bottom: 10px;right: 10px;padding: 10px;background: yellow;z-index: 2147483647";window.console2={log:function(a){console.log(a);b.innerHTML+=a+"<br />\n"}};"loading"!==document.readyState?document.body.appendChild(b):document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(b)},!1);document.addEventListener("compositionstart",function(a){console2.log(["compositionstart",a.data,a.target].join(", "))},
!0);document.addEventListener("compositionupdate",function(a){console2.log(["compositionupdate",a.data,a.target].join(", "))},!0);document.addEventListener("compositionend",function(a){console2.log(["compositionend",a.data,a.target].join(", "))},!0)})();
View mdLinker.php
<?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);
View platformDetection.php
<?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';
View iosDupFind.php
<?php
$map = array();
$base = '/path/to';
foreach (scandir($base) as $file) {
if ($name[0] === '.') {
continue;
}
View flickrDiff.php
<?php
$key = isset($argv[1]) ? $argv[1] : 'ABC';
$users = array(
'ABC' => array(
'photoset_id' => '12345678901234567',,
'api_key' => '0123456789abcdef01234567890abcde',
'secret' => 'abcdef1234567890',
'auth_token' => '12345678901234567-1234567890abcdef'
),
View firebug-lite.js
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');
View xmlhttprequest.spy.js
(function() {
var prototype = XMLHttpRequest.prototype,
open = prototype.open,
send = prototype.send;
prototype.open = function() {
alert('open: ' + JSON.stringify(arguments));
open.apply(this, arguments);
};