Skip to content

Instantly share code, notes, and snippets.

View slmingol's full-sized avatar
:octocat:
codz

Sam Mingo slmingol

:octocat:
codz
View GitHub Profile
@slmingol
slmingol / pihole-v6-letsencrypt-cloudflare.md
Created March 30, 2025 03:54 — forked from kaczmar2/pihole-v6-letsencrypt-cloudflare.md
Automating SSL Certificate Renewal for Pi-hole v6 (acme.sh + Cloudflare)

Pi-hole v6: Automating Let's Encrypt SSL Renewal with Cloudflare DNS

See my other guides for SSL certificates on Pi-hole v6:

Overview

Pi-hole v6 introduces changes to its web server:

  • Embedded Web Server – Pi-hole no longer relies on lighttpd.
@slmingol
slmingol / inspect_https-tls-ssl_certs.md
Created March 25, 2025 18:53 — forked from stonehippo/inspect_https-tls-ssl_certs.md
A couple of ways to look at web server HTTPS/TLS/SSL certificate data via the command line

Inspecting HTTPS (TLS, SSL) certificates from the command line

I needed to inspect an HTTPS site's current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well.

With nmap

nmap -p 443 --script ssl-cert [hostname]
@kaczmar2
kaczmar2 / pihole-v6-letsencrypt-cloudflare.md
Last active April 26, 2025 18:58
Automating SSL Certificate Renewal for Pi-hole v6 (acme.sh + Cloudflare)

Pi-hole v6: Automating Let's Encrypt SSL Renewal with Cloudflare DNS

See my other guides for SSL certificates on Pi-hole v6:

Overview

Pi-hole v6 introduces changes to its web server:

  • Embedded Web Server – Pi-hole no longer relies on lighttpd.
# Applied to namespace "unifi" with kustomize
apiVersion: v1
kind: ServiceAccount
metadata:
name: secret-creator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: secret-creator-role-binding
# Applied to namespace "unifi" with kustomize
apiVersion: v1
kind: ServiceAccount
metadata:
name: secret-creator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: secret-creator-role-binding
@slmingol
slmingol / pihole-timeout.sh
Created January 21, 2025 02:52 — forked from y8s/pihole-timeout.sh
pihole-timeout.sh
#!/bin/bash
# Simple script to change admin login timeout in pihole version 5.17 and up.
# Note that some versions of pihole used 'loginpage.php' instead of 'login.php'
# make the script executeable by typing:
# chmod +x pihole-timeout.sh
# run it by typing:
# sudo ./pihole-timeout.sh
# Check if user is using sudo or is root:
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
@slmingol
slmingol / repair-dualboot-bootloader.sh
Created April 14, 2024 22:47 — forked from tobikris/repair-dualboot-bootloader.sh
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition
$ mount /dev/mapper/fedora_fedora-var /mnt/var
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition
@Kenny-MWI
Kenny-MWI / slack_tweaks.md
Last active April 23, 2025 15:56
Slack Tweaks

Slack Tweaks

In Fall 2023, Slack introduced an updated client with some unpopular UI changes. The tweaks in this document can be used to revert to the old client or hide the new side bar. These will reset every time you fully close Slack but they are easy to re-apply once you get the hang of it.

(Cross Platform) Open Dev Tools [Preferred Option]

To run any of these scripts, you'll need to open the Dev Tools (or Console). You can do this by typing /slackdevtools in a Slack channel or direct message. These are the same Dev Tools you'd get in Chrome if you hit F12. Along the top are tabs for Elements, Console, Sources, Network, etc. You'll want to paste these scripts into the Console tab at the > prompt.

If Slack disables this command, then you can open Dev Tools by setting a system-wide environment variable and using a keyboard shortcut to open the console. If /slackdevtools worked for you then you can skip these next two sections.

(Mac OS) Enable Dev Mode

@qrkourier
qrkourier / krun
Last active April 15, 2023 21:33
run any command in any container image in any Kubernetes namespace
# krun busybox whoami
krun(){
local NAMESPACE=default
local PRIVILEGED=false
while getopts 'n:pu:' OPT; do
case $OPT in
n) NAMESPACE=$OPTARG
;;
p) PRIVILEGED=true