Skip to content

Instantly share code, notes, and snippets.

View ikem-krueger's full-sized avatar

Ikem Krueger ikem-krueger

View GitHub Profile
@omltcat
omltcat / caddy_labels.md
Last active December 4, 2025 11:17
Caddy with Docker Labels: Easy config for wildcard certs and Authelia

What is this?

One great feature of caddy-docker-proxy is that you can quickly define config rules with Docker Compose labels in each containers on the fly like Traefik, instead of at a centralized place. With this feature, we can define everything in compose files, and don't ever need to mess with a config file (Caddyfile or JSON).

Taking advantage of snippets, I created this docker-compose.yaml example so that you can quickly define routing rules and add authetication like Authelia with just 3 lines of labels below each docker container you use.

With this example, should not ever need to manually edit Caddyfile config.

When you add a new container, you just need to do this:

networks:
@shmup
shmup / proton
Created December 7, 2023 19:41
easily run an .exe with proton on linux
#!/usr/bin/env bash
# This script launches a Windows executable using Proton within a Linux environment.
# It requires exactly one argument: the path to the executable to run.
# It sets up a separate Proton prefix for each executable to avoid conflicts.
# Usage: proton <path-to-executable>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <executable-path>"
exit 1
@v-fox
v-fox / NVMe_tweaks.md
Last active November 22, 2025 20:03
Linux kernel optimizations for NVMe

By default Linux distros are unoptimized in terms of I/O latency. So, here are some tips to improve that.

Most apps still don't do multi-threaded I/O access, so it's a thread-per-app which makes per-app speed always bottlenecked by single-core CPU performance (that's not even accounting for stuttering on contention between multiple processes), so even with NVMe capable of 3-6 GB/s of linear read you may get only 1-2 GB/s with ideal settings and 50-150/100-400 MB/s of un/buffered random read (what apps actually use in real life) is the best you can hope for.

All writes are heavily buffered on 3 layers (OS' RAM cache, device's RAM cache, device's SLC-like on-NAND cache), so it's difficult to get real or stable numbers but writes are largelly irrelevant for system's responsiveness, so they may be sacrificed for better random reads.

The performance can be checked by:

  • `fio --name=read --readonly --rw={read/randread} --ioengine=libaio --iodepth={jobs_per_each_worker's_command} --bs={4k/2M} --direct={0/1} --num
@thenomadcode
thenomadcode / snapraidsync.sh
Created February 3, 2023 17:17
Snapraid Sync script from Zack Reed, slightly modified to send Slack notifications
#!/bin/bash
#######################################################################
# This is a helper script that keeps snapraid parity info in sync with
# your data and optionally verifies the parity info. Here's how it works:
# 1) Shuts down configured services
# 2) Calls diff to figure out if the parity info is out of sync.
# 3) If parity info is out of sync, AND the number of deleted or changed files exceed
# X (each configurable), it triggers an alert email and stops. (In case of
# accidental deletions, you have the opportunity to recover them from
@julianlam
julianlam / laptop-s2idle-to-deep.md
Last active November 29, 2025 13:31
Changing laptop suspend from s2idle to deep sleep #blog

One thing I noticed ever since I bought my second Dell XPS was that the battery life was relatively abysmal when the laptop was asleep. I'd suspend my laptop at work, bring the laptop home, and the next morning I'd be down 25-50% of my battery life! More than once, I'd leave my laptop for a couple days and come back to a completely dead laptop1.

My first inclination was that the laptop was waking up on its own. It does happen occasionally with Linux (which, in an of itself, is pretty concerning2), but in this case, I was reasonably certain it wasn't the case, as evidenced by the battery drop overnight when waking a still-sleeping laptop.

While there are a plethora of articles online about sleep/standby (suspend to RAM) and hibernate (suspend to disk), the root cause was that some hardware configurations support three different modes of sleep: s2idle, shallow, and deep.

According to the [Linux Kernel documentation](https://www.kernel.org/doc/html/v4.15/admin-guide/pm/sleep-states

@Beyarz
Beyarz / default.txt
Created August 5, 2021 18:56
The Default Username and Password on all Raspberry Pi OS
Raspberry Pi Distributions Username Password
Raspberry Pi OS pi raspberry
DietPi root dietpi
Lakka Linux root root
Kali Linux root toor
OpenELEC root openelec
Arch Linux ARM root root
Debian pi raspberry
LibreELEC root libreelec
OSMC osmc osmc
@pratyakshm
pratyakshm / windowsinstallusingdism.md
Last active November 23, 2025 23:15
Installing Windows 11 on any device using DISM

Install Windows 11 on unsupported devices

Guide to install Windows 11 on any PC (does not involve ISO modifications) This guide will take you through a clean and simple way to install Windows 11 on your device by bypassing all requirements without doing any ISO modifications. Note: Guide shows fresh installation only.

Requirements:

  1. ISO file (Link 1) (Link 2) (22000.65)
  2. Rufus Microsoft Store GitHub Website
  3. USB drive [8GB or more]
@Alee14
Alee14 / win-dism.md
Last active November 26, 2025 10:03
Installing Windows using CMD. (UEFI and BIOS Supported)

Installing Windows using CMD. (UEFI and BIOS Supported)

Guide created by Andrew Lee. Supports Windows 7, 8, 10, and 11.

Note that this guide does not go into detail, it's just providing the commands to install Windows.

Be cautions when doing this when dualbooting, please backup any existing data or you will lose them all.

Open CMD

First open CMD by pressing the following keys after booting into setup: Shift + F10

Creating Partition

Go to settings->system->developer options, and enable usb debugging and rooted debugging.
Then do these adb commands to fix data on sprint.

adb root
adb shell
content insert --uri content://telephony/carriers --bind name:s:"SprInternet" --bind numeric:s:"312530" --bind type:s:"default,supl,mms,cbs,ia,dun" --bind protocol:s:"IPV4V6" --bind mcc:i:"312" --bind mnc:s:"530" --bind apn:s:"x.ispsn"
@eNV25
eNV25 / hp-bios-update.md
Last active November 20, 2025 07:16
Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

To update the BIOS/UEFI firmware requires HP-specific files in the EFI System Partition, also referred to as ESP.

On a Linux system, the ESP is typically mounted on /boot/efi or /efi. Whithin you should also find a EFI directory, e.g. /boot/efi/EFI or /efi/EFI. This article assumes that the ESP is mounted on /efi and that the /efi/EFI directory exists. You can replace that with the mount point your system uses.

The HP-specific files are located in /efi/EFI/HP or /efi/EFI/Hewlet-Packard. These files typically come preinstalled in HP Windows PCs. If you have these files you could skip Install HP-specific files.