Skip to content

Instantly share code, notes, and snippets.

View kmille's full-sized avatar

kmille kmille

View GitHub Profile
@kmille
kmille / How to use a TPM on Linux.md
Last active March 16, 2025 08:05
How to use a TPM on Linux

How to use a TPM on Linux

Prerequisites

  • I use it on Arch Linux (systemd 257.3-1)
  • Install dependency: yay tpm2-tools (5.7-1)

Do I have a TPM 2.0?

kmille@linbox:~ journalctl --boot --dmesg --grep=tpm_tis
@kmille
kmille / connect.sh
Created March 25, 2024 17:41
Get a remote shell for debugging purposes
#!/bin/bash
NCAT_URL="https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/ncat"
NCAT_FILE="$(pwd)/ncat"
HOST="localhost"
PORT="8443"
install_ncat() {
wget $NCAT_URL -O "$NCAT_FILE"
@kmille
kmille / slowpc.sh
Created March 19, 2024 21:47
Analyzing a slow PC
#!/bin/bash
echo "Analysiere System..."
echo "Schreibe Logdatei nach /tmp/analyse.log"
exec > /tmp/analyse.log 2>&1
set -x
ITERATIONS=4
date

Hey,

I have a project called riseup-vpn-configurator which uses python and poetry. The project is already published on AUR, but it's currently broken. The issue is: the python files are missing and are not part of the wheel package. Checkout the PKGBUILD. To build the python project, I use python -m build --wheel --no-isolation. This is recommended by the Arch-Wiki.

I can build it manually, then riseup_vpn_configurator/*.py files are part of the package

kmille@linbox:tmp 
kmille@linbox:tmp curl -L -o riseup.tar.gz https://github.com/kmille/riseup-vpn-configurator/archive/refs/tags/v0.1.2.tar.gz
@kmille
kmille / lineage-root-and-enable-google-pay.txt
Last active December 3, 2022 13:57
How to root and enable Google Pay on a CustomROM (Lineage) (SafetyNet bypass)
How to root and enable Google Wallet on a CustomROM (Lineage). You have to do this after each system update
Preparations
- install Magisk app https://github.com/topjohnwu/Magisk
- install rootbeer (a simple root checking app) https://github.com/scottyab/rootbeer
- install Termux (use the F-Droid version, only needed for testing) https://f-droid.org/en/packages/com.termux/
1) Update Android via OTA-Updater
- Android -> Settings-> System -> Advanced -> Updater
- search for update, DOWNLOAD the image, click INSTALL
@kmille
kmille / mount-last-borg-backup.sh
Created December 3, 2021 17:41
mount last borg backup
#!/bin/bash
set -eu
REPOSITORY="host:directory"
BACKUP_PREFIX="desktop_data"
MOUNTPOINT="/home/user/mnt"
BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
echo -n "Encryption Password: "