Skip to content

Instantly share code, notes, and snippets.


Greg Meece GLMeece

View GitHub Profile

New MacOS Machine Setup

This guide is based on my own experience, but also draws on other guides. It is primarily oriented towards those doing code-related stuff (e.g., I'm mostly an SDET, but is also applicable to those doing either Python or Web-based development).

A couple of other examples:

Most of the setup will use the terminal. For more details on how to setup an awesome terminal experience on the Mac, see my guide Steps to Terminal Enlightenment on a Mac (tweaking your terminal for fun and profit), which in fact includes some of these steps (you're welcome!).

GLMeece /
Last active Mar 1, 2021
Use Fingerprint Reader on a MacBook to Validate SUDO

HOWTO Leverage the Fingerprint Reader on a MacBook to Validate SUDO

The following is derived from the article Use Touch ID for sudo on Mac:


  1. Open the sudo utility:
sudo nano /etc/pam.d/sudo
GLMeece /
Last active Feb 25, 2021
Variable/Constant Casing Styles

Computer Language Case Styles

A quick discussion of the most popular ways to invoke variable (or constant) names using case and/or space replacement.

These styles are:

  • camelCase
  • PascalCase
  • snake_case
  • kebab-case
GLMeece /
Last active Feb 8, 2021
Docker Cheat Sheet

Useful Docker Cheat Sheet

Random Tips

A Dozen Dockerfile Instructions to Know

  • FROM — specifies the base (parent) image; typically you specify both the image name as well as the label. 🍰
  • RUN — runs a command and creates an image layer. Used to install packages into containers. 🍰
GLMeece /
Last active Apr 17, 2021
Steps to Terminal Enlightenment on a Mac (tweaking your terminal for fun and profit)
GLMeece / .zshrc
Created Sep 5, 2019
Z-shell Resource File PowerLevel9K Example
View .zshrc
# zmodload zsh/zprof # <-- enable for shell profiling
# Note: for more options info, see:
# Autoload info:
# With the -U flag, alias expansion is suppressed when the function is loaded.
# -z mark the function to be autoloaded using the zsh style
autoload -Uz compinit
GLMeece /
Last active Mar 19, 2019
Exporting INI file values as Environmental Variables
# It is assumed that $HOME is already defined and exported...
# Assuming within our home directory,
# we have a hidden directory called '.env'
# ...and within that directory we had a file named 'secret_vars.ini'...
# ...we'd build the path
def nice_title_case(str_in):
"""Converts a string to Title Case, with conventional exceptions which
need not be capitalized if they are not the first word in the title.
exceptions_to_title_casing = (
"a", "an", "and", "at",
"but", "by", "for", "in",
"nor", "of", "on", "or",
"so", "the", "to", "up", "yet"
GLMeece /
Created Mar 15, 2019
HTTP Bad Return Codes (as Python Dictionary)
http_bad_codes = {
"400": "Bad Request",
"401": "Unauthorized",
"402": "Payment Required",
"403": "Forbidden",
"404": "Not Found",
"405": "Method Not Allowed",
"406": "Not Acceptable",
"407": "Proxy Authentication Required",
"408": "Request Timeout",
GLMeece /
Last active Oct 2, 2018
Using PanDoc to Convert Word to Markdown
pandoc -f docx -t markdown -o my_example_input.docx