Skip to content

Instantly share code, notes, and snippets.

@emptythevoid
emptythevoid / gist:a38944fd43a2bc92523606ad1de7ba1c
Last active February 18, 2026 11:41
Install Samba AD DC on Debian 12

All of these steps are completed on a fresh install of Debian 12 without GUI. Include SSH server during installation.

For this example, my domain will be samba.lan, my domain controller is dc1.samba.lan and the IP address is 192.168.122.190

During the Debain 12 setup, go ahead and name your server dc1

For domain, go ahead and put in samba.lan

After install, confirm you have internet and DNS working. Go ahead and apt update and install any pending updates.

@kiview
kiview / docker_volume_backup.sh
Last active October 24, 2024 18:36
Docker-Compose volume backup
#!/bin/bash
compose_file_path=$1
project_name=$2
backup_path=$3
function backup_volume {
volume_name=$1
backup_destination=$2
@ekinertac
ekinertac / field_blank_null.md
Last active December 4, 2024 06:03
Django null/blank field explanation
Fields null=True blank=True
CharField, TextField, SlugField, EmailField, CommaSeparatedIntegerField DON'T Django's convention is to store empty values as the empty string, and to always retrieve NULL or empty values as the empty string for consistency. OK Do this if you want the corresponding form widget to accept empty values. If you set this, empty values get stored as empty strings in the database.
BooleanField DON'T Use NullBooleanField instead. DON'T
IntegerField, FloatField, DecimalField OK If you wabt to be able to set the value to NULL in the database OK if you want the corresponding form widget to accept empty values. if so out will also want to set null=True
DateTimeField, DateField, TimeField OK if you want to be able to set the value to NULL in the database. OK If you want the corresponding form widget to accept empty values, or if you are using auto now or auto now add. If so, you will al
@squarism
squarism / iterm2.md
Last active March 14, 2026 21:58
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key