This file contains hidden or 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 embedLiveCatTM() { | |
var 📄 = document, 💅 = "style", ⬅ = "left", ⬇ = "bottom", 👍 = "translateX(-50%)", 🐳 = window, | |
↕ = "innerHeight", ↔ = "innerWidth", 😺 = 0, 🐈 = 🐳[↔] / 2, 🖖 = 0, 🎺 = 0, 👻 = "px", | |
🔢 = Math, ⏲ = setInterval, 💩, 🐱 = 📄.createElement("img"); | |
🐱.setAttribute("src", "//static.gosquared.com/images/april/nes/cat_02.png"); | |
🐱[💅].height = 🐳[↕] / 20 * 10 + 👻; | |
🐱[💅].position = "fixed"; | |
🐱[💅].transform = 👍; | |
📄.body.appendChild(🐱); | |
(function 🖌(){ |
This file contains hidden or 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
# hubot script for desk | |
module.exports = (robot) -> | |
robot.router.post "/hook/desk", (req, res) -> | |
body = req.body.data | |
lines = body.split "\n" | |
data = {} | |
lines.forEach (line) -> | |
bits = line.split ":" | |
data[bits.shift()] = bits.join ":" |
This file contains hidden or 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
// Without running this: what gets logged in what order? | |
var a = {}; | |
Object.defineProperty(a, 'a', { get: function(){ | |
console.log('get a'); | |
return function(){ console.log('a'); return a; }; | |
}}); | |
Object.defineProperty(a, 'b', { get: function(){ |
This file contains hidden or 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> | |
<title>Polymaps Example</title> | |
<script src="polymaps.min.js"></script><!-- polymaps from gosquared/polymaps --> | |
</head> | |
<body> | |
<svg id="map" width="1000" height="800"></svg> |
This file contains hidden or 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 fs = require('fs'); | |
function ls(dirname){ | |
return [].concat.apply([], fs.readdirSync(dirname).sort().map(function(f){ | |
f = dirname + '/' + f | |
return fs.statSync(f).isDirectory() ? ls(f) : f | |
})); | |
} |
This file contains hidden or 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
"res[860] = /(?:[\\040\\t]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff])*\\))*\\))*(?:(?:[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff])|\"(?:[^\\\\\\x80-\\xff\\n\\015\"]|\\\\[^\\x80-\\xff])*\")(?:(?:[\\040\\t]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff])*\\))*\\))*\\.(?:[\\040\\t]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff])*\\))*\\))*(?:[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff])|\"(?:[^\\\\\\x80-\\xff\\n\\015\"]|\\\\[^\\x80-\\xff])*\"))*(?:[\\040\\t]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff])*\\))*\\))*@(?:[\\040\\t]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff]|\\((?:[^\\\\\\x80-\\xff\\n\\015()]|\\\\[^\\x80-\\xff])*\\))*\\) |
This file contains hidden or 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
alert(" |
This file contains hidden or 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
t.prototype.REDACTED = function(a, b, j, c, g) { | |
for(var r = this.REDACTED2(0), t = Math.tan(r), C = g % 86400 / 86400 * Math.PI * 2, g = [], n = 0;n <= c + 1;n = n + 1) { | |
g[n] = Math.atan(Math.cos(2 * Math.PI * (j + n / c) / a + C) / t) / Math.PI * c * a / 2 - (b - a / 4) * c; | |
} | |
b = Math.max.apply(Math, g); | |
j = Math.min.apply(Math, g); | |
a = ""; | |
if(g[0] > 0 && g[0] < c) { | |
a = "M0," + g[0]; | |
if(b >= c) { |
This file contains hidden or 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
/* | |
Ridiculously useful function | |
Sorts elements of an array by properties | |
Usage: | |
Sort elements by property prop1, then by prop2 if prop1 values are equal | |
someArrayOfObjects.sort(comparator('prop1', 'prop2')); | |
*/ | |
function comparator(){ |
This file contains hidden or 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 | |
// Only run this locally, unless you want to bombard your server with hundreds of requests a second. | |
if($_GET['a']) die( $_GET['callback'] . '(false);'); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> |
NewerOlder