Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@Klooven
Klooven / about.md
Last active August 1, 2024 06:26
Customize Bootstrap 4
@mcandre
mcandre / occasionally-spicy-chex-mix.md
Last active October 17, 2017 00:15
Occasionally Spicy Chex Mix
@mcandre
mcandre / freebsd-hyper-v-notes.md
Last active May 3, 2020 16:15
FreeBSD Hyper V Notes

FreeBSD Hyper V Notes

Enable superuser privileges for a user account

  1. Exit the current user session. Login as root.
$ exit
Login: root
Password: 
@asukakenji
asukakenji / 0-go-os-arch.md
Last active May 6, 2025 13:41
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@rob-smallshire
rob-smallshire / macOS-in-virtualbox.md
Last active November 3, 2024 14:07
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

Problems with Go's shorthand declaration :=

The shadow variable trap

The problem

It is best illustrated with the following Go code snippet.

var x int
@mcandre
mcandre / brew-fix-broke-cask.md
Last active December 12, 2016 02:43
Homebrew Cask fix

brew cask (un|re)install --force may fail, esp. when two bad states coincide: A) Homebrew poorly transitioning to a new location for Caskroom tapped applications; and B) Some Caskroom tapped applications have been "deleted" by non-brew means, such as deleting the *.app in Finder, or using "Storage Manager.app".

Workaround:

$ brew install --force <app> && brew uninstall --force <app>

Workaround x2:

ABOUT

The Vagrant community offers some Windows-kernel guests, for assisting in developing and testing applications in Windows environments.

$ vagrant box add -f opentable/win-2012r2-standard-amd64-nocm
$ cd <project>
$ vagrant init opentable/win-2012r2-standard-amd64-nocm && vagrant up