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
tell application "Microsoft Teams" | |
activate | |
tell application "System Events" | |
keystroke "o" using {shift down, command down} | |
end tell | |
end tell |
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
MYIP=1.2.3.4 | |
# add MYIP to list of allowed IPs for the Azure CosmosDB server s00354ncdbbridgedev using az cli | |
az cosmosdb firewall-rule create --name AllowMyIP --resource-group grp --account-name accoutn --start-ip-address $MYIP --end-ip-address $MYIP | |
az cosmosdb firewall-rule create --name AllowMyIP --resource-group grp --account-name accoubnt --start-ip-address 650.46.64.1 --end-ip-address 3.8.54.4 | |
# install the Azure CLI extension for Cosmos DB. | |
az extension add --name cosmosdb |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | |
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> | |
<link rel="stylesheet" href="style.css" /> |
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
## This is some wild shit I was working on to link shell and browser | |
first-tab() { | |
if [[ $#BUFFER == 0 ]]; then | |
curl http://localhost:15933 | |
BUFFER="ph " | |
CURSOR=3 | |
zle list-choices | |
else | |
zle expand-or-complete | |
fi |
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 | |
# assumes bunyan-seq is installed globally - "npm install -g bunyan-seq" | |
# run with: npm run dev | ./bunyan-seq.sh | |
# SEQ_TOKEN comes from either $1, SEQ_TOKEN environment variable, or contents of ~/.seq_token | |
# This script assumes you've previously created a SEQ_TOKEN (reseq.sh - https://gist.githubusercontent.com/henkin/4b965bb0e71223a5d9436507dd717ec0/raw/636ac6f219010042ae0cbf233ffe1fe19c9a052a/reseq.sh) | |
export SEQ_TOKEN=${1:-${SEQ_TOKEN:-$(cat ~/.seq_token)}} | |
echo "token: $SEQ_TOKEN" | |
bunyan-seq --serverUrl http://localhost:5341 --apiKey $SEQ_TOKEN --logOtherAs Debug |
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
# list of all domains | |
doctl compute domain list | cut -w -f1 | tail -n +2 | xargs curl -v -m 1 | |
# show all NS record ids | |
doctl compute domain records list paulhenkin.com | grep NS | cut -w -f1 | |
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
user=user | |
password=`openssl passwd -1 -salt xyz your-password-here` | |
cp /etc/passwd /tmp/passwd.bak | |
echo "${user}:${password}:1000:1000:User,,,:/tmp/${user}:/bin/sh" >> /etc/passwd | |
mkdir /tmp/${user} | |
chmod 1000:1000 /tmp/user |
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
tf workspace select test | |
tf import module.waf.aws_wafv2_ip_set.main_waf_ip_blacklist cf1527f5-b1f9-48d0-b30a-9708de235b0b/pto-waf-ip-blacklist/REGIONAL | |
tf import module.waf.aws_wafv2_web_acl.main_waf_acl ac78a099-ae47-42d8-a2d6-3c32932470fe/pto-test-main-waf/REGIONAL | |
tf workspace select stage | |
tf import module.waf.aws_wafv2_web_acl.main_waf_acl fdddc840-67ef-4836-a59c-e7b319d9e673/pto-stage-main-waf/REGIONAL |
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
docker build -t ptoaccept --platform amd64 -f Dockerfile ../../../.. | |
docker run --rm --platform linux/amd64 -v $(pwd)/TestResults:/app/TestResults ptoaccept |
NewerOlder