Skip to content

Instantly share code, notes, and snippets.

@eddieh
eddieh / libevent-v-libuv.md
Last active March 7, 2024 20:33
libevent vs libuv

libevent vs libuv

Comparing libevent and libuv. My upfront biased: I want to like libevent. However, I want to objectively compare the two and make an informed decision.

What versions are we comparing?

  • libevent 2.0.22 (Stable) [2014-01-05]
  • libuv 1.8.0 (Stable) [2015-12-15]
@eddieh
eddieh / style.adoc
Created March 31, 2016 01:22
Universal Code Style

Universal Code Style

There are three important principles related to coding style. All three principals should be followed.

First, follow the base guidlines for whatever language you happen to be working in. Usually this means you try to make your code look like

@eddieh
eddieh / org-mode-test.org
Last active June 4, 2021 22:42
Org-mode example doc that tests GitHub support

Org-mode Test Document

Heading Level

This is either the heading or the title when interpreted by GitHub Gist. I don’t recall which. Donec sed odio operae, eu vulputate felis rhoncus. Nihilne te nocturnum praesidium Palati, nihil urbis vigiliae. Quae vero auctorem tractata ab fiducia dicuntur. Quisque placerat facilisis egestas cillum dolore. Paullum deliquit, ponderibus modulisque suis ratio utitur. Plura mihi bona sunt,

@eddieh
eddieh / develop-an-emacs-major-mode.org
Last active January 3, 2024 15:36
Develop an Emacs Major Mode

Develop an Emacs Major Mode

Introduction

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

@eddieh
eddieh / gist.el.error.txt
Last active December 10, 2019 21:14
gist.el choked on non-ascii multibyte character
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
Host: api.github.com
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
eddieh / howto-shebang
Last active December 11, 2019 05:30
Insert shebang #! with Emacs
#!/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
eddieh / .profile
Last active December 11, 2019 05:43
Name tabs based on the current directory in Terminal.app
# 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
eddieh / iPadUpdater 91.log
Last active December 11, 2019 22:53
iPad Pro fails to recover
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 12.9.5.5
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
eddieh / .profile
Last active December 11, 2019 23:03
Colorize ls output and display a special symbol indicating the file type
## Colors
## The color designators are as follows:
# a black
# b red
# c green
# d brown
# e blue
# f magenta
# g cyan
# h light grey

Build Your Own Windows Vagrant Box

Intro

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