Skip to content

Instantly share code, notes, and snippets.

View bfrancom's full-sized avatar
Power wheels, power wheels, pow-pow-power wheels!

Ben Francom bfrancom

Power wheels, power wheels, pow-pow-power wheels!
View GitHub Profile
bfrancom / bro-words.json
Last active May 23, 2024 15:54
Bro Words
"Abroha": "A blend of \"Aloha\" and \"bro.\"",
"Ambrodextrous": "A bro that does the shaka sign with both hands.",
"Brah": "The Hawaiian version of bro.",
"Bro-hug": "A hug between two friends or bros.",
"Bro Jackson": "A bro that is good at everything.",
"Bro-am": "An amateur surf or skateboarding contest for bros only.",
"Bro-b-q": "A barbecue for bros only.",
"Bro-brah": "An irritating, stoned surfer, skateboarder, or snowboarder.",
"Bro-bro": "A special friend or super close bro.",
bfrancom / web.conf
Last active January 3, 2024 20:35
cloud-init example
## Install additional packages on first boot
## Default: none
## if packages are specified, this apt_update will be set to true
## packages may be supplied as a single package name or as a list
## with the format [<package>, <version>] wherein the specifc
bfrancom / matrix.yml
Created July 25, 2023 00:54
How to reference node version more easily
version: [18]
- uses: actions/setup-node@v3
node-version: ${{ matrix.version }}
bfrancom /
Created July 14, 2023 14:20
replace a URL for an image
while IFS= read -r line
bob=$(basename $line)
find . -type f -exec sed -i '' -e "s,$line,/images/old/$bob,g" {} \;
done < "$input"
#while read line
#find . -type f -exec sed -e "s/$line/2010/g" {} \;;done < /tmp/realImages.txt
bfrancom /
Last active April 27, 2023 14:08
Get all environment variables with URI's in Kubernetes to find 3rd party services used
#should get all uri's (including url's) for things like s3, postgres, ftp, etc.
kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{.spec.containers[*].env[*].value}{"\n"}{end}' |grep -io "[[:alnum:]]*://[^ ]*" |sort |uniq
bfrancom /
Last active March 21, 2023 20:25
Microsoft Graph search groups by name$search="displayName:YourMom"&$select=id,displayName
#need to add a request header ConsistencyLevel:eventual
bfrancom /
Last active March 7, 2023 18:12
Get direct reports of manager from Microsoft Graph API filtered by name and email.
#Get users under a manager using MS graph query. Uses select filter for displayName and email address
#Use this query in$select=displayName,mail
bfrancom / build-jar-deploy-ecs-fargate.yml
Last active March 7, 2023 15:35
GitHub actions build Java jar and deploy to AWS ECS Fargate
#See for Dockerfile used
#Author: Ben Francom
name: Build
#on: workflow_dispatch
- "main"
bfrancom / Dockerfile
Last active March 7, 2023 15:34
Dockerfile for building java app in GitHub actions and deploying to AWS ECS/Fargate
#See for deploying this docker container on ECS Fargate
FROM openjdk:8-jdk-slim as builder
#WORKDIR build
RUN mkdir target
ARG JAR_FILE=./target/*.jar
COPY ${JAR_FILE} target/app.jar
#You probably don't want to do this in production, and should tune memory, gc, etc.
ENTRYPOINT ["java","-jar","/target/app.jar"]