This file contains hidden or 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
0. Setup Azure git deployments. | |
1. Add .deployment in root. | |
2. Create directory "deployment" and put build-nuxt.cmd in there. | |
3. Add server.js in root. (Note: this will cause Azure to auto-generate you an IISNode web.config, woot!) | |
4. Change start task to `node server.js` or remove it and let Azure do the same automatically. |
This file contains hidden or 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
<# | |
Adam Hancock - Added VM's in job. | |
.SYNOPSIS | |
Gather Veeam Backup Job Details | |
.DESCRIPTION | |
This script will create a csv file that contains details about each Veeam backup job. | |
This is helpful when you want to ensure consistency when, for example multiple people are creating multiple jobs. |
This file contains hidden or 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
$data = ConvertFrom-StringData((racadm getniccfg | Select-String "IP Address" ) -join "`n") | |
return $data."IP Address" |
This file contains hidden or 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
# This is the cmdlet you'll need to edit with your own domain name or email address | |
if(Get-Module MSOnline){ | |
write-host "Module already installed." | |
}else{ | |
Install-Module -Force MSOnline | |
} | |
$ScriptBlock = {Get-AntiPhishPolicy | Set-AntiPhishPolicy -ExcludedDomains "feedback.smileback.io"} | |
This file contains hidden or 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
## Adam Hancock | |
rm -f output.csv | |
echo "Domain, IP, MX IP, Nameservers" >> output.csv | |
while read d; do | |
p=`echo $d | sed -e 's/www.//g'` | |
website=`dig @8.8.8.8 +short $p | head -n1` | |
mx=`dig @8.8.8.8 +short mx $p | cut -d " " -f 2 | head -n1` | |
nameservers=`dig ns $p +short` | |
nameserver1=`echo $nameservers | head -n1` | |
mx1=`dig +short $p mx | sort -n | awk '{print $2; exit}' | dig +short -f - | head -n1` |
This file contains hidden or 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
# Adam Hancock | |
if(Get-Module MSOnline){ | |
write-host "Module already installed." | |
}else{ | |
Install-Module -Force MSOnline | |
} | |
if(!$Cred){ | |
$Cred = Get-Credential | |
} |
This file contains hidden or 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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$From = "[email protected]" | |
$To = "[email protected]" | |
$Cc = "[email protected]" | |
$Subject = "Here's the Email Subject" | |
$Body = "This is what I want to say" | |
$SMTPServer = "smtp.gmail.com" | |
$SMTPPort = "587" | |
Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl -Credential (Get-Credential) –DeliveryNotificationOption OnSuccess |
This file contains hidden or 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 | |
# https://dl.ubnt.com/unifi/5.11.46/unifi_sh_api | |
#username=ubnt | |
#password=ubnt | |
#baseurl=https://unifi:8443 | |
#site=default | |
#[ -f ./unifi_sh_env ] && . ./unifi_sh_env | |
cookie=$(mktemp) |
This file contains hidden or 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 | |
# port, username, password | |
SERVER="localhost:9091 --auth user:pass" | |
# use transmission-remote to get torrent list from transmission-remote list | |
TORRENTLIST=`transmission-remote $SERVER --list | sed -e '1d' -e '$d' | awk '{print $1}' | sed -e 's/[^0-9]*//g'` | |
# for each torrent in the list | |
for TORRENTID in $TORRENTLIST |
This file contains hidden or 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 | |
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
# delete all evicted pods from all namespaces | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod --namespace $1 | |
# delete all containers in ImagePullBackOff state from all namespaces | |
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
OlderNewer