I hereby claim:
- I am thomaswitt on github.
- I am thomas_witt (https://keybase.io/thomas_witt) on keybase.
- I have a public key ASDd6BzSb0TMTRzkv_0yh6Vy0yzZ0NRbzKk2J8ADRo2fcgo
To claim this, I am signing this object:
| #!/bin/zsh | |
| # Check if the video filename is provided as an argument | |
| if [ $# -eq 0 ]; then | |
| echo "Please provide the video filename as an argument." | |
| exit 1 | |
| fi | |
| video_filename=$1 |
| #!/usr/bin/ruby | |
| require 'openssl' | |
| require 'base64' | |
| # Define a method to calculate HMAC SHA-256 | |
| def hmac_sha256(key, data) | |
| OpenSSL::HMAC.digest('sha256', key, data) | |
| end |
| # Load Homebrew environment | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| # Variables | |
| dir_path=$(dirname "$1") | |
| base_filename=$(basename "$1") | |
| log_file="${dir_path}/${base_filename}-error.log" | |
| # Base64 encode the PDF file | |
| base64_string=$(qpdf "$1" --pages . 1 -- - | base64) |
| for region in $(aws ec2 describe-regions --all-regions | jq -r '.Regions | map(.RegionName) | join(" ")'); do echo $region; aws ec2 import-key-pair --region $region --key-name "SSH Key" --public-key-material fileb://<(head -n 1 ~/.ssh/authorized_keys) ; done |
| /* | |
| Compile via: | |
| gcc -x objective-c -framework AVFoundation -framework Foundation personal-voice.c -o personal-voice | |
| Run it in a terminal (make sure you authorized apps to use your personal voice) | |
| */ | |
| #import <AVFoundation/AVFoundation.h> | |
| int main(){ | |
| [AVSpeechSynthesizer requestPersonalVoiceAuthorizationWithCompletionHandler:^(AVSpeechSynthesisPersonalVoiceAuthorizationStatus status){ |
| # Remove unwanted helpers | |
| process_agents() { | |
| local directory=$1 | |
| shift | |
| local agents=("$@") | |
| local pattern=$(IFS=\|; echo "${agents[*]}") | |
| shopt -s nullglob | |
| for plist in "$directory"/{LaunchAgents,LaunchDaemons,PrivilegedHelperTools}/*; do | |
| if ! echo "$plist" | egrep -q "$pattern"; then | |
| if [[ $directory = /Library* ]]; then |
| #!/usr/bin/env bash | |
| # Turn Sony Bravia TV on and off | |
| # To be used with EventScripts (https://www.mousedown.net/software/EventScripts.html) | |
| # Get Auth Cookie Script from https://github.com/breunigs/bravia-auth-and-remote.git | |
| IP="0.0.0.0" | |
| MACADDR="00:00:00:00:00:00" | |
| COOKIE="output from https://github.com/breunigs/bravia-auth-and-remote/blob/master/auth_cookie_examples/auth.sh" | |
| OWN_SSID="MY_SSID" |
| #!/bin/bash | |
| if [[ ! -s "media.json" ]]; then | |
| echo "*** ERROR: No media.json file in current directory" | |
| exit 1 | |
| fi | |
| mkdir result | |
| echo -n "Processing " |
| aws --profile MY_PROFILE route53 list-resource-record-sets --hosted-zone-id '/hostedzone/ZOHE_ID' --output json | jq -jr '.ResourceRecordSets[] | "\(.Name) \t\(.TTL) \t\(.Type) \t\(.ResourceRecords[]?.Value)\n"' |
I hereby claim:
To claim this, I am signing this object: