Skip to content

Instantly share code, notes, and snippets.

@zbrdge
zbrdge / repro-zfs-builderror.sh
Last active August 20, 2016 15:41
configure error section (zfs 0.6.5.7 on linux 4.7.1_2)
#!/bin/sh
# failing section from configure in /var/lib/dkms/zfs/0.6.5.7/build
export LINUX_OBJ=/usr/src/kernel-headers-4.7.1_2
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
int get(struct inode *ip, const char *name,
@zbrdge
zbrdge / full backtrace
Created August 3, 2016 14:38
Full GB BT / erl on Void
#0 0x000055555572703b in enif_make_list_from_array (env=env@entry=0x7fffaffdce30, arr=arr@entry=0x7fffac37fa40 <algo_cipher>, cnt=<optimized out>) at beam/erl_nif.c:1600
hp = 0x7fff77219bd0
ret = 140735187357777
last = 0x7fff77219bc8
src = 0x7fffac5c0008
#1 0x00007fffac17bc9c in algorithms (env=0x7fffaffdce30, argc=<optimized out>, argv=<optimized out>) at crypto.c:828
hash_cnt = 8
pubkey_cnt = 7
cipher_cnt = <optimized out>
#2 0x00005555555a48a7 in process_main () at beam/beam_emu.c:3563
@zbrdge
zbrdge / erlang GDB on Void
Created August 3, 2016 13:15
call erlexec in GDB properly (voidlinux)
#!/bin/sh
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 1996-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
@zbrdge
zbrdge / mDNSResponder.plist.patch
Created April 12, 2014 12:18
OS X Chroot mDNSResponder
--- /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist 2014-04-12 05:15:39.000000000 -0700
+++ /tmp/com.apple.mDNSResponder.plist.new 2014-04-12 05:15:11.000000000 -0700
@@ -26,6 +26,7 @@
<key>Sockets</key>
<dict>
<key>Listeners</key>
+ <array>
<dict>
<key>SockFamily</key>
<string>Unix</string>
@zbrdge
zbrdge / customize_s.sh
Last active May 6, 2016 21:00
Shell script I wrote to customize Automattic/_s after pulling from the repo (simple find and replace).
#!/bin/bash
# Five step search and replace with find, sed, and bash (tested on OS X, should work with Linux)
# check usage and parse command line arguments
OPTIND=1
while getopts "n:m:" opt; do
case "$opt" in
n)
human=$OPTARG