Skip to content

Instantly share code, notes, and snippets.

View i8degrees's full-sized avatar

Jeffrey Carpenter i8degrees

View GitHub Profile
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@i8degrees
i8degrees / notify.py
Created May 1, 2023 08:55
Modern 'wall' command
# Sourced from https://gist.githubusercontent.com/badp/672546/raw/4c6bc7dee6d547d8a7f002ce95c9a66363108f6e/spam.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under MIT license: http://www.opensource.org/licenses/mit-license.php
import os, subprocess, sys
# thanks: Martin-Éric Racine, Roger Pate
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433960
# http://chat.askubuntu.com/rooms/3/conversation/spam-py
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@indrekj
indrekj / truenas-kubectl.md
Last active April 22, 2024 13:59
How to acccess TrueNAS kubectl remotely?

How to acccess TrueNAS kubectl remotely from your local computer?

DISCLAIMER: This is an unofficial guide. If you mess things up then you may lock yourself out of TrueNAS or even worse, make it unusable. There's also no guarantee that this works in the future.

Through SSH

Currently the easiest way to access kubectl is through ssh and k3s tool. If you have ssh access enabled then you can ssh to your TrueNAS server and use it

@jthat
jthat / truenas-scale-kernel-upgrade.adoc
Last active February 3, 2024 09:12
Instructions to ad-hoc upgrade the TrueNAS SCALE kernel

Ad-hoc upgrade of TrueNAS SCALE kernel

Warning
This is unsupported and has the potential to corrupt your data. Proceed at your own risk.

Installation

Choose an existing stable kernel branch, e.g. SCALE-v5.15-stable.

@Th3Whit3Wolf
Th3Whit3Wolf / Arch Secure Laptop Install.md
Last active February 23, 2024 16:00
My install instruction for a secure Arch Linux (sway) laptop workstation

What's Cool

  • Encrypted root partition
    • AES-256 bit cipher
    • Argon2id variant for PBKDF
    • Sha3-512 bit hash
  • rEFInd bootloader
    • With dreary theme
    • Optimal Settings (optimized for aesthetics, and boot time)
  • Boot into backups thanks to refind-btrfs
@kabili207
kabili207 / Rclone systemd service.md
Last active April 20, 2024 15:54
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@noperator
noperator / mount-encrypted-sparsebundle.sh
Last active March 6, 2022 21:25
Decrypt and mount an encrypted sparse bundle disk image using https://github.com/jief666/sparsebundlefs.
# Create mount points for decrypted sparse bundle disk image and full Apple disk image.
sudo mkdir /mnt/bundle /mnt/dmg
# Ensure loopback kernel module is loaded.
lsmod | grep ^loop || sudo modprobe loop
# Decrypt and FUSE-mount sparse bundle disk image. Trailing options help with debugging.
sudo sparsebundlefs <ENCRYPTED_SPARSE_BUNDLE_DISK_IMAGE> /mnt/bundle -s -f -D
# Note partition 2's "Start" and "Size" values.
@porjo
porjo / pulseaudio_rtp.md
Last active March 28, 2024 21:01
Use Pulseaudio to stream audio file to network via RTP

RTP Server

Setup

pacmd load-module module-null-sink sink_name=rtp format=s16le channels=1 rate=16000
pacmd load-module module-rtp-send source=rtp.monitor

This sets up a multicast socket for RTP streams. When I tested this was 224.0.0.56:46136

@i8degrees
i8degrees / Makefile.tb
Last active September 30, 2018 09:48
Video processing tasks for Time Bomb DVD
#!/usr/bin/env bash
#
# Makefile:jeff
#
# Video encoding, subtitles conversion, etc. tasks for "Time Bomb"
#
# TODO(jeff): Swap out use of ffmpeg in favor of x264 for encoding.
#
# mp4box -add previews/mpeg2/ch4_doggy-pounding.mp2 chapter4_doggy-pounding.mp4