Skip to content

Instantly share code, notes, and snippets.

@jdkelleher
jdkelleher / create-cloud-template.sh
Created December 3, 2023 19:04 — forked from chriswayg/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@jdkelleher
jdkelleher / Makefile.bind
Last active December 3, 2023 18:56
Makefile to help manage bind zone files
#
# Makefile for managing zone updates
#
# Dependencies:
# mkrdns - https://github.com/jdkelleher/mkrdns
# zsu - https://metacpan.org/pod/release/AZS/zsu-1.20/zsu
#
BASE_DIR=/etc/bind/primary
@jdkelleher
jdkelleher / gist:8ef729d0856fd0ee49ad1ab663249735
Created December 6, 2020 17:56
Saltstack state to get ride of motd news in Ubuntu
# Disable and clear motd news
#
disable motd news update:
file.comment:
- name: /etc/default/motd-news
- regex: '^ENABLED.*$'
- char: '#'
- backup: False
clear motd news cache:
for d in Season* ; do cd "$d"; for x in *[^.]???.srt ; do newname=`basename -s .srt "$x"`; mv "$x" "$newname".eng.srt; done; cd ..; done
@jdkelleher
jdkelleher / cue2flac.sh
Last active August 25, 2020 18:12
Use a cue file to split a monolithic audio file, e.g. ape or flac, and then tag it
#!/bin/sh
# Depends on shntools and cuetools for utilities and other packages for some codecs
# sudo add-apt-repository ppa:flacon/ppa ; sudo apt-get update
# sudo aptitude install cuetools shntool flac flacon wavpack
#
# TODO...
# add usage message
# add options