Miscellaneous handy stuff, programming doodles, proofs of concept(s).

fnordomat 0c2d844265 .gitignore 1 month ago
aaaa 564affbdd8 Added GPT-2 script 1 year ago
captive-be-gone e314b867bf captive-portal eating script updated + improved 7 months ago
cover 1d82920b6f fix 5 years ago
dotfiles 7045caa20c XMonad: swap workspaces 5 years ago
dsp b963699c1d plot a spectrogram 3 months ago
emacs 558f0a92ec highlight iptables rules in emacs 7 years ago
haskell 6061064ec9 Visualization of Levenshtein edit distance 4 years ago
js f725536448 mouse hoover (hoover != hover)! 7 months ago
mastodon 194149c749 [mastodon] mastodon tool: refresh toot info 3 months ago
multimedia c9eda4f033 ffmpeg multimedia report: accept more file types. output only the html file on stdout 10 months ago
raspi 1d52b65b32 Happy Hardware Hacking :-) 3 years ago
rust d114c08321 commit Cargo.lock 3 years ago
satsolver 4ad8db04d3 Tiny, pedagogical DPLL SAT solver in C. 5 years ago
scheme a7b8eac2da Added weight-balanced trees implementation in scheme 4 years ago
tinform b2b08bdba3 Add tinform C code reshaper 3 years ago
torx 5a23898a9f ANSI colors 7 years ago
yourprobes 1d82920b6f fix 5 years ago
.gitignore 0c2d844265 .gitignore 1 month ago
LICENSE e820913490 Initial commit 8 years ago
README.md f725536448 mouse hoover (hoover != hover)! 7 months ago
netthier_min.svg 4d74209446 fix spelling error 10 months ago

README.md

misc

Miscellaneous stuff, ranging from handy to useless.

aaaa

This folder contains:

  • aaaa/magpo.py: turn a text or word list into virtual magnetic poetry. The idea is to open the resulting random SVG in an interactive editor such as inkscape and play with the words on the screen.
  • aaaa/gpt2_finish_my_sentence_prompt.py: call GPT-2 to complete sentences you start ...

dsp

This folder contains:

  • dsp/demix/demix.py: very primitive approach to signal source separation. Input: stereo WAV file. Output: two mono WAVs that are linear combinations of the input channels minimizing correlation (globally over the whole length, not windowed or refined in any way)

satsolver

A very simple, easy to understand DPLL SAT solver in C. It was written on an android device while waiting for the bus.

raspi

This folder contains:

  • raspi/irpoll.c: decode 38kHz IR signals from a TV remote control. Not being a hardware buff, I tried the simplest thing that could possibly work, counting on and off periods in multiples of 1/38000 and comparing the resulting patterns with templates that I recorded with the same method. Turns out to work, and pretty reliably at that! Use with a TSOP48xx component (look up the correct type for 38kHz and how to connect it).

js/mini

This folder contains:

  • mandelbrot.html: interactive page that displays a colourful Mandelbrot fractal, with zoom (select rectangle or point) and undo/redo.
  • hoover.html: helps explain the difference between (mouse) hover and hoover.
  • and more

rust

This folder contains stuff written in rust, a non-garbage-collected, strongly typed language designed with safety and speed in mind.

  • rust/noisetokio: snow crate (noiseprotocol implementation) + tokio example program: close-to-minimal example of client/server communication in the async paradigm with post-quantum hybrid encryption as an added bonus
  • ~rust/dupes~: find probable duplicate files by SHA256 - this one is actually useful. Moved to its own repo
  • rust/ecc_test: trying out the Curve25519 / Ristretto implementation curve25519_dalek library available here
  • rust/ot_poc: oblivious transfer protocol using RSA, as described on Wikipedia. Disclaimer: I'm not a professional cryptographer! This might be all wrong.

captive-be-gone

Welcome to the wonderful world of captive portal solving. Many hotels and other venues, instead of just partnering with a free mesh networking initiative who would provide then with truly free wifi at virtually no cost, have instead opted to put up quests for the aspiring programmer, called "captive portals". The reward for solving one is internet access. This folder contains a growing collection of shell scripts which can save you from ever having to undergo the ignominy of clicking through a captive portal manually. Caution: work in progress, unsanitized input might be used in unsafe ways.

  • captive-be-gone/WIFIonICE.sh: Deutsche Bahn ICE trains / icomera AB
  • captive-be-gone/CDWiFi.sh: Czech trains / ombord(?)
  • captive-be-gone/wifipass.py: "wifipass.org"
  • captive-be-gone/m3connect.sh: Accor group hotels / m3connect (works for some m3connect networks only, confirmed mid 2021)
  • captive-be-gone/m34.py: Accor group hotels / m3connect (works in Leipzig)
  • captive-be-gone/m34v2.py: Accor group and other hotels / m3connect (supersedes m34.py)
  • captive-be-gone/hospitality.thecloud.eu.py: generic / TheCloud WiFi
  • captive-be-gone/hospitality.thecloud.eu_mercure_free.py: variant for Mercure
  • captive-be-gone/ham-maximo.py: Hamburg Airport "free wifi"
  • captive-be-gone/mobyklick.py: "mobyklick"

tinform

This folder contains:

  • tinform/tinform.c: tokenizes and reshapes C code to fit a pixmap given as a monochrome (P1 or P4) netpbm file. It will try to put whitespaces on white pixels and other symbols on black pixels. Run it on itself to generate a virtually unlimited range of equivalent programs in different shapes.
  • Makefile: some tests. run make doublecheck to confirm that it works as intended.

haskell

This folder contains stuff written in haskell. Purely recreational, none of it is intended for serious use.

  • haskell/comprviz: compresses input text file with gzip and outputs a HTML file where the background color of each character depends on the coding efficiency (red background = high number of bits, green = low number, blue channel indicates whether a backreference was used)
  • haskell/cyk: Cocke-Younger-Kasami like algorithm for experiments with context-free languages.
  • haskell/editdistviz: visualisation of edit distance (the Levenshtein string metric). the distance between two words is computed and the intermediary results are shown in a beautiful diagram. Output format is SVG.

scheme

This folder contains stuff written in scheme, a classical, extremely flexible, dynamically typed family of programming languages.

  • scheme/wb.scm: Weight-Balanced Trees implementation in scheme, and a proof of concept unit test facility (works with chicken but unfortunately define-syntax macros aren't part of the standard).

cover

  • cover/cover.py: Attempt to produce some cover traffic while using Tor. Actually I'm not at all sure how useful this approach is. I think I've already spotted an obvious flaw.

mastodon

  • mastodon/allmytoots.py: crappy script to download own toot history from a mastodon account to make it easier to find old toots by content. Works for me.
  • mastodon/toottree.py: download the toots belonging to a conversation and display them as a tree
  • mastodon/metabot.py: my first bot. or collection of bots, with multiplexer.

multimedia

  • multimedia/multimediareport.py: run ffmpeg on files to generate report with waveforms, e.g. to quickly spot files that lack an audio track

torx

  • torx/CheckExit.py: collect tls certificates through tor (sometimes there are MitM attempts at exits and it's widely considered a good idea to document and report these). You might also be interested in other people's tools such as exitmap.

trackography

Unique identifiers considered harmful.

  • yourprobes/tea.py: a very simple script that reads probed ESSIDs aloud using text-to-speech. use case: get clueless users to acknowledge the dangers posed by excessive chattiness of their WIFI devices.

emacs

Highlighting iptables rules.