Skip to content

Instantly share code, notes, and snippets.

View technikamateur's full-sized avatar

Daniel technikamateur

  • Dresden, Germany
View GitHub Profile
@r15ch13
r15ch13 / iommu.sh
Last active May 5, 2025 05:41
List IOMMU Groups and the connected USB Devices
#!/usr/bin/env bash
shopt -s nullglob
lastgroup=""
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
for d in $g/devices/*; do
if [ "${g##*/}" != "$lastgroup" ]; then
echo -en "Group ${g##*/}:\t"
else
echo -en "\t\t"
@CodeFetch
CodeFetch / memory-upgrade-wr841-parts
Last active February 29, 2024 14:31
Kompatible Chips für Speicheraufrüstung des TP-Link WR841N
** WICHTIGER HINWEIS **
In den c't-Artikel hat sich ein Fehler eingeschlichen.
Der korrekte Befehl zum Schreiben der MAC-Adresse lautet:
printf "\xaa\xbb\xcc\xdd\xee\xff" | dd conv=notrunc ibs=1 obs=256 seek=508 count=6 of=out.bin
Ich bitte vielmals um Verzeihung.
RAM-Chips
Alliance Memory AS4C32M16D1A-5T
hynix HY5DU121622CTP-D43
hynix HY5DU121622DTP-D43
@cheungnj
cheungnj / script.sh
Last active February 5, 2025 10:21
Convert asciidoc to Github Flavored Markdown
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1
# Install pandoc and asciidoctor
$ sudo apt install asciidoctor
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb
# Convert asciidoc to docbook using asciidoctor
@kachayev
kachayev / dijkstra.py
Last active March 4, 2025 23:42
Dijkstra shortest path algorithm based on python heapq heap implementation
from collections import defaultdict
from heapq import *
def dijkstra(edges, f, t):
g = defaultdict(list)
for l,r,c in edges:
g[l].append((c,r))
q, seen, mins = [(0,f,())], set(), {f: 0}
while q: