View mikrotik-dhcp-dns-script
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
# NOT fully complete with all the desired features but it does work | |
# Suggested usage - place in the system scheduler and run every few minutes | |
# Set root domain here | |
:local zone "your.internal.domain.com"; | |
:local ttl "00:00:10" | |
:local staticTtl "00:00:30" | |
# TODO : add "nodns" check in static lease comment |
View BASH: Reminder to 'git pull'
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
cd() { | |
# Seconds between alerts: raise this | |
# number if you want to get fewer alerts | |
# Default: 10 min | |
alertDelay=600 | |
# Alert text: this is displayed when you | |
# CD into a git repo | |
alertText="\n##################################################\n This is a git repo. Don't forget to 'git pull'\n##################################################\n" |
View sns-to-slack.js
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
// Added by Ben Yanke | |
// from https://gist.github.com/benyanke/862e446e5a816551928d8acc2d98b752 | |
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// SETUP | |
// urlToUse = in this environment variable, place the name of another environment variable which contains the key. | |
// This allows easy dev/prod switching. |
View fstab-mount-check
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 | |
# Reports on all filesystems declared in fstab, and if they are mounted or not - to detect unmounted filesystems | |
# NOTE: exporter info to stdout, human readable info to stderr | |
# in normal operation, pipe stdout to the datafile and stderr to null or syslog | |
# TODO : add a second error metric so that errors in this script are reported | |
tmpfile="$(mktemp)" |
View feastday-ps1.sh
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
function feast() { | |
tmp="`mktemp`" | |
export date="`date +"%Y-%m-%d"`" | |
timeout 1 curl https://www.missalemeum.com/en/api/v3/date/$date 2> /dev/null > $tmp | |
export title="`cat $tmp | jq -r .[].info.title`" | |
export tempora="`cat $tmp | jq -r .[].info.tempora`" | |
export rank="`cat $tmp | jq -r .[].info.rank`" |
View .bashrc 6-8-2019
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 | |
#~/.bashrc: executed by bash(1) for non-login shells. | |
# kevin gallagher (@ageis) <kevingallagher@gmail.com> | |
export MYUID=$(id -u) | |
export USER="$(id -un)" | |
if [[ "$TILIX_ID" ]] || [[ "$VTE_VERSION" ]]; then | |
source /etc/profile.d/vte.sh | |
fi |
View raspi watchdog
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
sudo apt-get install watchdog | |
sudo echo bcm2708_wdog >> /etc/modules | |
sudo cp /etc/watchdog.conf /etc/watchdog.conf.orig | |
sudo sed -i 's/^#max-load/max-load/' /etc/watchdog.conf | |
sudo reboot |
View cloud-init-nginx-appserver
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
#cloud-config | |
##################################### | |
# Nginx App Server Bootstrap script | |
# | |
# Includes network mount storage config | |
# Designed to be used in a cluster | |
# | |
# Created by Ben Yanke | |
# |
View Elastic Beanstalk Drop All Tables
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
echo "SET FOREIGN_KEY_CHECKS = 0; `mysqldump --add-drop-table --no-data -h $RDS_HOSTNAME -u $RDS_USERNAME -p$RDS_PASSWORD $RDS_DB_NAME | grep 'DROP TABLE'` ;SET FOREIGN_KEY_CHECKS = 1;" | mysql -h $RDS_HOSTNAME -u $RDS_USERNAME -p$RDS_PASSWORD $RDS_DB_NAME |
View Add to bottom of bashrc
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
############################## | |
# Load the serial console on shell open | |
############################## | |
echo "" | |
echo "" | |
echo "" | |
echo "######################" | |
echo "Loading serial console... press ctrl+c to drop to bash instead" |
NewerOlder