Skip to content

Instantly share code, notes, and snippets.

View thimslugga's full-sized avatar
:octocat:

Adam Kaminski thimslugga

:octocat:
View GitHub Profile
@thimslugga
thimslugga / monitor_diskspace_usage.sh
Created November 21, 2023 11:53
Get notification for diskspace usage via Uptime Kuma
#!/usr/bin/env bash
# https://gist.github.com/Eising/8620880440016b9227bc31abeca8b1ac
push_url="https://my.uptime.kuma.server/api/push/PUSHURL"
disk="/dev/sda1" # replace with the disk that you are monitoring
threshold="80" # 80% seems reasonable, but YMMV
percentage=$(df -hl --total ${disk} | tail -1 | awk '{printf $5}')
number=${percentage%\%*}
@thimslugga
thimslugga / adguardhome-allowlist.txt
Last active July 25, 2025 04:35
AdGuard Home Allowlist
# Resources for creating filters
#
# https://adguard.com/kb/general/ad-filtering/create-own-filters/
# https://help.adblockplus.org/hc/en-us/articles/360062733293
# https://datatracker.ietf.org/doc/html/rfc5234
# Other already existing allow lists
#
# https://discourse.pi-hole.net/t/commonly-whitelisted-domains/212
# https://github.com/anudeepND/whitelist
@thimslugga
thimslugga / 01_setup-docker-al2023.md
Last active November 14, 2025 10:27
Setup Docker on Amazon Linux 2023

Setup Docker on Amazon Linux 2023

The following guide is for setting up Docker with docker-compose v2 on Amazon Linux 2023. The steps are intendend for AL2023 on EC2 but should mostly work for the AL2023 VMs running on other hypervisors.

Install and configure Docker on Amazon Linux 2023

Install Base OS Packages

Install the following packages, which are good to have installed:

@thimslugga
thimslugga / pgdb.docker-compose.yml
Last active May 3, 2025 02:32
Docker Compose Files
version: '3.1'
services:
pgdb-server:
image: postgres:latest
restart: always
environment:
POSTGRES_PASSWORD: demo
POSTGRES_DB: postgres
@thimslugga
thimslugga / linux_smap_analyzer.py
Created October 30, 2023 14:28 — forked from LanderlYoung/linux_smap_analyzer.py
Linux /proc/<pid>/smaps analyzer python script
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
'''
analyze /proc/<pid>/smaps
doc
http://liutaihua.github.io/2013/04/25/process-smaps-analysis.html
@thimslugga
thimslugga / hashicorp_nomad_single_node.md
Last active May 3, 2025 02:32
Nomad Single Node Deployment

Hashicorp Nomad (Single Node Deployment)

Overview

Nomad is designed to be a highly-available, quorum-based cluster scheduler. Nomad deployments should ideally have three or more server nodes and one or more client nodes.

However, Nomad does provide a mode, which you can use to run Nomad with a single agent process.

@thimslugga
thimslugga / macOS_automount_nfs.md
Last active September 29, 2023 17:14 — forked from L422Y/osx_automount_nfs.md
Auto-mount NFS share to /Volumes on macOS

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@thimslugga
thimslugga / userChrome.css
Last active September 27, 2023 13:51 — forked from philipashlock/userChrome.css
Custom userChrome.css for use with Firefox + TST or Sidebery on macOS
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Adapted from https://www.reddit.com/r/FirefoxCSS/comments/ao3ydl/configuring_firefox_for_tree_style_tab_usage/ */
/* https://superuser.com/questions/1424478/can-i-hide-native-tabs-at-the-top-of-firefox */
/* https://github.com/Timvde/UserChrome-Tweaks/tree/master */
/* Go to about:config and change the value of toolkit.legacyUserProfileCustomizations.stylesheets to true. */
/* macOS: Place in `/Users/<username>/Library/Application Support/Firefox/Profiles/<random_characters>.default */
/* Alternative, /Users/<username>/Library/Application Support/Firefox/Profiles/<random_characters>.default-esr */
/*
* ------------------------------------------------------------
* "THE BEERWARE LICENSE" (Revision 42):
* <author> wrote this code. As long as you retain this
* notice, you can do whatever you want with this stuff. If we
* meet someday, and you think this stuff is worth it, you can
* buy me a beer in return.
* ------------------------------------------------------------
*/
@thimslugga
thimslugga / cloudflare.ini
Last active July 29, 2023 17:35 — forked from mattisz/ipmi-updater.py
Supermicro IPMI letsencrypt certificate updater
# Cloudflare API credentials for Certbot
## Generate API token: https://developers.cloudflare.com/api/tokens/create
dns_cloudflare_api_token = XXXXX
## The old insecure way that is no longer recommended
#dns_cloudflare_email = [email protected]
#dns_cloudflare_api_key = XXXXXX