Skip to content

Instantly share code, notes, and snippets.

View shortcord's full-sized avatar
🏳️‍⚧️

Tristan Smith shortcord

🏳️‍⚧️
View GitHub Profile
@shortcord
shortcord / example.sh
Created January 27, 2020 14:33
Import a existing VM into Proxmox
# Mount the storage or CD to a USB disk
cd ./storage
# Create the VM to import to
# we are assuming id of 1100
VMID=1100
qm create "${VMID}" \
--name "Imported VM" \
--memory 1024 \
--cores 4
@shortcord
shortcord / wipedisks.sh
Last active March 4, 2020 14:06
Utility script to wipe disks and report Wearout (Wearout for SSD Only)
#!/usr/bin/env bash
# Built for CloudSouth.com
# This script wipes disk partition tables via wipefs(8) and reports Wearout via smartctl(8).
# Mainly built for SSDs, hence the Wearout reporting.
# Currently Supports Intel, Kingston, and Micron
# If you wish to add support for a disk that isn't listed
# run smartctl -A /dev/disk/sdx, where sdx is the disk you want to add.
# Look for the attribute that is for reporting disk wear, this differs per manufacturer and not every disk reports wear.
# Add that attribute in the egrep command where the "wear" variable is being assiged.
@shortcord
shortcord / rdig.sh
Created September 7, 2020 06:41
Small script to ease rdns lookup queries using dig
#!/bin/sh
dig -x $(dig +short ${1});

Keybase proof

I hereby claim:

  • I am teh-random-name on github.
  • I am shortcord (https://keybase.io/shortcord) on keybase.
  • I have a public key whose fingerprint is E9AC 78F4 163A E6EF 3D50 BCD4 0E6F 6A4F 050B F91E

To claim this, I am signing this object:

#!/usr/bin/env bash
#shellcheck disable=2155
# Cronic v3 Edited - cron job report wrapper
# Copyright 2007-2016 Chuck Houpt. No rights reserved, whatsoever.
# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/\
# Source: https://habilis.net/cronic/
function exitTrap {
## Short out if $TMP is root for some reason