Skip to content

Instantly share code, notes, and snippets.

View johnsimcall's full-sized avatar

John Call johnsimcall

View GitHub Profile
#!/bin/bash
shopt -s nullglob
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do
echo "IOMMU Group ${g##*/}:"
for d in $g/devices/*; do
echo -e "\t$(lspci -nns ${d##*/})"
done;
done;
@johnsimcall
johnsimcall / noip.service
Last active May 17, 2021 04:08 — forked from ericandrewlewis/noip2.service
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-IP Dynamic DNS Updater
#
# 1) Install DUC (Dynamic Update Client) and create the configuration file
# as described on noip website https://my.noip.com/#!/dynamic-dns/duc
# 2) Save this file as /etc/systemd/system/noip.service
# 3) Tell systemd to rescan unit files `sudo systemctl daemon-reload`
# 4) Execute `sudo systemctl enable --now noip`
#
# TODO: Secure this unit file via `systemd-analyze security noip.service`
# More info here https://www.redhat.com/sysadmin/mastering-systemd
@johnsimcall
johnsimcall / byzanz_window.py
Created October 18, 2018 04:35 — forked from noamraph/byzanz_window.py
byzanz_window: Use byzanz to create a GIF screencast of a specific window
#!/usr/bin/env python
"""
Use byzanz to create a GIF screencast of a specific window.
Required tools:
sudo apt-get install byzanz x11-utils xdotool
A tip: use an extra-long duration (-d 100), record your shot, and use
gimp to shorten the duration of the last frame. You need to rename the layer
from "Frame 123 (100000 ms) (combine)" to "Frame 123 (1000 ms) (combine)".