Skip to content

Instantly share code, notes, and snippets.

View adRn-s's full-sized avatar

A.s. adRn-s

View GitHub Profile
@adamchainz
adamchainz / test_migrations.py
Last active June 29, 2023 14:25
Django test for pending migrations
from io import StringIO
from django.core.management import call_command
from django.test import TestCase
class PendingMigrationsTests(TestCase):
def test_no_pending_migrations(self):
out = StringIO()
try:
call_command(
@thingsiplay
thingsiplay / ?
Last active August 27, 2024 08:24
cheat.sh - The only cheat sheet you need
#!/bin/env bash
cheat='curl -s cheat.sh'
menu='fzf --reverse'
pager='less -R -c'
cachefile_max_age_hours=6
# Path to temporary cache file. If your Linux system does not support /dev/shm
# or if you are on MacOS, then change the path to your liking:
cachefile='/dev/shm/cheatlist' # GNU+LINUX
@timothyham
timothyham / ipv6guide.md
Last active April 24, 2025 05:24
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

-- vim: tabstop=2 shiftwidth=2 expandtab
-- We almost always start by importing the wezterm module
local wezterm = require 'wezterm'
-- Define a lua table to hold _our_ module's functions
local module = {}
-- Returns a bool based on whether the host operating system's
-- appearance is light or dark.
function module.is_dark()