Envsubst is a useful tool that saves you from writing complex and brittle seds
export LOGSTASH_HOST="logstash.example.com:5044"
export CACHE_LOGS_DIRECTORY="/var/lancache/logs"| #!/bin/bash | |
| ipmitool raw 0x3a 0x07 0x01 0x00 0x01 | |
| ipmitool raw 0x3a 0x07 0x02 0x00 0x01 | |
| # To run at each boot, add to root crontab: | |
| # @reboot /root/lenovo-x3550-m5-acoustic-mode.sh |
| wget --mirror \ | |
| --timestamping \ | |
| --continue \ | |
| --ftp-user="user" \ | |
| --ftp-password="password" \ | |
| --secure-protocol=auto \ | |
| --no-check-certificate \ | |
| --no-proxy \ | |
| --passive-ftp \ | |
| --no-host-directories \ |
| #!/bin/bash | |
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| repos=( | |
| "zeropingheroes/lanager" | |
| "zeropingheroes/lancache" | |
| "zeropingheroes/lancache-elk" | |
| "zeropingheroes/lancache-dns" | |
| "zeropingheroes/lancache-sniproxy" |
| #!/bin/bash | |
| rsync -aHAXvhW --no-compress --progress /source /destination |
| #!/bin/bash | |
| find backups/ -ctime +28 -name "*.tar.gz" -print -delete |
| #!/bin/bash | |
| set -e | |
| HOURS_FROM_NOW=${1,,} | |
| if ! [[ $HOURS_FROM_NOW =~ ^-?[0-9]+$ ]] ; then | |
| echo 'Argument "hours from now" must be an integer' | |
| exit 1 | |
| fi |
| # In Diagnostics > Command Prompt, run: | |
| mkdir -p /root/.ssh # Create a .ssh folder for the pfSense root user | |
| ssh-keygen -t rsa -q -b 2048 -N "" -f /root/.ssh/id_rsa # Generate a public/private key pair for pfSense | |
| cat /root/.ssh/id_rsa.pub # Get pfSense's public key for adding to the remote server | |
| ssh -oStrictHostKeyChecking=no [email protected] # Add the remote host's host key to pfsense's "known_hosts" file | |
| # Run this command in Diagnostics > Command Prompt | |
| # and if it succeeds, add it as a cron job in Services > Cron | |
| /usr/bin/scp -i /root/.ssh/id_rsa /cf/conf/config.xml [email protected]:~/config-`date +\%Y-\%m-\%d`.xml 2>&1 | /usr/bin/logger -t config-backup |
| module['exports'] = function asanaToDiscord(hook, callback) { | |
| var discordApiUrl = 'https://discordapp.com/api/webhooks/' + hook.params.discord_webhook_id + '/' + hook.params.discord_webhook_token; | |
| var discordAvatarUrl = "https://pbs.twimg.com/profile_images/852570851400482820/zGCC6jNZ_400x400.jpg"; | |
| var asanaApiUrl = "https://app.asana.com/api/1.0/"; | |
| var asanaPersonalAccessToken = hook.params.asana_personal_access_token; | |
| var request = require('request'); | |
| function getTask(eventId, taskId) { |
| #!/bin/bash | |
| UFW="/usr/sbin/ufw" | |
| LETSENCRYPT="/usr/bin/letsencrypt" | |
| CHGRP="/bin/chgrp" | |
| CHMOD="/bin/chmod" | |
| TIMEOUT="/usr/bin/timeout" | |
| SERVICE="/usr/sbin/service" | |
| MURMURD="/usr/sbin/murmurd" |