Skip to content

Instantly share code, notes, and snippets.

View mbigras's full-sized avatar

Max Bigras mbigras

View GitHub Profile
@mbigras
mbigras / nested-code-blocks.md
Last active November 4, 2024 19:58
Nested code blocks in technical documentation

Nested code blocks

Nested code blocks organize technical documentation; but rendering them in Markdown is tricky. Luckily GitHub worked around the vague specification by making 4 space indentation "just work".

Overview

Google Cloud Platform (GCP) technical documentation is formatted well enough; however, emulating that format in Markdown is tricky.

The following are the main organizational and formatting features about GCP documentation which I like:

@mbigras
mbigras / .skhdrc
Last active February 18, 2021 06:55
ctrl - right : yabai -m space --focus prev || yabai -m space --focus next
ctrl + shift - right : (yabai -m window --space prev && yabai -m space --focus prev) || (yabai -m window --space next && yabai -m space --focus next)
ctrl - 1 : yabai -m space --focus 1
ctrl - 2 : yabai -m space --focus 2
ctrl - 3 : yabai -m space --focus 3
# Disable macOS System Integrity Protection SIP
#
# csrutil status
# csrutil disable
# Configure personal account to run yabai as root
#
# create a new file for writing - visudo uses the vim editor by default.
# go read about this if you have no idea what is going on.
# sudo visudo -f /private/etc/sudoers.d/yabai
@mbigras
mbigras / Technical Documentation Study - Go Module Tutorial.md
Last active February 18, 2021 16:52
Technical Documentation Study - Go Module Tutorial

Technical Documentation Study - Go Module Tutorial

The golang tutorials are so excellent. The tone is very professional and thoughtful, the pace is brisk without being rushed. It really is a breath of fresh air. The formatting is minimal and rarely makes use of inline code, further the lack of syntax highlighting is professional. I think the use of good names and clear authoritative verbs are the heart of why the tutorials are so good. They are such an inspiration!

This document creates the Tutorial: Create a Go module in markdown.

Tutorial: Create a Go module

# Configure shell prompt
PS1="$ "
# Configure shell to not consider slashes part of a word
export WORDCHARS=${WORDCHARS/\/}
# Configure editor
export EDITOR="subl -wn"
# Set environment variables for Go programming
@mbigras
mbigras / Default (OSX).sublime-keymap
Last active November 18, 2024 05:41
Sublime Text settings
// Note: Put this file at the "$HOME/Library/Application Support/Sublime Text/Packages/User/Default (OSX).sublime-keymap" path.
[
{
"keys": ["super+."],
"command": "edit_settings",
"args": {
"base_file": "${packages}/Default/Default ($platform).sublime-keymap",
"default": "[\n\t$0\n]\n"
}
},
" https://gist.github.com/5c725f4f5d1f10a6ade71777d6d5074b
" gist ~/.vimrc -u https://gist.github.com/5c725f4f5d1f10a6ade71777d6d5074b
filetype on
autocmd FileType yaml,yml setlocal ts=2 sts=2 sw=2 expandtab
https://www.businessinsider.com/why-bluetooth-sucks-bad-problems-issues-disconnects-2018-2
@mbigras
mbigras / Upgrade MacBook Air from Mac OS X 10.8.5 to Big Sur 11.7.2.txt
Created December 28, 2022 20:55
Upgrade MacBook Air from Mac OS X 10.8.5 to Big Sur 11.7.2
# Upgrade MacBook Air from Mac OS X 10.8.5 to Big Sur 11.7.2
[Todo]: Add insights to https://www.reddit.com/r/MacOS/comments/r909mh/mountain_lion_to_big_sur/.
For portability, see https://gist.github.com/mbigras/1e4a230e93d7ea70efb9ae7b7c7b7ae1.
1. From another laptop, download the El Capitan installer.
2. Erase MacBook Air.
3. Copy El Capitan installer.
4. [Todo]: Add the Waterfox workaround.
@mbigras
mbigras / Cat in Go.md
Last active August 29, 2023 05:51
This gist contains the cat Unix command—written in Go.

Cat in Go

This gist contains the cat Unix command—written in Go.

The following Go program concatenates files passed as command-line arguments. If you don't pass any command-line arguments, then cat reads from stdin (it's the cat Unix utility).

Getting started

The following procedure shows how to build and run cat.