Skip to content

Instantly share code, notes, and snippets.

Zibri / WishSortPrice.js
Created Jan 6, 2018 — forked from LiquidSebbey/WishSortPrice.js
Sort results by price
View WishSortPrice.js
$("<style>.overlay { position:absolute; background-color: white; top:0; left:0; width:100%; height:100%; z-index:1000; } .loader { position: fixed; top: 1em; padding: 15px; maring: 15px; border: 1px solid #000000; border-radius: 10px; background-color: #CC0000; color: #FFFFFF; right: 1em; z-index: 999999999999; }</style>").appendTo("head");
$("body").append("<div id='overlay' class='overlay'></div><div id='loader' class='loader'><b>Bezig met inladen en sorteren ...</b></div>");
maxProducts = prompt("Hoeveel producten wil je inladen? (max. 500)");
var app = setInterval(function(){
if ($(".feed-product-item").length < maxProducts){
This is a forty times forty element matrix of fifty-six bit
hexadecimal numbers.
To generate a source key, take a forty-bit number that (in
binary) consists of twenty ones and twenty zeroes; this is
the source KSV. Add together those twenty rows of the matrix
that correspond to the ones in the KSV (with the lowest bit
in the KSV corresponding to the first row), taking all elements
Zibri / inlineworker.js
Created Jun 28, 2018 — forked from SunboX/inlineworker.js
Create web workers without a separate worker JS files. Source:
View inlineworker.js
function worker() {
setInterval(function() {
postMessage({foo: "bar"});
}, 1000);
var code = worker.toString();
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}"));
var blob = new Blob([code], {type: "application/javascript"});
Zibri / Deobfuscator.html
Last active Jul 3, 2018
OpenRG Deobfuscator
View Deobfuscator.html
<script type="text/javascript">
if (document.images) {
img1 = new Image();
img1.src = "";
img2 = new Image();
img2.src = "";
Zibri / background.js
Created Apr 23, 2019 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
View background.js
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
View hex2bin_by_zibri.c
Best hex2bin function I came up with.
By Zibri
Valid strings examples:
"1 d0 600d c0FFeE"
Spaces are ignored.
Parsing stops at the first non hex character.
Zibri / trick.txt
Last active Jul 26, 2019
A trick as old as Unix.
View trick.txt
$ echo ZWNobyAiQnllLWJ5ZSBXb3JsZCEiIDsjDSMhL2Jpbi9zaCAgICAgICAgICAgICAgICANCiMNZWNobyAiSGVsbG8gV29ybGQhIg0K | base64 -d >
$ chmod a+x
$ cat
echo "Hello World!"
$ ./
Bye-bye World!
Zibri /
Created Aug 2, 2019
Reindent any bash script the "bash" way.
# By Zibri (
# Usage: reindent >
reindent ()
rstr=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1);
source <(echo "Zibri () {";cat "$1"|sed -e "s/^\s\s\s\s/$rstr/"; echo "}");
echo '#!/bin/bash';
declare -f Zibri | head --lines=-1 | tail --lines=+3 | sed -e "s/^\s\s\s\s//;s/$rstr/ /"
Zibri /
Created Aug 5, 2019
Get network data usage from Android phone.
# Get android network usage statistics from phone.
# by Zibri
function getUsage ()
for a in $(adb shell dumpsys netstats|grep "rb="|cut -d "=" -f 3|cut -d " " -f 1);