Skip to content

Instantly share code, notes, and snippets.

@kmille
kmille / How to use a TPM on Linux.md
Last active March 27, 2025 12:31
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
@paskozdilar
paskozdilar / detect-mp3-bitrate.sh
Last active August 21, 2024 14:14
Detect true mp3 bitrate
#!/usr/bin/env bash
set -euo pipefail
function main() {
# Check for argument
if [ $# -ne 1 ]
then
echo "usage: $0 INFILE"
exit 1
@paulirish
paulirish / bling.js
Last active February 18, 2025 14:08
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };