View sociopunk.js
// Sociopunk plaintext steganography module aimed at social network posting
// Encoding: Sociopunk.enc(secretText, coverText) when cover text is in Latin
// or Sociopunk.enc(secretText, coverText, true) when cover text is in Cyrillic
// Decoding: Sociopunk.dec(coverText) or Socipunk.dec(coverText, true) respectively
Sociopunk = (function(){
var msg2bin = m => unescape(encodeURIComponent(m)).split('').map(c=>('00000000'+c.charCodeAt(0).toString(2)).substr(-8)).join('').split('').map(Number),
bin2msg = b => decodeURIComponent(escape(b.join('').match(/\d{8}/g).map(c => String.fromCharCode(Number('0b'+c))).join(''))),
latinPattern = 'aeiocxAEIOCX', cyrPattern = 'аеіосхАЕІОСХ';
View soxharp.sh
#!/bin/bash
function idx() {
local t=${1%%$2*}
[[ "$1" == "$t" ]] && echo "-1" || echo ${#t}
}
oct=0
while IFS= read -r -s -n1 i; do
View mon.sh
#!/bin/bash
# Usage
# Monitoring server: mon.sh [etcd_chan_id] [instapush_app_id] [instapush_app_secret]
# Monitoring client: echo '[event_name]#[vars_json]' | mon.sh [etcd_chan_id]
ETCD_CHANID="$1" # etcd channel id on discovery.etcd.io
INSTAPUSH_APP="$2" # instapush app id
INSTAPUSH_SECRET="$3" # instapush secret key
MSGKEY="notifikey"
View fm2toavi.sh
#!/bin/bash
# Usage: fm2toavi.sh rom.nes movie.fm2 output.avi
fceux --subtitles 0 --slstart 0 --slend 239 --xscale 1 --yscale 1 --special 0 --pal 0 \
--sound 1 --soundq 1 --soundrate 48000 --volume 150 --trianglevol 256 --square1vol 256 \
--square2vol 256 --noisevol 256 --pcmvol 256 --mute 1 --nospritelim 1 --no-config 1 \
--videolog "ffmpeg -f s16le -ar 48000 -channels 1 -i s.log -f rawvideo -r 60.0998 -s 256x224 -pix_fmt bgr24 -i - -c:a pcm_s16le -c:v libx264rgb -qp 0 -pix_fmt rgb24 $3"\
--playmov "$2" "$1"
View game.js
function T() {
var track = 'w=t>>9,k=32,m=2048,a=1-((t/m)%1),d=(((14*t*t)^t)%m)*a,y=([3,3,4.7,2][p=w/k&3])*(t/4),h=((("IQNNNN!!]]!Q!IW]WQNN??!!W]WQNNN?".charCodeAt(w/2&15|p/3<<4))/33)*t)-t,s=y*.98%80+y%80+(w>>7&&a*((5*t%m*a&128)*(0x53232323>>w/4&1)+(d&127)*(0xa444c444>>w/4&1)*1.5+(d*w&1)+(h%k+h*1.99%k+h*.49%k+h*.97%k-64)*(4-(2*a)))),(s*s>>14?127:s)+128',
duration = 120,
beat=function(b,e,a,t){return(a="data")+":audio/wav;base64,UklGRl9fX19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgA"+btoa(eval("for(t=0;++t<e*8e3;)a+=String.fromCharCode(255&("+b+"))"))}
return beat(track, duration)
}
!function() {
var rAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.mozRequestAnimationFrame,
aud, screenHeight = 0, screenWidth = 0, minSide = 0, maxSide = 0, centerX = 0, centerY = 0, realLoop = null, score = 0, baseSpeed = 0, speed = 0,
View indexer.sh
#!/bin/bash
# Catalite Indexer
# Adds new files or directories into the catalog database
# Usage: indexer.sh [db] [file|directory]
DB=''
openDb() {
DB="$*"
}
View dclock.sh
#!/bin/bash
while true; do
loadAvg=$(cat /proc/loadavg | cut -d ' ' -f -4)
timeStr=$(date '+%a %b %d %H:%M:%S')
memAvail=$(grep -Po 'MemAvailable.*\d+' /proc/meminfo|cut -d ':' -f 2)
memTotal=$(grep -Po 'MemTotal.*\d+' /proc/meminfo|cut -d ':' -f 2)
memBusy=$(( $memTotal - $memAvail ))
xsetroot -name "RAM: $(( 100 * memBusy / memTotal ))% | CPU: $loadAvg | $timeStr"
sleep 1
done
View stego.js
//PNG steganography utils
//ratio: about 2 pixels per 1 byte of text message
//Auto EOD byte as 255
//Use only non-transparent images as the algo has to modify alpha-channel of affected pixels
//to protect RGB values from in-browser rounding
+function(w) {
var bitMapping = [0, 1, 2, 4, 5, 6, 8, 9], img = new Image(), cnv = document.createElement('canvas'), ctx=cnv.getContext('2d')
w.Stego = {
hide: function(imglink, msg, cb) { //image data URI (not only PNG) and message as input, resulting PNG image data URI as output (to callback)
View chrome-results.txt
OriginalRecursion: 2441.489ms
Found 22 powers of 2 for OriginalRecursion
ShorterRecursion: 2602.523ms
Found 24 powers of 2 for ShorterRecursion
BitwisePreparation: 6413.187ms
Found 24 powers of 2 for BitwisePreparation
LastIndexOf: 6921.900ms
View README.md

ESVer: conditionally load your scripts depending on the target platform

ESVer is a tiny and convenient helper script to get you out of the overhead hell for the browsers that don't really need it. It detects whether a browser supports ES6/ES2015 standard natively and allows you to load different script versions depending on the result of this check.

Usage

Include your scripts like this: