Skip to content

Instantly share code, notes, and snippets.

View malston's full-sized avatar

Mark Alston malston

View GitHub Profile
@skyzyx
skyzyx / homebrew-gnubin.md
Last active October 15, 2025 05:09
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

@davidlohle
davidlohle / mysql-migrator.sh
Last active December 3, 2021 14:09
MySQL Migrator
#/bin/bash
set -e
if [[ -n "$DEBUG" ]]
then
echo "!!! Debug output enabled"
set -x
fi
set -u
@miclip
miclip / custom_stack.md
Last active June 29, 2022 17:17
Custom TBS Stack example

Create a custom stack and add to TBS

  1. Create a docker file for image:
# Set a common base
FROM alpine as base

# Set required CNB information
ENV CNB_USER_ID=1000