Skip to content

Instantly share code, notes, and snippets.

View scottrbaxter's full-sized avatar

Scott Baxter scottrbaxter

  • Northwestern Mutual
  • Milwaukee, WI
View GitHub Profile
#!/usr/bin/env bash
set -e
addEntries() {
# check if universal access / custom menu key exists
if defaults read com.apple.universalaccess com.apple.custommenu.apps > /dev/null 2>&1; then
defaults delete com.apple.universalaccess com.apple.custommenu.apps
fi
@scottrbaxter
scottrbaxter / op_session.sh
Last active February 10, 2024 08:22
1password cli session check and expiration variable
#!/usr/bin/env bash
# starts (or restarts) a 1password cli session, sets 30 minute countdown variable
# use: OP_CLOUD_ACCOUNT="[your-account-name]" source /path/to/op_session.sh command
# e.g.: OP_CLOUD_ACCOUNT="familyname" source ~/op_session.sh get account
check_session(){
# attempt sign in if session is not active
# docker build info
# parts to a Dockerfile for building local "image"
Command # Description
ADD # Copies a file from the host system onto the container
CMD # The command that runs when the container starts
ENTRYPOINT # sets the concrete default application that is used every time a container is created using the image
ENV # Sets an environment variable in the new container
EXPOSE # Opens a port for linked containers
FROM # The base image to use in the build. This is mandatory and must be the first command in the file.
MAINTAINER # An optional value for the maintainer of the script
# to open vscode terminal in browser tab, keyboard shortcut: ctrl-`
# run these commands
snap install --classic code
code --install-extension mauve.terraform --user-data-dir $HOME/hashicat-aws
cp -a ~/.vscode/extensions/mauve.terraform-1.4.0 ~/.local/share/code-server/extensions
# refresh gui (top right corner of code editor tab)
# fix missing aws keys (after [step] changing your shell to bash)