Skip to content

Instantly share code, notes, and snippets.

@coreequip
coreequip / thousands-separator.js
Created August 6, 2014 08:36
Tausender-Trennzeichen als Oneliner in JavaScript
wert = (" ".substr(0, v1 = 3 - (v2 = wert.toString().length % 3)) + wert).replace(/(.{3})/g, ".$1").substr(v1 + (v2 ? 1 : 2));
@coreequip
coreequip / base64.cmd
Created April 30, 2014 18:12
Base64-Encoding of the Inputfile. (with Powershell-Support)
@powershell -Command "& {Write-Host -NoNewline ([Convert]::ToBase64String([IO.File]::ReadAllBytes('%1')))}"
@coreequip
coreequip / QuadKey.js
Last active August 29, 2015 14:00
Simplified calculation of a Bing QuadKey - see https://msdn.microsoft.com/en-us/library/bb259689.aspx
// Don't ask.
q=(parseInt((y).toString(2), 4) << 1 | parseInt((x).toString(2), 4)).toString(4);
// Z-Padding
(1<<z).toString(2).substr(1,z-q.length)+q;
@coreequip
coreequip / simple-passwordgenerator-bookmarklet.js
Created February 22, 2013 14:42
Simple password generator. Please use as bookmarklet.
javascript:void(prompt('Password:',Math.floor((Math.random()*0xca0e373ebffff+0x05c5e45240000)).toString(36)))
@coreequip
coreequip / amazon-shortlink-bookmarklet.js
Created February 20, 2013 11:05
Reads and shows the official Amazon short link to a article. ex.: http://www.amazon.com/dp/1449316387 Add this as a Bookmark-Link in your browser.