Skip to content

Instantly share code, notes, and snippets.

Andreas Krey apk

Block or report user

Report or block apk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View html template
(li.lnk#smallhdr (a.undec href: 'http://apkx44pmf7fyd63e.onion/' 'apkx44pmf7fyd63e.onion'))
(li.lnk#bighdr (a.undec href: '' ''))
(li 'Andreas Krey')
(li.lnk (a.undec href: ',10,17z'
apk / tcpdump.txt
Created Oct 2, 2013
Zwangsproxy im ICE antwortet... ist nicht mal aktiv.
View tcpdump.txt
08:07:10.711532 IP (tos 0x0, ttl 64, id 46155, offset 0, flags [DF], proto TCP (6), length 64) > S, cksum 0x077a (correct), 50911869:50911869(0) win 65535 <mss 1460,nop,wscale 3,nop,nop,timestamp 793744820 0,sackOK,eol>
0x0000: 4500 0040 b44b 4000 4006 c21e 0a38 967a E..@.K@.@....8.z
0x0010: d98c 4a0f c85d 0050 0308 da7d 0000 0000 ..J..].P...}....
0x0020: b002 ffff 077a 0000 0204 05b4 0103 0303 .....z..........
0x0030: 0101 080a 2f4f 95b4 0000 0000 0402 0000 ..../O..........
08:07:10.729128 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52) > S, cksum 0xbf12 (correct), 3845998943:3845998943(0) ack 50911870 win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 6>
0x0000: 4500 0034 0000 4000 4006 7676 d98c 4a0f E..4..@.@.vv..J.
0x0010: 0a38 967a 0050 c85d e53d 495f 0308 da7e .8.z.P.].=I_...~
0x0020: 8012 16d0 bf12 0000 0204 05b4 0101 0402 ................
0x0030: 0103 0306
apk /
Last active Dec 20, 2015
Transfer commits from git into cvs, for use in what is a CVS checkout and a git repo at the same time.
View is part of the workflow for syncing a CVS branch with a git branch (and it's the only part of this that is actually tested, the rest has just been written down quickly). You do check out your CVS tree (with -kk), go into its root directory, and run (untested as of yet). The local git repo has the branch cvs checked out, and that is the one we keep in sync with CVS (and the branch we checked out there).

Update from cvs is

cvs -q update -dP
git add --all .
git commit -m 'update from cvs'

(It does not try to recreate the individual commits of the CVS side into git; we're just interested in bringing over the current tree state in this direction.)

apk /
Created May 7, 2012
A compiler for an algol-style syntax, C-style semantic language in QBasic (written in 1992)

This is a compiler I wrote back in the days. It is actually in QBasic because I did not have anything else available (I only got hold of Linux 0.99 a while later.) The output were DOS .com files which have the most simple memory model available on DOS/Windows.

The most remarkable thing I remember is that I used a lisp s-expr style representation for the parse tree; since basic data structures were lacking (and because I wanted the short syntax of car(a) and cdr(a)) I used two arrays car and cdr where the same place in both formed one cons cell; positive numbers in the array referred to other cons cells, negative one

apk /
Created Apr 18, 2012
A web socket server as a bash script.
# WebSocket shell, start & browse to http://<Host>:6655/
# Requires bash 4.x, openssl.
# Author: (which isn't me, apk)
coproc d { nc -l -p 6656 -q 0; }
nc -l -p 6655 -q 1 > /dev/null <<-ENDOFPAGE
HTTP/1.1 200 OK
<html><head><script language="javascript">
var url = location.hostname + ':' + (parseInt(location.port) + 1);
apk /
Created Apr 11, 2012
A (very) simple pub/sub server for node.js
// -*- mode: Java; c-basic-offset: 3; tab-width: 8; indent-tabs-mode: nil -*-
public class Plain {
public static class Client {
protected Socket s;
apk / gist:1313587
Created Oct 25, 2011
time trace wrapper
View gist:1313587
def took(msg: String)(expr: => Unit) = {
val s = System.currentTimeMillis();
val d = System.currentTimeMillis() - s;
val m = msg + " took " + d + "ms";
println m;
tooks += m; // Collect traces, too
apk / slocat.c
Created Oct 20, 2011
Pipe slowed down to 200 cps
View slocat.c
main () {
int f = 0;
int w;
char buf [1024];
while (1) {
int r = read (0, buf, sizeof (buf));
if (r <= 0) break;
if (r < sizeof (buf)) {
f = 1;
apk / collect_wav_file.c
Created Sep 22, 2011
Program that scrapes the big wav file from the damaged filesystem (FAT borked); throwaway code
View collect_wav_file.c
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
int iszero (char *buf, int size) {
int i;
int z = 0;
for (i = 0; i < size; i ++) {
if (buf [i] == 0) z ++;
You can’t perform that action at this time.