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 T(s){return s.replace(/\{\{\{(.*?)\}\}\}/g, function(a,b){return eval(b)})} | |
alert(T("hello {{{prompt('name')}}} how are you on this fine day of {{{new Date}}}")) | |
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
for(var p=[2],k,j,i=3; i < 311+1; i++){ | |
for(k=0,j=Math.sqrt(i),l=p.length;((k<l&&p[k]<=j)||!p.push(i))&&i%p[k]!=0;k++); | |
} |
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
//Faster SHA256 in 971 bytes | |
function SHA256(j){function h(k,l){return(k>>e)+(l>>e)+((q=(k&p)+(l&p))>>e)<<e|q&p}function f(k,l){return k>>>l|k<<32-l}var g=[],c,d,b=3,i=[2],q,m,a,n=[],o=[];a=j.length*8;for(var e=16,p=65535,r="";b<312;b++){d=0;c=Math.sqrt(b);for(m=i.length;(d<m&&i[d]<=c||!i.push(b))&&b%i[d]!=0;d++);}j+="\u0080";for(b=0;b<=a;b+=8)o[b>>5]|=(j.charCodeAt(b/8)&255)<<24-b%32;o[(a+64>>9<<4)+15]=a;for(b=8;b--;)n[b]=parseInt(Math.pow(i[b],0.5).toString(e).substr(2,8),e);for(b=0;b<o.length;b+=e){a=n.slice(0);for(c=0;c<64;c++){g[c]=c<e?o[c+b]:h(h(h(f(g[c-2],17)^f(g[c-2],19)^g[c-2]>>>10,g[c-7]),f(g[c-15],7)^f(g[c-15],18)^g[c-15]>>>3),g[c-e]);m=h(h(h(h(a[7],f(a[4],6)^f(a[4],11)^f(a[4],25)),a[4]&a[5]^~a[4]&a[6]),parseInt(Math.pow(i[c],1/3).toString(e).substr(2,8),e)),g[c]);j=(f(a[0],2)^f(a[0],13)^f(a[0],22))+(a[0]&a[1]^a[0]&a[2]^a[1]&a[2]);for(d=8;--d;)a[d]=d==4?h(a[3],m):a[d-1];a[0]=h(m,j)}for(d=8;d--;)n[d]+=a[d]}for(b=0;b<8;b++)for(c=8;c--;)r+=(n[b]>>>c*4&15).toString(e);return 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
body2 = "" | |
while $stdin.gets # reads from STDIN | |
body2 += "#{$_}" | |
end | |
body2.gsub!(/\r\n/m,"\n") | |
body2.gsub!(/\{\{([a-z]{3,10})\|([a-z]{3,20})\|(\d\d\d\d).*?\}\}/i){"#{$2} (#{$3})"} | |
body2.gsub!(/\{\{quote\|(.+?)\}\}/i){"<blockquote>"+"#{$1}".strip()+"</blockquote>"} | |
body2.gsub!(/^\|.+$/i,"\n") #get rid of lines starting with | |
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 array(e){ | |
var i=e.length;n=[]; | |
if(i)for(;i--;)n.push(e[i]); | |
else for(i in e)n.push(e[i]); | |
return n | |
} | |
function array(e){ | |
for(var i=e.length,n=[];i--;)n.push(e[i]); | |
return i<0?n:[e] |
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(){ | |
function core(e){ | |
var i=this.length=e.length; | |
if(!i){this[0]=e;this.length=1}; | |
for(;i--;)this[i]=e[i]; | |
this.core = core; | |
} | |
//this is the core exposed function | |
var o = function(a){return a.core?a:(new core(a))} | |
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(){ | |
setInterval(function(){ | |
for(var d=document.getElementsByTagName("iframe"),l=d.length;l--;){ | |
if(d[l].src.indexOf("googleusercontent")!=-1){ | |
var q = document.createElement("div"), u = d[l].src.indexOf("url=")+4; | |
q.innerHTML = "<h1>BLOCKED GADGET</h1>"+unescape(d[l].src.substring(u,d[l].src.indexOf("&",u))) | |
q.style.padding = "5px" | |
q.style.border = "5px dashed #007fff" | |
d[l].parentNode.insertBefore(q, d[l]) | |
d[l].parentNode.removeChild(d[l]) |
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
z.ease = s("(1-Math.cos(e*Math.PI))/2") | |
z.ease = s("e") | |
z.fx = function(duration, callback, finish, easing){ | |
var start = this.now(); | |
(loop = function(){ | |
var amount = (this.now()-start)/duration | |
callback(easing(amount)) | |
amount < 1 ? setTimeout(loop, 10) : finish() | |
})() | |
} |
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(){ | |
//this is the core exposed function | |
var o = function(a){return a.fn?a:(new core(a))} | |
function core(e){ | |
var i=this[L]=e[L]; | |
if(!i){this[0]=e;this[L]=1}; | |
for(;i--;)this[i]=e[i]; | |
this.fn = core.prototype; | |
this.o = o; |
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(){function f(c){var a=this[e]=c[e];if(a===h){this[0]=c;this[e]=1}for(;a--;)this[a]=c[a];this.fn=f.prototype;this.o=b}for(var a=f.prototype,j=/msie/i.test(navigator.userAgent),b=function(a){return a.fn?a:new f(a)},i="var t=this,o=(t.o||(a||e||{}).o);",e="length",h=undefined,g=a.S=function(a){return Function("e","a",i+"return "+a)},l=a.R=function(a){return I(Function("e","a",i+a+";return[t]"))},k=function(a){return Function("e","a","if(!a)return[this."+a+"];this."+a+"=e;return[this]")},c="%no%e.replace(/^\\s+|\\s+$/g,'')%trim%o(e)%get%o(t.A().concat(e))%add%o(t.D().getElementById(e))%id%o(t[e])%index%o(t[t.length-1])%last%+new Date%now%function(){return e.apply(a, arguments)}%bind%t.tag('*')%all%t.A().join(e||'')%tj%t[0].ownerDocument%D%o(t.D().createElement(e||'div'))%create%e.appendTo(t)%append%e.prependTo(t)%prepend%e.insertAfter(t)%after%e.insertBefore(t)%before%t.create().html(e)%make%eval('('+e+')')%decode%t.fade(e)%fadeIn%t.fade(e,1)%fadeOut%t.slide(e,0)%slideDown%t.slide(e,1)%slideUp%t.css('dis |