Skip to content

Instantly share code, notes, and snippets.

Avatar

Greg Meece GLMeece

View GitHub Profile
View new_macos_machine_setup.md

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
GLMeece / powerbook_fingerprint_as_sudo.md
Last active Mar 1, 2021
Use Fingerprint Reader on a MacBook to Validate SUDO
View powerbook_fingerprint_as_sudo.md

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:

Steps

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

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
GLMeece / docker_cheatsheet.md
Last active Feb 8, 2021
Docker Cheat Sheet
View docker_cheatsheet.md

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
GLMeece / Steps_to_Terminal_Enlightenment_on_a_Mac.md
Last active Apr 17, 2021
Steps to Terminal Enlightenment on a Mac (tweaking your terminal for fun and profit)
View Steps_to_Terminal_Enlightenment_on_a_Mac.md
@GLMeece
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:
# https://gist.github.com/geeknam/4423298046c4383d36a91c404ff049b1
# 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
GLMeece / export_ini_values.sh
Last active Mar 19, 2019
Exporting INI file values as Environmental Variables
View export_ini_values.sh
# It is assumed that $HOME is already defined and exported...
# Assuming within our home directory,
# we have a hidden directory called '.env'
envvarsdir="/.env/"
# ...and within that directory we had a file named 'secret_vars.ini'...
envvarsfile=secret_vars.ini
# ...we'd build the path
envvarspath=$HOME$envvarsdir$envvarsfile
View nice_title_case_func.py
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
GLMeece / http_bad_codes_dict.py
Created Mar 15, 2019
HTTP Bad Return Codes (as Python Dictionary)
View http_bad_codes_dict.py
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
GLMeece / pandoc_markdown_to_word.md
Last active Oct 2, 2018
Using PanDoc to Convert Word to Markdown
View pandoc_markdown_to_word.md
pandoc -f docx -t markdown -o my_example_output.md my_example_input.docx