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 | |
# (optional) You might need to set your PATH variable at the top here | |
# depending on how you run this script | |
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Hosted Zone ID e.g. BJBK35SKMM9OE | |
ZONEID="" | |
# The CNAME you want to update e.g. hello.example.com |
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
# Title: Install LMDE (Linux Mint Debian Edition) 17 with LVM on LUKS (encryption) & hibernation support | |
# | |
# Description: These are very rough notes for installing LMDE with | |
# encryption via LVM on top of LUKS. | |
# - This includes SWAP being within LUKS | |
# - Includes fixing hibernation (which will also apply to Debian Jessie or greater) | |
######## | |
# 1. Boot from LMDE DVD/USB/... |
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
# Useful references: | |
# | |
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
# https://ss64.com/vb/sendkeys.html | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
# | |
# Future enhancements - use events rather than an infinite loop | |
$wsh = New-Object -ComObject WScript.Shell | |
while (1) { |
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 "proxy=http://172.16.190.14:3128" >> /etc/yum.conf | |
sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo | |
sed -i 's/^#baseurl/baseurl/g' /etc/yum.repos.d/*.repo | |
rm -f /etc/yum/pluginconf.d/fastestmirror.conf |
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
# sefindif - Find interface definitions that have a string that matches the | |
# given regular expression | |
sefindif() { | |
REGEXP="$1"; | |
pushd /usr/share/selinux/devel/include > /dev/null 2>&1; | |
for FILE in */*.if; | |
do | |
awk "/(interface\(|template\()/ { NAME=\$NF; P=0 }; /${REGEXP}/ { if (P==0) {P=1; print NAME}; print };" ${FILE} | sed -e "s:^:${FILE}\: :g"; | |
done | |
popd > /dev/null 2>&1; |
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
""" | |
Requirements: | |
$ sudo pip install boto dnspython | |
Edit ~/.boto to use your AWS credentials | |
""" | |
import time | |
import sys |