Skip to content

Instantly share code, notes, and snippets.

View rien333's full-sized avatar

Rijnder Wever rien333

View GitHub Profile
@rien333
rien333 / sensors_log.py
Created October 10, 2024 15:44
Log data from the `sensors` program to a json file
import sh
import json
from time import sleep
def transform_readings(readings, path=''):
"""Transform all readings from `sensors` into a dict that contains just sensor names and sensor values"""
results = {}
# not all values are dicts
if not isinstance(readings, dict):
@rien333
rien333 / sensors_graph.py
Created October 10, 2024 15:39
sensors_graph.py
import json
from collections import defaultdict
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.cm as cm
import numpy as np
import math
# Map sensors to their unit of measurement.
sensor_measurement_mapping = {'amdgpu-pci-c100.vddgfx.in0_input' : 'V',
@rien333
rien333 / gist:3395bd8dbbdc5f63ea90c7fd784e8b14
Created August 31, 2024 13:46
Dmesg log with bluetooth turned on
[70437.245034] Userspace: Before hibernation with bluetooth on and XHC0 enabled...
[70449.085504] wlan0: deauthenticating from c0:06:c3:0b:84:e6 by local choice (Reason: 3=DEAUTH_LEAVING)
[70449.930432] PM: hibernation: hibernation entry
[70449.936524] Filesystems sync: 0.001 seconds
[70449.936680] Freezing user space processes
[70449.938317] Freezing user space processes completed (elapsed 0.001 seconds)
[70449.938321] OOM killer disabled.
[70449.938615] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[70449.938618] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
[70449.938619] PM: hibernation: Marking nosave pages: [mem 0x09b00000-0x09dfffff]
2024-05-01 18:34:51.997 T:29297 info <general>: -----------------------------------------------------------------------
2024-05-01 18:34:51.997 T:29297 info <general>: Starting Kodi (21.0 (21.0.0) Git:20240408-nogitfound). Platform: Linux x86 64-bit
2024-05-01 18:34:51.997 T:29297 info <general>: Using Release Kodi x64
2024-05-01 18:34:51.997 T:29297 info <general>: Kodi compiled 2024-04-08 by GCC 13.2.1 for Linux x86 64-bit version 6.7.0 (395008)
2024-05-01 18:34:51.997 T:29297 info <general>: Running on Arch Linux 0.0, kernel: Linux x86 64-bit version 6.6.29-1-lts
2024-05-01 18:34:51.997 T:29297 info <general>: FFmpeg version/source: 6.0.1-Kodi
2024-05-01 18:34:51.997 T:29297 info <general>: Host CPU: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz, 4 cores available
2024-05-01 18:34:51.997 T:29297 info <general>: special://xbmc/ is mapped to: /usr/share/kodi
2024-05-01 18:34:51.997 T:29297 info <general>: special://xbmcbin/ is mapped to: /usr/lib/kodi
2024-05-01 18:34:51.997 T:29297 i
# Maintainer: Rijnder Wever <rijnder.wever at gmail.com>
_pkgname=libhighscore-mgba
pkgname="${_pkgname}"-git
pkgver=r8363.5af72a19e
pkgrel=1
pkgdesc="Nintendo Game Boy Advance libhighscore core"
arch=('x86_64')
url="https://github.com/alice-mkh/mgba"
license=('custom:MPL2')
sudo parted -l
Model: WD_BLACK SN770 500GB (nvme)
Disk /dev/nvme0n1: 500GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 316MB 315MB fat32 boot, esp
2 316MB 500GB 500GB ext4
---
/home/rw/.config/systemd/user
---
[Unit]
Description=Shairport Sync - AirPlay Audio Receiver
After=sound.target
Wants=network-online.target
After=pipewire.service wireplumber.service
[Service]
@rien333
rien333 / kodi.log
Created December 20, 2022 10:48
Triggering the video OSD
2022-12-20 11:28:02.470 T:7840 info <general>: -----------------------------------------------------------------------
2022-12-20 11:28:02.470 T:7840 info <general>: Starting Kodi (20.0-RC1 (19.90.901) Git:20221218-nogitfound). Platform: Linux ARM 32-bit
2022-12-20 11:28:02.470 T:7840 info <general>: Using Release Kodi x32
2022-12-20 11:28:02.470 T:7840 info <general>: Kodi compiled 2022-12-18 by GCC 12.1.0 for Linux ARM 32-bit version 5.18.15 (332303)
2022-12-20 11:28:02.470 T:7840 info <general>: Running on BCM2835 with Arch Linux ARM 0.0, kernel: Linux ARM 32-bit version 5.15.83-1-rpi-ARCH
2022-12-20 11:28:02.470 T:7840 info <general>: FFmpeg version/source: 4.4.1-Kodi
2022-12-20 11:28:02.470 T:7840 info <general>: Host CPU: ARMv7 Processor rev 4 (v7l), 4 cores available
2022-12-20 11:28:02.470 T:7840 info <general>: ARM Features: Neon enabled
2022-12-20 11:28:02.470 T:7840 info <general>: special://xbmc/ is mapped to: /usr/share/kodi
2022-12-20 11:28:02.470 T:7840 i
# Maintainer: Felix Yan <[email protected]>
# Contributor: Andrea Scarpino <[email protected]>
pkgname=qt5-webengine
_qtver=5.15.3
pkgver=${_qtver/-/}
pkgrel=1
arch=('x86_64')
url='https://www.qt.io'
license=('LGPL3' 'LGPL2.1' 'BSD')
~> /usr/bin/qutebrowser
Traceback (most recent call last):
File "/usr/bin/qutebrowser", line 33, in <module>
sys.exit(load_entry_point('qutebrowser==1.14.1', 'gui_scripts', 'qutebrowser')())
File "/usr/bin/qutebrowser", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)