Skip to content

Instantly share code, notes, and snippets.

@sntxrr
sntxrr / docker-compose.yaml
Created September 14, 2025 22:49
My working Traefik + Authentik config
---
services:
reverse-proxy:
image: traefik:v3.3.6
environment:
AWS_ACCESS_KEY_ID: ""
AWS_SECRET_ACCESS_KEY: ""
DUCKDNS_TOKEN: ""
NAMECHEAP_API_USER: "namecheapusername"
NAMECHEAP_API_KEY: "123456789abcdef123456789abcdef"
@mgimenez
mgimenez / reggae.zsh-theme
Created November 4, 2019 20:51
Oh-My-Zsh theme
# the idea of this theme is to contain a lot of info in a small string, by
# compressing some parts and colorcoding, which bring useful visual cues,
# while limiting the amount of colors and such to keep it easy on the eyes.
# When a command exited >0, the timestamp will be in red and the exit code
# will be on the right edge.
# The exit code visual cues will only display once.
# (i.e. they will be reset, even if you hit enter a few times on empty command prompts)
typeset -A host_repr
# translate hostnames into shortened, colorcoded strings
host_repr=('dieter-ws-a7n8x-arch' "%{$fg_bold[green]%}ws" 'dieter-p4sci-arch' "%{$fg_bold[blue]%}p4")
@netaviator
netaviator / netbox-graph.php
Last active September 3, 2023 15:50
Display interface graphs in Netbox fetched from LibreNMS.
<?php
/*
* Display LibreNMS interface graphs in Netbox
*
* 1. Upload this file into the plugin folder of LibreNMS.
* 2. Generate an API key in LibreNMS and insert the connection details below.
* 3. Create graphs in Netbox using the following URL scheme.
* https://nms.level66.network/plugins/netbox-graph.php?device={{ obj.device.name }}&interface={{ obj.name }}&duration=8h
* 4. Save time in your daily work!
*
@mbodo
mbodo / Linux - Systemd cheatsheet.md
Last active June 1, 2025 21:27
Systemd cheatsheet

Linux - Systemd cheatsheet

systemctl

Activates a service immediately:

systemctl start foo.service

Deactivates a service immediately:

@zachbrowne
zachbrowne / index.html
Created August 26, 2016 14:14
The Ultimate Bad Ass VIM Cheat Sheet
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>The Ultimate Bad Ass VIM Cheat Sheet by Zach Browne</title>
<meta name="viewport" content="width=device-width">
<meta name="description" content="The Ultimate Bad Ass VIM Cheat Sheet">
<link rel="canonical" href="http://zachbrowne.me/">
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@outadoc
outadoc / pushover
Last active October 24, 2024 12:31
Pushover Bash Script
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: ./pushover <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
@marcelom
marcelom / pysyslog.py
Created December 5, 2012 18:06
Tiny Python Syslog Server
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'
@bmatherly
bmatherly / APC PDU Monitor Instructions
Last active June 18, 2024 21:16
Script to control an APC MasterSwitch PDU to reset an outlet when the network stops working
sudo cp netmonitor.sh /usr/bin/netmonitor.sh
sudo chmod 755 /usr/bin/netmonitor.sh
sudo crontab -e
Add to crontab:
*/2 * * * * /usr/bin/netmonitor.sh 2>&1 | /usr/bin/logger -t netmonitor