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 | |
set -e | |
IP=$(hostname -I | cut -d' ' -f1) | |
cd ~ || echo "No home directory for this user, please install with a user that has a home directory." || exit 1 | |
PIP="" | |
if command -v pip >/dev/null 2>&1; then | |
PIP="pip" |
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 | |
IP=$(hostname -I | cut -d' ' -f1) | |
cd ~ || echo "No home directory for this user, please install with a user that has a home directory." || exit 1 | |
command -v espeak-ng >/dev/null 2>&1 || { echo >&2 "Piper TTS requires espeak-ng but it's not installed. Please install it before running this script."; exit 1; } | |
echo "********************************************************************************" | |
echo "Creating virtual environment at ~/tts_venv" | |
echo "********************************************************************************" |
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
"""Webhook reader.""" | |
import os | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route("/events", methods=["POST"]) | |
def webhook(): | |
"""Save the contents of the webhook to a file and return a 204.""" |
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
select CONCAT(table_schema, '.' , table_name) from information_schema.tables where table_schema like '%search_param%' or table_name like '%search_param%' |
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 | |
################################################################################ | |
# Run in a directory with multiple Git repos to pull down the latest version | |
# of remote code. | |
################################################################################ | |
shopt -s nullglob | |
array=(*/) | |
for dir in "${array[@]}"; do |
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
for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text) | |
do | |
echo "${region}: $(aws ec2 describe-images --owners amazon --filters Name=name,Values=amzn-ami-hvm-*s3 --query "reverse(sort_by(Images, &CreationDate))[0].ImageId" --output text --region $region)" | |
done |
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
[System.Windows.Forms.MessageBox]::Show("Manually restart the servers, verify functionality, EMAIL CUSTOMER, then press Yes." , "Manually Restart Servers" , 4, 48) | |
Write-Host "Doing it anyway" | |
# SIG # Begin signature block | |
# MIIFkQYJKoZIhvcNAQcCoIIFgjCCBX4CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB | |
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR | |
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQULB98kUhxMWzBwDwG6FYPOD1J | |
# QWmgggMqMIIDJjCCAg6gAwIBAgIQFsbzSX80tbNKiMJWHodVdDANBgkqhkiG9w0B | |
# AQsFADAcMRowGAYDVQQDDBFtZ3JheUBCdXJ3b29kLmNvbTAeFw0xOTAzMTYxOTEz | |
# MjRaFw0yMDAzMTYxOTMzMjRaMBwxGjAYBgNVBAMMEW1ncmF5QEJ1cndvb2QuY29t |
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
foreach ($server in ("SERVER1", "SERVER2")) { | |
Restart-Computer -ComputerName $server -Force | |
do { | |
$Ping = Test-Connection -ComputerName $server -Count 1 -Quiet | |
} until ($Ping -eq $True) | |
Write-Host -ForegroundColor "Green" "$($server) is up" | |
} |