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=f=>(...a)=>+a!=0?z(f.bind(0,...a)):f() |
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
window.theImage = () => { | |
const u = byid("url").value, | |
i = img, | |
c = valof("control"), | |
r = valof("rand"), | |
d = valof("data"), | |
t = valof("dither"), | |
s = Math.floor(Math.random()*1e9), | |
o = rotation, | |
x = dx |
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 byid(id) { | |
return document.getElementById(id); | |
} | |
function valof(id) { | |
return byid(id).checked ? 1 : 0; | |
} | |
function text(e) { | |
if (e == null) { | |
return ""; | |
} |
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 snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck. | |
The Tweet length counter is fixed by tricking TweetDeck into counting up to 140 characters, twice, so you'll see 140 | |
instead of 280 in the counter but going over 140 will give you another set of 140 charactrs. | |
*/ | |
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b}; | |
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(x){return x=twttr.txt.getTweetLength.apply(this,arguments),x<140||x/140>2?x:x%140}}); |
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
eval(String.fromCharCode( | |
(5 * | |
5*4+1 ),2*( | |
2*(7*4+1) +1),(8*6* | |
2+1),9*6*2,8 *5,(2*(8*5+1) | |
+1),4*(7*4+1),6* (9*2+1),7*5*3,5 | |
*2*(5*2+1),(6*(8* 2+1)+1),2*(2*(5* | |
2+1)+1),6*(8*2+1) ,6*(9*2+1),3*(9*4 | |
+1),(9*6*2+1),(6* (5*2+1)+1),8*(6*2 | |
+1),(8*6*2+1),6* (9*2+1),(6*(5*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
eval(String.fromCharCode( | |
(8 | |
* |
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
eval(String.fromCharCode( | |
(8 | |
* |
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
#!/bin/bash | |
set -e | |
originalSize="$(identify -format "%wx%h\n" $1|head -1)" | |
tmp="${1%%.*}-temp.${1#*.}" | |
convert $1 -coalesce -layers Optimize "$tmp" | |
for SZ in "${@:2}"; do | |
convert -size "$originalSize" "$tmp" -resize "$SZ" \ | |
"${1%%.*}-$SZ.${1#*.}" | |
done | |
rm "$tmp" |
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 dynamicLoadYT(el) { | |
var videoIDParts = /youtu\.be\/(.*)/; | |
// invalid link | |
if (!videoIDParts) return; | |
var videoID = videoIDParts[1]; | |
//generate a callback function | |
// (most people would do this with jQuery) |
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 hash(s) { | |
var hash = 0, i, chr, len; | |
if (s.length == 0) return hash; | |
for (i = 0, len = s.length; i < len; i++) { | |
chr = s.charCodeAt(i); | |
hash = ((hash << 5) - hash) + chr; | |
hash |= 0; // Convert to 32bit integer | |
} | |
return hash; | |
} |