Miscellaneous handy stuff, programming doodles, proofs of concept(s).
fnordomat b3e862f1b3 requirements.txt for mastodon toot download script | 2 weeks ago | |
---|---|---|
aaaa | 2 years ago | |
captive-be-gone | 1 year ago | |
cover | 5 years ago | |
dotfiles | 5 years ago | |
dsp | 10 months ago | |
emacs | 8 years ago | |
gaptexts | 5 months ago | |
haskell | 4 years ago | |
js | 1 year ago | |
mastodon | 2 weeks ago | |
multimedia | 1 month ago | |
raspi | 4 years ago | |
rust | 1 month ago | |
satsolver | 5 years ago | |
scheme | 4 years ago | |
tinform | 4 years ago | |
torx | 8 years ago | |
yourprobes | 5 years ago | |
.gitignore | 9 months ago | |
LICENSE | 8 years ago | |
README.md | 1 month ago | |
netthier_min.svg | 1 year ago |
Miscellaneous stuff, ranging from handy to useless.
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 ...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)A very simple, easy to understand DPLL SAT solver in C. It was written on an android device while waiting for the bus.
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).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.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 bonusrust/ecc_test
: trying out the Curve25519 / Ristretto implementation curve25519_dalek library available hererust/ot_poc
: oblivious transfer protocol using RSA, as described on Wikipedia. Disclaimer: I'm not a professional cryptographer! This might be all wrong.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 ABcaptive-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 WiFicaptive-be-gone/hospitality.thecloud.eu_mercure_free.py
: variant for Mercurecaptive-be-gone/ham-maximo.py
: Hamburg Airport "free wifi"captive-be-gone/mobyklick.py
: "mobyklick"Sadly, the m3connect scripts have stopped working. Their craptive portal is a full blown web app. Coming up with a lightweight solution that doesn't involve a full browser image exceeded my time budget at the time :-(
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.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.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.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/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 treemastodon/metabot.py
: my first bot. or collection of bots, with multiplexer.multimedia/multimediareport.py
: run ffmpeg on files to generate report with waveforms, e.g. to quickly spot files that lack an audio trackmultimedia/shrink-image.sh
: save disk space by shrinking images with imagemagick to a specified jpeg file sizeUnique identifiers considered harmful.
Highlighting iptables rules.
Web app that downloads a random article from Wikipedia in language 1 and uses the libretranslate API to get a translation in language 2, then hides every second word, showing only the length, and prompts the user to guess the missing words.
Inspired by one kind of exercise found in a certain series of language learning books.
This could one day become a fun game, right now only basic checking of the solution is implemented.