Skip to content

Instantly share code, notes, and snippets.

View mjmenger's full-sized avatar

Mark Menger mjmenger

View GitHub Profile
@mjmenger
mjmenger / modappsetup.md
Last active July 19, 2022 18:57
ModAppJumpNotes
@mjmenger
mjmenger / api.http
Last active August 1, 2023 01:23
weather.gov
#
# https://www.weather.gov/documentation/services-web-api
# home
# @latitude = 45.479293180527236
# @longitude = -122.67109294416308
# Willamette Sailing Club
@latitude = 45.47959408818095
@mjmenger
mjmenger / aws-cli.md
Last active March 17, 2022 23:15
Finding CSP Images

https://support.f5.com/csp/article/K25195893

aws ec2 describe-images --region us-east-1 --owners '679593333241' --filters Name=description,Values='BIGIP-16'

aws ec2 describe-images --region us-east-1 --filters Name=description,Values='NGINX Plus' > nginxami.json

aws ec2 describe-images --region us-east-1 --owners '099720109477' --filters Name=name,Values='ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*' Name=virtualization-type,Values='hvm' > ubuntu-ami.json

aws ec2 describe-images --region us-east-1 --owners '099720109477' --filters Name=name,Values='ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-' Name=virtualization-type,Values='hvm' --query 'Images[].[ImageId]' --output text

@mjmenger
mjmenger / ansible.md
Last active August 18, 2021 03:15
A1T jumpstart

from F5 Clouddocs

sudo apt install python3-pip
pip install virtualenv
python3 -m virtualenv myansible
@mjmenger
mjmenger / pull-request-limit.md
Last active March 23, 2021 20:33
Docker Tricks

Find out what your Docker Hub pull limit is and how much is remaining

TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)

curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest 2>&1 | grep RateLimit
@mjmenger
mjmenger / idea.md
Last active February 24, 2021 02:50
airgapped-git

you have two environments with source control repositories that need to be synchronized, but they are air-gapped from each other.
On the source system,

git bundle create <bundlefilename> <branchname>

get a copy of the created file named bundlefilename to the target system through whatever means appropriate.

On the target system,

@mjmenger
mjmenger / secrets.md
Last active September 19, 2024 14:59
Volterra stunts

Generate local cert

openssl pkcs12 -nokeys -in <p12-file> -out <name>.crt

will be prompted for password used on the Volterra Console

Generate local key file

openssl pkcs12 -nocerts -nodes -in <p12-file> -out <name>.key

will be prompted for password used on the Volterra Console

@mjmenger
mjmenger / README.md
Last active January 30, 2021 17:18
dirt4 logitech g920

In Dirt 4 my Logitech G920 stopped working. By "stopped working" I mean that the throttle was consistently at 100% and menu navigation was impossible due to a scrolling issue.

After some searching and integrating various suggestions, I made a couple of changes to the xml file that drives how Dirt 4 interprets the G920 input. This fix isn't perfect as some menu navigation was lost in the process and I have to resort to the keyboard. Hopefully, I will be able to fix that in the future. If you have suggestions for improvements, please let me know.

In order to use this file, replace the existing lg_g920.xml in the following location.

<wherever your steam library is installed>\steamapps\common\DiRT 4\input\actionmaps\lg_g920.xml
@mjmenger
mjmenger / createdotenv.sh
Last active February 25, 2022 03:17
terraform cli stunts
# create a .env file for use by the VS Code Rest Client extension
#
# extract the BIG-IP addresses from the Terraform output
export BIGIP_IPS=`terraform output --json | jq -cr '.bigip_mgmt_ips.value[]'`
export BIGIP_USER=admin
# extract the BIG-IP password from the Terraform state
export BIGIP_PASSWORD=`terraform show -json | jq .values.root_module.resources[] | jq -r 'select(.address | contains("random_password")).values.result'`
((i=0))
echo "#.env" > .env
for ip in $BIGIP_IPS; do
@mjmenger
mjmenger / snippet.tmpl
Last active January 21, 2021 01:26
onboard without a secret manager
#!/bin/bash
# BIG-IPS ONBOARD SCRIPT
LOG_FILE=${onboard_log}
if [ ! -e $LOG_FILE ]
then
touch $LOG_FILE
exec &>>$LOG_FILE