Skip to content

Instantly share code, notes, and snippets.

View vystrela's full-sized avatar

Ben Stevens vystrela

View GitHub Profile
@vystrela
vystrela / test_fixture_check.py
Last active July 17, 2021 12:59
Automatically generating pytest fixture names from classes
import pytest
import datetime
import time
def log(s):
print("{}: {}".format(datetime.datetime.now(), s))
def vm_fixture(f):
o = f()
wget https://upload.wikimedia.org/wikipedia/commons/a/ad/World_map_blank_with_blue_sea.svg
convert World_map_blank_with_blue_sea.svg -alpha activate -background black -monitor -density 1200 -resize 1920x1080 world.jpg
COLUMNS=636 LINES=124 jp2a --chars="linux " --term-fit world.jpg> world.txt
convert -background black -fill white -font FreeMono -density 1200 -size 4848x2196 -gravity NorthWest label:@./world.txt -pointsize 9 -monitor world_ascii.jpg
echo "world_ascii.jpg generated, ready to use!"
@vystrela
vystrela / hdmi2usbserial.sh
Created July 16, 2017 02:51
Connect to HDMI2USB serial using bash and cat
#!/bin/bash
function restore {
stty echo
kill $CATPID
}
trap restore EXIT
stty -echo
cat /dev/ttyACM0 &