Skip to content

Instantly share code, notes, and snippets.

View Peetz0r's full-sized avatar

Peter Peetz0r

  • not far from RevSpace
View GitHub Profile
@Peetz0r
Peetz0r / knmi.py
Created November 29, 2023 23:56
KNMI dinges
#!/bin/python
import requests, datetime, netCDF4, re
# 6215: Voorschoten
# 6344: Rotterdam The Hague Airport
# 6330: Hoek van Holland
weather_stations = [6330, 6344, 6215]
apiKey = 'ey...J9'
CREATE TABLE mqtt (
ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
topic text[] NOT NULL,
retain boolean NOT NULL,
value text,
PRIMARY KEY (ts, topic)
)
@Peetz0r
Peetz0r / sketch.svg
Created September 25, 2021 18:02
Sketch of what I think could be a hypothetical future 15.6" and 17.3" Framework laptop
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# apt install hedgewars
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
adwaita-icon-theme alsa-topology-conf alsa-ucm-conf at-spi2-core dconf-gsettings-backend dconf-service fontconfig
fonts-wqy-zenhei glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas
gtk-update-icon-cache hedgewars-data hicolor-icon-theme libaacs0 libaom0 libasound2 libasound2-data libasyncns0
libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data
libavahi-common3 libavcodec58 libavformat58 libavutil56 libbdplus0 libbluray2 libcairo-gobject2 libcairo2
@Peetz0r
Peetz0r / output
Created March 21, 2021 21:53
btmgmt doesn't wanna be redirected
peter@doosje /tmp> ./test.py
normal stdout (should be empty):
Index list with 1 item
hci0: Primary controller
addr 9C:FC:E8:F2:41:6B version 10 manufacturer 2 class 0x3c0104
supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr hs le advertising secure-conn debug-keys privacy configuration static-addr phy-configuration wide-band-speech
current settings: powered ssp br/edr le secure-conn
name doosje
short name
hci0: Configuration options
import wasp
import icons
from ubinascii import a2b_base64
WEEKDAYS = [
'Maandag',
'Dinsdag',
'Woensdag',
'Donderdag',
'Vrijdag',
@Peetz0r
Peetz0r / X_PinePhone_Screenshot_2021-02-24-12.52.07.png
Last active February 24, 2021 11:56
Squeekboard keyboard layout for PinePhone
X_PinePhone_Screenshot_2021-02-24-12.52.07.png
<domain type="kvm">
<name>win10</name>
<uuid>36cb74f0-d9f2-4970-98a0-f70332f20cc8</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">28311552</memory>
<currentMemory unit="KiB">28311552</currentMemory>
#!/bin/bash
# this script lives in /etc/NetworkManager/dispatcher.d/02-wowlan
# it matches incoming packets with destination port 22 (0x0016)
# on ipv4 (the short one) and ipv6 (the long one)
if [[ "$@" == "wlan0 up" ]]; then
iw phy0 wowlan enable any
iwpriv wlan0 wow_set_pattern clean
iwpriv wlan0 wow_set_pattern pattern=-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:00:16
@Peetz0r
Peetz0r / comment.md
Last active September 28, 2021 23:57