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){ |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var Ractive = require("ractive"); | |
var Swipe = require("ractive-swipe-pages"); | |
var ractive = new Ractive({ | |
el: '#container', | |
template: '#template', | |
data: { | |
toggled: 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
conspicor (Behold) -> Observable library | |
nexilis (Tied) -> Templating library |
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
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
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(){ | |
OlderNewer