Skip to content

Instantly share code, notes, and snippets.


Eddie Hillenbrand eddieh

View GitHub Profile
eddieh / simple.m
Created Jun 8, 2020
Simplest possible single-file Cocoa app with dock icon and menu
View simple.m
#import <Cocoa/Cocoa.h>
int main(int argc, char **argv)
NSRect rect;
NSWindowStyleMask style;
NSAutoreleasePool *pool;
NSApplication *app;
NSMenu *menubar, *appMenu;
NSMenuItem *appMenuItem, *quitMenuItem;
eddieh / .msmtprc
Created Feb 29, 2020
msmtp configuration for iCloud email account
View .msmtprc
# -*- mode: conf; tab-width: 4; -*-
port 587
tls on
account primary
auth on
eddieh / .mbsyncrc
Last active Feb 27, 2020
mbsync (isync) configuration for iCloud email account
View .mbsyncrc
# -*- mode: conf; tab-width: 4; -*-
## Passwords
# When using iCloud it is best to create an app-specific password
# Store application specific passwords on macOS with

Build Your Own Windows Vagrant Box


I have found myself needing to test on Windows frequently. I need to be able to spin up fresh virtual machines—Vagrant seems to be the perfect solution.

I primarily use Macs for development and am currently using a cross compiler to develop native Win32 apps (and eventually Win64 apps). On the Mac side, basics like Homebrew are assumed to be

eddieh / .profile
Last active Dec 11, 2019
Colorize ls output and display a special symbol indicating the file type
View .profile
## Colors
## The color designators are as follows:
# a black
# b red
# c green
# d brown
# e blue
# f magenta
# g cyan
# h light grey
eddieh / iPadUpdater 91.log
Last active Dec 11, 2019
iPad Pro fails to recover
View iPadUpdater 91.log
2019-09-20 12:12:46.000 iTunes[4560:507]: restore library built Aug 29 2019 at 10:37:51
2019-09-20 12:12:46.000 iTunes[4560:507]: iTunes: iTunes
2019-09-20 12:12:46.000 iTunes[4560:507]: iTunes: Apple Mobile Device version: 1190.9.1
2019-09-20 12:12:46.000 iTunes[4560:507]: iTunes: Software payload version: 16G102
2019-09-20 12:12:46.000 iTunes[4560:507]: iTunes: Using MobileRestore state machine
[12:12:54.2907] Can't get board config with NULL device map
[12:12:54.2915] You can't copy the serial number from a DFU mode device
[12:12:54.2930] Can't search 0 registry node for serial device
[12:12:54.2932] =====================================================
[12:12:54.2932] Device info:
eddieh / .profile
Last active Dec 11, 2019
Name tabs based on the current directory in
View .profile
# set the current tab's name
function tab_name {
printf "\e]1;$1\a"
# set the tab's name to the current working directory name
function update_tab_name {
tab_name "$(basename $PWD)"
eddieh / howto-shebang
Last active Dec 11, 2019
Insert shebang #! with Emacs
View howto-shebang
#!/usr/bin/tail -n+2
Don't chmod that file! Don't type a shebang! Edit an executable script
in Emacs and invoke
M-x executable-set-magic
This is a self-displaying file made with `executable-self-display'. If
you have had a stroke and forgotten how to make a script executable by
hand, just insert the following form as the first line of the script
eddieh / gist.el.error.txt
Last active Dec 10, 2019
gist.el choked on non-ascii multibyte character
View gist.el.error.txt
error in process sentinel: Multibyte text in HTTP request: PATCH /gists/1c784cd92b2de48a214d16734dd59807 HTTP/1.1
MIME-Version: 1.0
Connection: keep-alive
Extension: Security/Digest Security/SSL
Accept-encoding: gzip
Accept: */*
User-Agent: URL/Emacs Emacs/26.3 (OpenStep; x86_64-apple-darwin14.5.0)
Authorization: token super-secrect-token-of-many-ascii-characters
Content-Type: application/json
eddieh /
Last active Dec 12, 2019
Develop an Emacs Major Mode

Develop an Emacs Major Mode


Developing an Emacs major mode is perhaps unnecessarily complex, but it offers unmatched flexibility and control.

You can’t perform that action at this time.