Skip to content

Instantly share code, notes, and snippets.

View iamkirkbater's full-sized avatar

Kirk Bater iamkirkbater

View GitHub Profile
@iamkirkbater
iamkirkbater / getCurrentlyPlaying.scpt
Last active December 8, 2023 22:35
Applescript - Get Currently Playing Track information from Apple Music and write to file
use scripting additions
use framework "Foundation"
-- Set Configuration Defaults
set OUTPUT_FILE to "~/now-playing.json"
-- END Configuration
on getCurrentTrack()
#!/bin/bash
set -o pipefail
usage() {
cat >&2 <<EOF
usage: $0 stringWith@@PLATFORM@@toReplace --ARMARCH --X86ARCH [ OPTIONS ]
requires one of each of the x86 arch options below and arm arch options below.
#!/bin/bash
set -o pipefail
REGIONS=("us-east-1" "eu-west-1" "us-west-2" "us-east-2")
usage() {
cat <<EOF
usage: $0 [ OPTIONS ] --role [role-name]
Options
type ReconcileAccount struct {
Client kubeclient.Client
scheme *runtime.Scheme
OperatorAWSClient awsclient.Client
AccountAWSClient awsclient.Client
Account awsv1alpha1.Account
LinkedAccountClaim awsv1alpha1.AccountClaim
Logger LogInterface
}
@iamkirkbater
iamkirkbater / kirks_keymap.json
Last active July 19, 2021 17:43
DZ60 QMK Split Spacebar Configuration
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "dz60",
"keymap": "kirks_keymap",
"layout": "LAYOUT",
"layers": [
[
"KC_GRV",
@iamkirkbater
iamkirkbater / obs_virtual_camera.applescript
Last active December 8, 2023 22:07
Launches OBS, starts the virtual camera, and then minimizes the window.
on run {input, parameters} -- remove this line if running in Script Editor and not with Automator
tell application "OBS" to activate
tell application "System Events"
tell process "OBS"
set frontmost to true
if name of every menu item of menu "Tools" of menu bar 1 contains "Start Virtual Camera" then
click menu item "Start Virtual Camera" of menu "Tools" of menu bar 1
end if
click (first button of window 1 whose role description is "minimize button")
end tell
@iamkirkbater
iamkirkbater / scaffold.sh
Last active May 7, 2020 18:06
A quick options set and verbosity output scaffold for new bash scripts
#!/bin/bash
usage() {
cat <<EOF
usage: $0 [ OPTIONS ]
Options
-d --dry-run Do not make any modifications but preview the expected operations
-h --help Show this message and exit
-q --quiet Be Quiet
-v --verbose Be Loud
resource "aws_acm_certificate" "cert" {
domain_name = "*.${var.domain_name}"
validation_method = "DNS"
lifecycle {
create_before_destroy = true
}
}
data "aws_route53_zone" "zone" {
@iamkirkbater
iamkirkbater / check_default.tf
Created December 18, 2018 19:37
No default workspaces in terraform
resource "null_resource" "have_you_specified_a_workspace" {
count = "${terraform.workspace == "default" ? 1 : 0}"
"ERROR: Select a non-default workspace" = true
}
@iamkirkbater
iamkirkbater / cd.sh
Created January 10, 2018 13:31
Auto Change NVM version on `cd` command
cd () {
builtin cd "$@" && [ -f ".nvmrc" ] && nvm use
}