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
/* 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 ******

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

#!/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"

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

Debug with the CLI

fwrite(STDERR, print_r($thing_to_debug, true));
<?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 |
* +------+---------------+----------------+---------------+

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
@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