Skip to content

Instantly share code, notes, and snippets.

View skwid138's full-sized avatar
🐅
Tiger Style

Hunter Rancourt skwid138

🐅
Tiger Style
View GitHub Profile
@skwid138
skwid138 / github_workflow_tail.sh
Last active November 14, 2024 16:25
This script monitors the latest GitHub Actions workflow for the current repository, providing an optional voice notification upon completion, with customizable voice and message options.
#!/bin/bash
# Default values for optional arguments
VOICE=""
MESSAGE="workflow completed"
function show_help() {
echo "Usage: workflow_tail.sh [options]"
echo ""
echo "Options:"
@skwid138
skwid138 / gh_repo_search.sh
Last active August 17, 2024 21:52
Get a list of repositories a user made commits to during a given date range. Make sure the script is executable, update GH_USERNAME and GH_TOKEN. Use `--help` for argument info.
#!/bin/bash
# Get a list of repositories the defined user made commits to in the passed in date range
# Example: ./gh_repo_search.sh 2018-07-01 2018-08-01
# GitHub username and personal access token
GH_USERNAME="gh_username"
GH_TOKEN="***************************************"
# Take 2 passed in dates in yyyy-mm-dd format
@skwid138
skwid138 / github-add-team-to-repos.js
Last active September 12, 2022 16:42 — forked from davidrleonard/add-team-to-repos.js
Add a new team to all Github repos in an organization
/*
* Adds the specificed team to all the repos in a Github organization.
* This is a tedious process in the UI.
* You'll need a version of node greater than 9 to run this
*
* https://docs.github.com/en/rest/teams/teams#add-or-update-team-repository-permissions
*
* Instructions:
* 1. Copy this file somewhere locally on your computer, e.g. ~/addteamrepos.js
* 2. Fill in the uppercase variables below with the right values

Helpful Commands

List containers

(The below are using the recomended commands although docker ps <options> would be identicle for now)

  • All containers: docker container ls -a
  • Running containers: docker container ls (docker ps is the exact same, but is no longer the recomended command)
  • All stopped containers: docker container ls -f "status=exited"
  • IDs of running containers: docker container ls -q
  • IDs of all containers: docker container ls -aq
  • Recently created containers: docker container ls -l
<?php
/**
* The table Printer class has no dependencies and generates an array of strings
* out of an array of objects or arrays and the child properties that should be printed given by an array of strings
*
* Should result in something like the following:
* +------+---------------+----------------+---------------+
* | id | name | col_name_three | col_name_four |
* +------+---------------+----------------+---------------+

Debug with the CLI

fwrite(STDERR, print_r($thing_to_debug, true));

Update and/or Upgrade fail with various git errors

Running brew upgrade or brew update results in some sort of git error

  • Merge conflict
  • Unfinished rebase

Use brew update-reset instead which I beleive downloads all the updates/upgrades fresh

Use brew doctor to get tips on what can be done to improve your local brew setup

#!/bin/bash
# Open Apps used when doing development
# Could also include "iTerm" if the script is set to run automatically
# As it is now it would likely be run from iTerm
declare -a apps=("JetBrains Toolbox"
"Viscosity"
"MySQLWorkbench"
"ClickUp"

Big Sur Indexing

After updating to Big Sur the spotlight search no longer finds apps

Temporary Fix (reboot will require doing this again)

Run sudo mdutil -E / Open Activity Monitor and force quit the SystemUIServer process

Credit: https://developer.apple.com/forums/thread/667316

/* h Styles */
h1, h2, h3, h4, h5, h6 {
font-family: futura-pt-bold, sans-serif, Helvetica Neue, Helvetica, Arial !important;
font-weight: 700;
margin: 0;
color: #fff; /* Hunter Added this because it seemed like the right thing to do at the time */
}
/****************
***** FONT ******