This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You probably don't care about States, cities, counties, etc. | |
cat <<EOF | |
BEGIN; | |
DROP TABLE IF EXISTS gadm.adm_1; | |
DROP TABLE IF EXISTS gadm.adm_2; | |
DROP TABLE IF EXISTS gadm.adm_3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ABI=`/usr/sbin/pkg config abi` | |
# Modify /usr/local/etc/pkg/repos/pfSense.conf to include FreeBSD data: | |
# FreeBSD: { | |
# url: "pkg+https://pkg.freebsd.org/${ABI}/latest", | |
# mirror_type: "srv", | |
# signature_type: "fingerprints", | |
# fingerprints: "/usr/share/keys/pkg/", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This assumes we are the only one who updates this record | |
# Doesn't need jffs to work. | |
# Base64 encode (use 64-char breaks) this and load into startup script | |
# Decode with openssl (busybox is missing uudecode???) to the filesystem and chmod +x | |
# Add script target location to cron | |
ZONE_ID='WWWWW' | |
API_KEY='XXXXX' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LOG_DATA=$(mktemp --suffix='.log') | |
journalctl -o short --since -30min -u ${2} > ${LOG_DATA} | |
echo "Service ${2} has failed on ${1}. Log attached." | mutt -F mutt.cfg -s "${1} SERVICE FAILURE ALERT" -a ${LOG_LOC} $(cat recipients.cfg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# see documentation at http://linux.die.net/man/1/zshexpn | |
# A: finds the absolute path, even if this is symlinked | |
# h: equivalent to dirname | |
#local __GIT_PROMPT_DIR=${0:A:h} | |
local gitstatus="${0:A:h}/gitstatus" | |
#export GIT_PROMPT_EXECUTABLE=${GIT_PROMPT_USE_PYTHON:-"python"} |