Skip to content

Instantly share code, notes, and snippets.

View brandt's full-sized avatar

J. Brandt Buckley brandt

  • Twilio
  • Denver, CO
View GitHub Profile
@brandt
brandt / what-the-hash.md
Created July 21, 2026 03:21
It's an empty file.

What is this hash/checksum?

Important

If you're reading this you probably googled one of these empty input hex digests.

Algorithm Digest
BLAKE2B-512 786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce
BLAKE2S-256 69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9
MD5 d41d8cd98f00b204e9800998ecf8427e
@brandt
brandt / Diff between GPLv3 and AGPLv3.md
Last active May 7, 2026 01:19
Difference between the GPLv3 and the AGPLv3 open source license text
@brandt
brandt / ipaddr.rb
Created November 4, 2016 18:39 — forked from jimsynz/ipaddr.rb
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
@brandt
brandt / logger-v2.17.2-to-v2.29-rc2.patch
Created October 24, 2016 19:21
Changes of the logger CLI tool from util-linux-ng v2.17.2 (version included in RHEL/CentOS 6) to v2.29-rc2
From 912d6b98925a34b05fb4791a2f52225b06c420af Mon Sep 17 00:00:00 2001
From: "WUEBBELS, Josef \\(Extern\\)" <Josef.WUEBBELS@mtu.de>
Date: Fri, 28 Jan 2011 14:15:20 +0100
Subject: [PATCH 001/115] logger: support for logging to UDP socket / remote
syslog server
It adds the ability to logger to log a message to a udp socket. The -n option
followed by the hostname of the remote host is mandatory to do this. The
optional -P option can be used to change the UDP destination port (default
514). The function udpopenlog is used to open the udp socket. After that
@brandt
brandt / procdemo.go
Created October 19, 2016 19:42
Program demonstrating the difference between zombie and orphan processes
// Program demonstrating the difference between zombie and orphan processes.
//
// BUILDING
//
// go build procdemo.go
//
// USAGE
//
// procdemo zombie
// procdemo orphan
@brandt
brandt / README.md
Last active January 19, 2026 10:03
Creates a loopback alias with IP 127.0.0.2 at startup on Mac OS X

Loopback Alias

Creates an alias on the loopback interface (lo0) with the IP 127.0.0.2 on macOS.

Installation

  1. Install the plist to: /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  2. Set mode: sudo chmod 0644 /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  3. Set owner: sudo chown root:wheel /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  4. Load: sudo launchctl load /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
@brandt
brandt / gdb_ruby_backtrace.py
Created June 12, 2016 14:22 — forked from csfrancis/gdb_ruby_backtrace.py
Dump an MRI call stack from gdb
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()
def get_lineno(iseq, pos):
@brandt
brandt / 2.3.0-railsexpress
Created April 11, 2016 04:38
Ruby 2.3.0 rbenv / ruby-build recipe i.e. /usr/local/share/ruby-build/2.3.0-railsexpress
build_package_reconfigure() {
test -f configure || autoconf
}
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
patch -p1 < rvm-patchsets/patches/ruby/2.3.0/railsexpress/01-skip-broken-tests.patch
patch -p1 < rvm-patchsets/patches/ruby/2.3.0/railsexpress/02-improve-gc-stats.patch
patch -p1 < rvm-patchsets/patches/ruby/2.3.0/railsexpress/03-display-more-detailed-stack-trace.patch
@brandt
brandt / birthdays_by_index.json
Created March 14, 2016 15:04
Where the last 150 years of birthdays occur in Pi
This file has been truncated, but you can view the full file.
{
"9982546": [
"1960-11-23"
],
"9695244": [
"1944-11-23"
],
"7812514": [
"2013-10-29",
"1913-10-29"
#!/bin/bash
#
# Copyright (c) 2014, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright