Skip to content

Instantly share code, notes, and snippets.

View mmitchel's full-sized avatar

Michael Mitchell mmitchel

View GitHub Profile
@mmitchel
mmitchel / .git-commit-template.txt
Created May 2, 2018 15:57 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
# MPLABX Project Ignored Artifacts
funclist
Makefile-*
MPLABXLog.*
memoryfile.xml
nbactions.xml
nb-configuration.xml
Package-*.bash
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update
brew install gcc48
@mmitchel
mmitchel / mingw.sh
Last active August 29, 2015 14:10 — forked from henry0312/mingw.sh
#!/bin/sh
# 初期設定
WORK=$HOME/Builds/GCC
PREFIX=$HOME/mingw
export PATH="$HOME/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# ソースコードのダウンロード
if [ ! -d $WORK/src ] ; then
mkdir src
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update
brew install gcc48
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
It will create tracking branches for all remote branches, except master (which you probably got from the original clone command). I think you might still need to do a
git fetch --all
git pull --all
@mmitchel
mmitchel / freebsd10-gce.txt
Last active April 21, 2019 02:03
Prepare FreeBSD 10 for Google Compute Engine
I was able to install FreeBSD on GCE in a very direct way, without the hurdles of Qemu, gcutil, and the FreeBSD installer. All are great tools, but I think my apporach is somewhat more suitable for GCE, or at least much simpler. Much of this is well-known practice for installing manually, with some fluff for managing it as a disk image, as well as the few odd networking requirements of GCE (MTU and netmask).
My basic approach is to:
* Use my FreeBSD machine at home to build a self-hosting "rescue" disk image for GCE.
* Start a temporary Linux machine in GCE from a provided image.
@mmitchel
mmitchel / gist:8500019
Created January 19, 2014 03:09
Disable xterm on XQuartz Startup
defaults write org.macosforge.xquartz.X11 app_to_run /usr/bin/true
@mmitchel
mmitchel / gist:7379378
Created November 8, 2013 23:37
Enable Remote Management via Command Line
$ cd /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/
$ sudo ./kickstart -activate -configure -access -on -privs -all -restart -agent
@mmitchel
mmitchel / gist:7379367
Created November 8, 2013 23:36
Bind Macs to Server via Command Line
Bind to server.domain.com using "server_name" as connection note:
$ sudo dsconfigldap -s -a server.domain.com -n “server_name”
Verification of binding:
$ sudo dscl localhost -list /LDAPv3
Unbind from server:
$ sudo dsconfigldap -s -r server.domain.com