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
s='*' | |
i=input | |
a=Array | |
j='join' | |
r=a(i+1)[j](s) | |
c=a(--i) | |
b='\n'+s+c[j](' ')+s | |
output=r+c[j](b)+(i?'\n'+r:'') |
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 d(r){return(input.match(r)||[]).length}output=d(/[aeiou]/gi)+d(/y/gi)/2 |
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
i=input | |
output=i.split("").reverse().join("")==i |
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 makeVec(altitude,azimuth){ | |
var x, y, z, hyp, vector; | |
z = Math.sin(altitude); | |
hyp = Math.cos(altitude); | |
y = hyp*Math.cos(azimuth); | |
x = hyp*Math.sin(azimuth); | |
vector = new Vector(x,y,z); | |
return vector; | |
} | |
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(inp,el,mp,k){ | |
el=document.activeElement||{}; | |
inp=el.value||''; | |
mp={'is':/is/ig,'0':/o/ig,'1':/[il]/ig,'3':/e/ig,'4':/a/ig,'5':/s/ig,'7':/t/ig,'©':/c/ig,'Я':/r/ig,'м':/m/ig}; | |
for(k in mp)inp=inp.replace(mp[k],k); | |
el.value=inp; | |
}()); |
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
// ==UserScript== | |
// @name FunNewsSubstitutions | |
// @namespace http://mauve.us.to | |
// @description This is a filter I made that makes reading news more fun, I got the idea from http://xkcd.com/1288/. Since it's a userscript it should be easily install-able in Chrome or Firefox | |
// @include * | |
// ==/UserScript== | |
// Wrapper to keep things in their own scope | |
(function(){ | |
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
// This calls the function whenever a primitive is needed | |
function R(fn){ | |
return { | |
valueOf:fn, | |
toString:function(){ | |
return fn()+""; | |
} | |
}; | |
} |
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
<div class="A"> | |
<div> | |
Hello, I like <span class="B">cats</span>. | |
</div> | |
<div> | |
I like <span class="B">dogs</span>. | |
</div> | |
<div> | |
I prefer <span class="B">reptiles</span>. | |
</div> |
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
https?:\/\/.*\/(.*?).(jpe?g|gif|png) |
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
//https://www.npmjs.com/package/duplexer | |
var duplexer = require("duplexer"); | |
var through = require("through2"); | |
function boostrap(fn){ | |
var input = noop(); // Just passes data through | |
var output = noop(); // Just passed data through; | |
input.once("data",function(chunk, encoding, cb){ |
OlderNewer