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:void function(){STK.sizzle('[node-type="feedGroupLayer"]')[0].style.display='block';STK.sizzle('[node-type="feedGroupLayer"] a[href]')[0].focus()}() |
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 nakedObject() { | |
var iframe = document.createElement('iframe') | |
iframe.width = iframe.height = 0 | |
iframe.style.display = 'none' | |
document.appendChild(iframe) | |
iframe.src = 'javascript:' | |
var proto = iframe.contentWindow.Object.prototype | |
iframe.parentNode.removeChild(iframe) | |
iframe = null | |
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
D:\working\hax\mmclass [master]> modulelint -i . | |
C:\Users\Administrator\AppData\Roaming\npm\node_modules\modulelint\lib\checklist | |
\bom.js:22 | |
var blackListReg = new RegExp(blackList.join("|")); | |
^ | |
SyntaxError: Invalid regular expression: /\doc\|\.git\|\.svn\|\node_modules\/: \ | |
at end of pattern | |
at new RegExp (unknown source) | |
at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modul |
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 | |
$f = new ReflectionFunction('intltz_from_date_time_zone'); | |
var_dump($f->getParameters()[0]->getClass()); // cause ReflectionException in PHP 5.5 | |
/* | |
run `php --rf intltz_from_date_time_zone` => | |
Function [ <internal:intl> function intltz_from_date_time_zone ] { | |
- Parameters [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
// See https://github.com/koajs/koa/issues/215 | |
// start: nvm run 0.11 --harmony koa-confusing-accessors | |
// test: curl -d '{"test":"ok"}' -H 'Content-Type: application/json' http://localhost:3000/ | |
var koa = require('koa'); | |
var app = module.exports = koa(); | |
app.use(function *(next){ | |
if (this.method === 'POST') { | |
this.body = '<?xml version="1.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 | |
function safe_json_encode($data) { | |
// We might have been tolerant to some common cases such as convert | |
// INF/NAN as 0 by using JSON_PARTIAL_OUTPUT_ON_ERROR option, but | |
// sadly `json_last_error()` only get the last error means it may | |
// override worse errors such as malfored utf-8 which we can't ignore! | |
// Poor H P !! | |
$result = @json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); |
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
header { | |
color: white; | |
background: navy; | |
height: 60px; | |
position: fixed; | |
left: 0; | |
right: 0; | |
top: 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
// See https://github.com/promises-aplus/promises-spec/issues/179 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
// See https://github.com/promises-aplus/promises-spec/issues/179 |
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
void function () { | |
if (!window.tracker) { | |
return; | |
} | |
var events = ['scroll', 'click', 'mousemove', 'keydown', 'mousedown']; | |
for (var i = 0; i < events.length; i++) { | |
addHandler(document, events[i], detect); | |
} | |
function detect(event) { | |
for (var i = 0; i < events.length; i++) { |
OlderNewer