Skip to content

Instantly share code, notes, and snippets.

View wilhelmy's full-sized avatar

Moritz Wilhelmy wilhelmy

View GitHub Profile
-- helper functions for repl'ing around
--
--
local repl=_G.repl or {}
local function print_tree(tab)
local indent=""
local text=""
local i=#tab
while i>0 do
@wilhelmy
wilhelmy / holz.org
Last active December 4, 2019 19:52
org-mode table containing different pricing options for wood in Vienna, Austria / Holzpreise Wien
LieferantMaterialFormat mmPreis/m²Preis/StückAnmerkungen
HornbachDreischicht Fichte 19mm B/C1250x250021.9068.44
Tischlerplatte Birke 18mm1250x250019.9562.34
ObiSchalung Doka 27mm500x200017.90
Schalung Doka C 21mm500x15008.99mit feuerverzinktem Kantenschutz zum absägen
@wilhelmy
wilhelmy / dsirc.py
Last active August 31, 2021 23:05
deadsimple IRC client in 55 lines of python to show you that IRC is easy to implement - public domain - see also: http://www.faqs.org/rfcs/rfc1459.html
from sys import stdin
import socket, select
channel = '#worldchat'
server = ('vienna.irc.at',6669)
ident = nick = 'herbert'
user = 'Herbert Herbert'
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect(server)
@wilhelmy
wilhelmy / dirlist.xslt
Last active June 5, 2023 10:44
make nginx dirlistings look like lighttpd's through the magic of xslt-transforming xml dirlistings. I don't even.
<?xml version="1.0"?>
<!--
dirlist.xslt - transform nginx's into lighttpd look-alike dirlistings
I'm currently switching over completely from lighttpd to nginx. If you come
up with a prettier stylesheet or other improvements, please tell me :)
-->
<!--
Copyright (c) 2016 by Moritz Wilhelmy <mw@barfooze.de>
@wilhelmy
wilhelmy / how2pointer.txt
Created December 6, 2013 22:10
People kept asking, thought I could give explaining things a shot for once
How2Pointer
===========
Speicher besteht aus linear angeordneten einzelnen Zellen, diese Zellen haben
Adressen, quasi der Index an der ein Wert steht. Adresswerte werden
üblicherweise im Hexadezimalsystem angegeben. Jede Zelle ist dabei 8 bit = 1
byte breit. Im unten stehenden Diagramm sind dabei 4 1-byte-Werte
zu einem 32-bit breiten sog. "Maschinenwort" zusammengefasst, die Adressen
zwischen diesen Adressen zeigen aber dazwischen (z.B. sind sowohl 0x0F5023A0 als
auch 0x0F5023A1 gültige Adressen, obwohl unten einige Werte dazwischen