repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
date.zshShell32 lines1.6 KiBraw download
#!/usr/bin/env zsh
# ── date.zsh : one-word date/time formats ────────────────────────────────────
# Just aliases over `date`; each prints the format named. `date-cheat` shows
# them all with live output. Never touches `date` itself.

alias d-iso='date +%F'                    # 2026-10-11
alias d-ts='date +%F_%H-%M-%S'            # 2026-10-11_14-30-05  (filename-safe)
alias d-compact='date +%Y%m%d'            # 20261011
alias d-stamp='date +%Y%m%d-%H%M%S'       # 20261011-143005
alias d-time='date +%T'                   # 14:30:05
alias d-hm='date +%H:%M'                  # 14:30
alias d-12='date +%I:%M\ %p'              # 02:30 PM
alias d-long='date +"%A, %B %d, %Y"'      # Sunday, October 11, 2026
alias d-short='date +"%a %b %d"'          # Sun Oct 11
alias d-us='date +%m/%d/%Y'               # 10/11/2026
alias d-eu='date +%d/%m/%Y'               # 11/10/2026
alias d-rfc='date --rfc-email'            # Sun, 11 Oct 2026 14:30:05 +0200
alias d-iso8601='date --iso-8601=seconds' # 2026-10-11T14:30:05+02:00
alias d-utc='date -u +%FT%TZ'             # 2026-10-11T12:30:05Z
alias d-epoch='date +%s'                  # 1791721805
alias d-week='date +%V'                   # ISO week number
alias d-doy='date +%j'                    # day of year
alias d-tomorrow='date -d tomorrow +%F'
alias d-yesterday='date -d yesterday +%F'

date-cheat() {
  local a
  for a in ${(ok)aliases[(I)d-*]}; do
    printf '%-14s %-34s %s\n' "$a" "${aliases[$a]}" "$(eval "${aliases[$a]}")"
  done
}
alias datecheat='date-cheat'