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 / chroot-env-on-mac.org
Created July 28, 2021 19:43
chroot Environments on macOS (draft)

chroot Environments on macOS

This is a draft.

macOS doesn’t have many of the advanced Linux or UNIX features that have come about in the past 20 years. So getting a proper chroot environment up and running takes a little more work.

@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 / macos-appstore-installer-to-iso.org
Created November 29, 2021 07:42
Convert macOS App Store Installer to a Bootable ISO

Convert macOS App Store Installer to a Bootable ISO

IMG=Catalina
APPRES="/Applications/Install macOS Catalina.app/Contents/Resources"
@eddieh
eddieh / Makefile
Last active May 14, 2022 23:30
libdispatch.dylib Makefiles for building 32 bit libdispatch
SUBDIRS += dispatch
SUBDIRS += os
SUBDIRS += private
SUBDIRS += src
SDK_ROOT=/Applications/Xcode9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
libpthread_path=$(abspath ../libpthread-301.50.1)
libplatform_path=$(abspath ../libplatform-161.50.1)
xnu_path=$(abspath ../xnu-4570.71.2)
@eddieh
eddieh / .mbsyncrc
Last active January 31, 2022 17:26
mbsync (isync) configuration for iCloud email account
# -*- mode: conf; tab-width: 4; -*-
## Passwords
# When using iCloud it is best to create an app-specific password
#
# https://support.apple.com/en-us/HT204397
#
# Store application specific passwords on macOS with
@eddieh
eddieh / gnu-make-oddness.org
Created December 29, 2021 01:22
GNU Make Oddness (with -rR)

GNU Make Oddness

Since version 4.0 of GNU Make a feature was added that almost every makefile should use. The 4.0 release notes describes the feature as “setting the -r and -R options in MAKEFLAGS inside a makefile now works as expected, removing all builtin rules and variables, respectively.”

#!/bin/bash
# tputcolors
# http://linuxtidbits.wordpress.com/2008/08/11/output-color-on-bash-scripts/
echo
echo -e "$(tput bold) reg bld und tput-command-colors$(tput sgr0)"
for i in $(seq 0 7); do
echo " $(tput setaf $i)Text$(tput sgr0) $(tput bold)$(tput setaf $i)Text$(tput sgr0) $(tput sgr 0 1)$(tput setaf $i)Text$(tput sgr0) \$(tput setaf $i)"
done
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password).
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
@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,