Skip to content

Instantly share code, notes, and snippets.

@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active October 20, 2025 00:22
LVM on LUKS Arch installation with systemd-boot
@rosswilson
rosswilson / pot-transfer.json
Created February 21, 2018 14:23
Monzo Webhook Payloads
{
"type": "transaction.created",
"data": {
"id": "tx_00009TnTFcG7cG6bxxxxxx",
"created": "2018-02-19T17:32:03.234Z",
"description": "pot_00009Qoyee0RPU0sxxxxxx",
"amount": -40000,
"fees": {},
"currency": "GBP",
"merchant": null,
@MawKKe
MawKKe / cryptsetup-with-luks2-and-integrity-demo.sh
Last active October 25, 2025 07:05
dm-crypt + dm-integrity + dm-raid = awesome!
#!/usr/bin/env bash
#
# Author: Markus (MawKKe) [email protected]
# Date: 2018-03-19
#
#
# What?
#
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
#
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 28, 2025 09:58
set -e, -u, -o, -x pipefail explanation
@cemeyer
cemeyer / ⁄etc⁄logrotate.conf
Last active October 22, 2023 12:06
Sane logrotate.conf settings
# create new (empty) log files after rotating old ones
create
# use date as a suffix of the rotated file
dateext
compress
compresscmd /bin/zstd
compressext .zst
compressoptions -18 -T0 --rm
@nealfennimore
nealfennimore / wireguard.conf
Last active September 9, 2025 19:22
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@varqox
varqox / recording_application_and_microphone.md
Last active August 16, 2024 15:09
How to record multiple applications and microphone into one audio file on Linux using PulseAudio

How to record multiple applications and microphone into one audio file on Linux

Step 0. Terminology

Sinks are for output, sources are for input. To stream source to sink a loopback must be created. More shall you find there.

Step 1. Create output sink that will be recorded

Our output sink will be named recording.

pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording
@Icaruk
Icaruk / multipleGitProfiles.md
Last active November 25, 2025 21:48
How to have multiple profiles on git

Last update: 30-01-2024
Last view: 25-11-2025

Step 1

Go to your work folder, mine is located at: F:/Work/EnterpriseName/

And then create a .gitconfig-work with the following data:

@p7cq
p7cq / Arch_Linux_Root_on_LVM.md
Last active April 17, 2025 02:14
Install Arch Linux with Root on LVM

Arch Linux with Root on LVM

Arch Linux with root on LVM and systemd boot.

  • Set a bigger font (if using a 4K laptop display)
setfont latarcyrheb-sun32
  • To connect to the internet add the ESSID and passphrase
@sprytnyk
sprytnyk / mem.py
Last active March 18, 2021 16:25
A dummy decorator function to measure memory usage of a Python function, method, etc.
import resource
from functools import wraps
def mem_it(func):
@wraps(func)
def wrapper(*args, **kwargs):
pre = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024
print(f'Pre-memory usage: {pre} (mb)')
f = func(*args, **kwargs)