Skip to content

Instantly share code, notes, and snippets.

View u2mejc's full-sized avatar

Justin Clark u2mejc

View GitHub Profile
@u2mejc
u2mejc / shellcheck-buildspec.md
Created October 28, 2024 21:07
shellcheck for AWS's CodeBuild buildspec.yaml

shellcheck is an invaluable tool for validating shell (typically Bash) scripts. When working with a codified CI environment like AWS's CodeBuild, the shell script is defined inside a YAML list (YAML sequence). You can still run shellcheck, by parsing the YAML file with a tool like yq and piping the output to shellcheck:

yq '.phases.build.commands[]' < buildspec.yaml | shellcheck -

Note: shellcheck assumes that everything is a single file, which would execute consecutively in the same shell, but CodeBuild executes each string (line) in a new shell, copying exports only. So things like set

@u2mejc
u2mejc / make-netrw-like-nerdtree.md
Created June 2, 2025 17:45
An experiment to see if it was possible to work without a tool like nerd tree in vim/neovim

An experiment to see if it was possible to work without a tool like nerd tree.

" Make netrw like nerdtree https://shapeshed.com/vim-netrw/
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 10
augroup ProjectDrawer
@u2mejc
u2mejc / win11.md
Created October 22, 2025 22:47
Windows 11 Local Only User

Bypass Microsoft Account Creation when setting up Windows 11

  1. After install / launch, press Shift+F10(+fn on a Mac VM) to open the command prompt
  2. Enter start ms-cxh:localonly in the che command prompt, and press return.
  3. Complete the local user setup (you may need to scroll, depnding on screen size)