Skip to content

Instantly share code, notes, and snippets.

View FunTimeCoding's full-sized avatar

Alexander Reitzel FunTimeCoding

View GitHub Profile
@FunTimeCoding
FunTimeCoding / packer.log
Created August 24, 2023 11:05
Packer Debian 12 from macOS M1 log
2023/08/24 13:03:56 [INFO] Packer version: 1.9.4 [go1.21.0 darwin arm64]
2023/08/24 13:03:56 [TRACE] discovering plugins in
2023/08/24 13:03:56 [TRACE] discovering plugins in /opt/homebrew/bin
2023/08/24 13:03:56 [INFO] Discovered potential plugin: qemu = /opt/homebrew/bin/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_darwin_arm64
2023/08/24 13:03:56 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2023/08/24 13:03:56 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/08/24 13:03:56 [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/areitzel/.packerconfig
2023/08/24 13:03:56 [WARN] Config file doesn't exist: /Users/areitzel/.packerconfig
2023/08/24 13:03:56 [INFO] Setting cache directory: /Users/areitzel/.cache/packer
2023/08/24 13:03:56 [INFO] Starting external plugin /opt/homebrew/bin/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_darwin_arm64 start builder -packer-default-plugin-name-
@FunTimeCoding
FunTimeCoding / debian.json
Created August 24, 2023 11:01
Packer Debian 12 from macOS M1 (not working)
{
"variables": {
"iso_url": "/Users/areitzel/Downloads/debian-12.1.0-arm64-netinst.iso",
"iso_checksum": "b58e02fe14a52c1dfdacc0ccd6bc9b4edf385c7e8cea1871a3b0fccb6438700b",
"iso_checksum_type": "sha256",
"ssh_username": "debian",
"ssh_password": "debian",
"ssh_wait_timeout": "20m",
"debian_version": "12.1.0"
},
@FunTimeCoding
FunTimeCoding / database-pillar.md
Last active February 19, 2016 14:41
Use MySQL as an extended pillar in Salt.

Master config

file_roots:
  base:
    - /srv/salt/state

pillar_roots:
  base:
 - /srv/salt/pillar
@FunTimeCoding
FunTimeCoding / create-raspbian-sd-card.sh
Last active August 29, 2015 14:15
Copy Raspbian on a SD card.
diskutil unmountDisk /dev/disk2
wget http://downloads.raspberrypi.org/raspbian_latest -O raspbian.img.zip
unzip raspbian.img.zip -d raspbian.img
sudo diskutil partitionDisk /dev/disk2 1 MBR "Free Space" "%noformat%" 100%
sudo dd bs=1m if=raspbian.img of=/dev/rdisk2
sudo diskutil eject /dev/rdisk2
@FunTimeCoding
FunTimeCoding / list-old-pip-packages.sh
Created December 25, 2014 23:22
Print a compact list of outdated pip packages.
#!/bin/sh -e
OUTPUT=$(pip list --outdated)
PACKAGES=$(echo "${OUTPUT}" | grep Current)
NAMES=$(echo "${PACKAGES}" | awk '{print $1}')
for NAME in ${NAMES}; do
echo "${NAME}"
done
@FunTimeCoding
FunTimeCoding / phd
Created June 21, 2014 17:46
phabricator daemons init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: phd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: phabricator
# Description: manages phd
### END INIT INFO
@FunTimeCoding
FunTimeCoding / tmux-session.sh
Last active August 29, 2015 14:02
Simplify start and attach to tmux sessions.
#!/bin/bash
[ "${TMUX}" = "" ] || exit 0
has_session () {
tmux has-session -t $1 2>/dev/null
}
DEFAULT_NAME="_default"