Skip to content

Instantly share code, notes, and snippets.

View lulezi's full-sized avatar

Lucius Humm lulezi

  • elage GmbH
  • Basel, Switzerland
View GitHub Profile
@productdevbook
productdevbook / drizzle-orm.md
Last active April 30, 2026 19:34
Drizzle ORM PostgreSQL Best Practices Guide (2025)

Drizzle ORM PostgreSQL Best Practices Guide (2025)

Latest Drizzle ORM features and optimal schema patterns

Major 2025 Update: PostgreSQL now recommends identity columns over serial types. Drizzle has fully embraced this change.

import { pgTable, integer, text, timestamp, varchar } from 'drizzle-orm/pg-core';
@withakay
withakay / timemachine-backups-using-usb-passthrough-and-proxmox.md
Last active March 29, 2026 08:56
A quick guide to setting up Time Machine backups with an Ubuntu VM on Proxmox with USB Passthrough

Setting up Time Machine Backups Using Proxmox (v8.2) and Ubuntu (24.04)

This guide assumes you already have a basic Ubuntu 24.04 VM running on Proxmox. If not, you should set that up first. The VM can be fairly minimal; for example, 8GB of storage and 1GB of RAM should suffice.

It also assumes you have a USB Storage device that you want to use for Time Machine backups

Mapping a USB Drive to the Ubuntu VM Using Virtio in Proxmox

Mapping a USB drive via the Proxmox GUI is quick and easy, but the performance may be suboptimal because the driver is emulated. For better performance, it's recommended to use the virtio driver, which is paravirtualized. Paravirtualization allows the guest VM to interact more directly with the hardware, improving I/O performance compared to emulated devices.

@copyleftdev
copyleftdev / parallel.md
Created August 24, 2024 06:51
GNU Parallel Mastery: The Ultimate Cheat Sheet

🚀 GNU Parallel Mastery: The Ultimate Cheat Sheet

📊 Basic Usage

Command Description Example
parallel echo ::: A B C 🔤 Process items in parallel Output: A, B, C (in any order)
parallel echo {} ::: *.txt 🔍 Use {} as placeholder Echoes names of all .txt files
cat file.txt | parallel echo 📥 Read input from stdin Processes each line of file.txt
parallel -j4 command ::: item1 item2 item3 🔢 Limit to 4 jobs at a time Runs 'command' on items, max 4 parallel
@gurki
gurki / logmojis.md
Last active October 22, 2025 09:30

logmojis

A collection of useful emojis for logging and debugging. Cheerio 🙃.

status

✔️ success, done
failure, error
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 29, 2026 15:36
set -e, -u, -o, -x pipefail explanation
@mihow
mihow / load_dotenv.sh
Last active April 20, 2026 14:50
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 14, 2026 19:34
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@rmehner
rmehner / install_pdftk.sh
Last active May 6, 2021 03:54
Install PDFTk without touching up the permissions
#!/usr/bin/env bash
# This is based on this excellent gist https://gist.github.com/jvenator/9672772a631c117da151
# Nothing of this is my original work, except that I made the download link an argument
# to this script, so it installs on OSX 10.11
#
# Thank you jvenator & sethetter
set -e
error() { info "$1"; exit 1; }
@bastianallgeier
bastianallgeier / nginx
Last active September 23, 2025 01:05
nginx setup
# block content
location ~ ^/content/(.*).(txt|md|mdown)$ {
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect;
}
# block all files in the site folder from being accessed directly
location ~ ^/site/(.*)$ {
rewrite ^/site/(.*)$ /error redirect;
}