Skip to content

Instantly share code, notes, and snippets.

View RavuAlHemio's full-sized avatar

Ondřej Hošek RavuAlHemio

View GitHub Profile
@RavuAlHemio
RavuAlHemio / Encrypt-SpanishWord.ps1
Last active October 12, 2022 09:19
encrypt and decrypt Spanish Wordle solutions
[CmdletBinding()]
Param (
[Parameter(Position=1,Mandatory=$true)]
[string]
$Word,
[Parameter(Position=2)]
[byte[]]
$FixedSalt
)
@RavuAlHemio
RavuAlHemio / github-deploy.py
Created January 31, 2022 00:07
script that downloads the newest Github artifact, unpacks it and deploys its contents
#!/usr/bin/env python3
import base64
from fnmatch import fnmatch
import io
import os
import sys
import subprocess
import tempfile
import time
import urllib.parse
@RavuAlHemio
RavuAlHemio / USB_Mini-B_KLS1-229-5FA.kicad_mod
Created May 30, 2021 17:17
KiCad work-in-progress footprint for the KLS1-229-5FA through-hole Mini-USB connector
(module USB_Mini-B_KLS1-229-5FA (layer F.Cu) (tedit 60B3C276)
(descr https://img80002547.weyesimg.com/uploads/www.klselectronic.com/addon/15705980428308.pdf)
(tags "usb mini receptacle")
(fp_text reference REF** (at 0 -5.35) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value %R (at 0 1.05) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -4.65 6.775) (end -4.65 -3.875) (layer F.CrtYd) (width 0.05))
# released under CC0: https://creativecommons.org/publicdomain/zero/1.0/
from decimal import Decimal
DEFAULT_TOLERANCE = "20"
COLOR_ALIASES = {
# alternative names/spellings
"grey": "gray",
"purple": "violet",
@RavuAlHemio
RavuAlHemio / cisco-section.awk
Created April 6, 2021 20:55
awk script that does similar filtering to Cisco's "section" filter (show running-config | section ^interface Vlan)
/^[^ ]/{printage = 0;} /PATTERN/{printage = 1;} { if (printage) { print $0; } }
Example:
awk '/^[^ ]/{printage = 0;} /^interface Vlan/{printage = 1;} { if (printage) { print $0; } }' configfile

Der Strom

  • Strom ist sehr dünn. Deshalb braucht man für Strom auch keinen Schlauch.

    Er geht durch einfachen Draht, so dünn ist er.

  • Mit Holz kann man keinen Strom übertragen. Wahrscheinlich saugt Holz ihn auf. Mit Kunststoff ist es genauso.

  • Wenn Strom nicht gebraucht wird, ist er nicht dünn. Im Gegenteil: er scheint

@RavuAlHemio
RavuAlHemio / Evva4KSKeyCap.scad
Created November 17, 2019 00:52
key cap for a standard EVVA 4KS key (SL)
// unit: 1mm
key_thickness = 2.25;
bow_width = 25.5;
bow_corner_radius = 6.0;
bow_corner_advance = 12.25;
bow_curve_advance = 10.0;
bow_curve_radius = 3.0;
bow_curve_outer_offset = 3.25;
stop_width = 13.0;
stop_advance = 5.517;
@RavuAlHemio
RavuAlHemio / Evva4KSBowAndStop.scad
Created November 16, 2019 21:07
the bow and stop of a standard EVVA 4KS key (SL)
// unit: 1mm
key_thickness = 2.26;
bow_width = 25.5;
bow_corner_radius = 6.0;
bow_corner_advance = 12.25;
bow_curve_advance = 10.0;
bow_curve_radius = 3.0;
bow_curve_outer_offset = 3.25;
stop_width = 13.0;
@RavuAlHemio
RavuAlHemio / mds2midi.py
Last active November 26, 2024 08:48
MDS to standard MIDI file converter
#!/usr/bin/env python3
#
# MDS to standard MIDI file converter
#
# see also http://www.vgmpf.com/Wiki/index.php?title=MDS
#
import argparse
import io
import struct
from typing import BinaryIO, List, Optional
// paste this into the JavaScript console while Hetzner's noVNC is open
RFB.messages.keyEvent(rfb._sock, XK_Alt_L, 1);
RFB.messages.keyEvent(rfb._sock, XK_Sys_Req, 1);
// raise elephants here as required
RFB.messages.keyEvent(rfb._sock, XK_9, 1);
RFB.messages.keyEvent(rfb._sock, XK_9, 0);
RFB.messages.keyEvent(rfb._sock, XK_H, 1);
RFB.messages.keyEvent(rfb._sock, XK_H, 0);