Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@arobb
arobb / sierra-virtualbox-install.md
Last active November 24, 2020 13:15
Install macOS Sierra in VirtualBox on macOS host

Step 1 (Creating a bootable macOS Sierra ISO for VirtualBox):

  1. hdiutil attach /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
  2. hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
  3. hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
  4. asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
  5. rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
  6. cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
  7. cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
@mcandre
mcandre / windows-10-add-startup-items.md
Created November 11, 2016 01:52
windows 10 startup edit
  1. Windows -> shell:Startup, Enter.
  2. Drag & drop desired startup item to the resulting folder.

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
@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:

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
@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/ .

@asukakenji
asukakenji / 0-go-os-arch.md
Last active May 12, 2025 09:54
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
@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: 
@mcandre
mcandre / occasionally-spicy-chex-mix.md
Last active October 17, 2017 00:15
Occasionally Spicy Chex Mix