Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile
@dch
dch / app.sh
Last active March 14, 2019 21:13
#!/bin/sh -e
# obvious
export APP=$(basename -s .sh $0)
# derived paths are OS dependent
export ERTS=$(find /usr/local/lib/erlang* -type d -depth 1 -name erts-\* | tail -1)
export VERSION=$(cut -swf 2 /usr/local/lib/${APP}/releases/start_erl.data)
# config files
CONFIGS=/usr/local/etc/${APP}
# refer to http://cbonte.github.io/haproxy-dconv/1.7/configuration.html
# and http://cbonte.github.io/haproxy-dconv/1.7/management.html
global
daemon
pidfile /var/run/haproxy.pid
log 127.0.0.1 format rfc5424 local0
# drop privileges
chroot /var/empty
group www
@dch
dch / dmesg.log
Last active July 24, 2019 14:02
This nvme drive does (in real-world terms) ~ 1400GiB/hr streaming reads from a zpool under FreeBSD 12.0p2 amd64 after a couple of years of sustained abuse.
---<<BOOT>>---
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-RELEASE-p2 GENERIC amd64
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
VT(efifb): resolution 1280x1024
module_register: cannot register mmc/mmcsd from kernel; already loaded from mmcsd.ko
Module mmc/mmcsd failed to register: 17
@dch
dch / main.yml
Created December 12, 2018 19:13
ansible zerotier role
---
- name: zerotier | install pkg
pkgng:
state: latest
name:
- net/zerotier
notify: zerotier | restart
tags:
- pkg
- zerotier
@dch
dch / pizza.md
Last active July 18, 2019 13:58
pizza variations

pizza variations

I got some "fancy" 00 pizza flour, and some std semolina pasta flour too. Let's do some experiments on getting the crusty feeling.

  • 4c flour (600g)
  • 375mL warm water
  • 1 cube live yeast
  • 2 tsp salt
  • 2 slops olive oil
@dch
dch / minimal.yml
Last active September 25, 2018 15:18
minimal single-file ansible playbook for FreeBSD
---
# a minimal FreeBSD oriented ansible playbook
# you can run this as follows:
# ansible-playbook quick.yml -i localhost, -v
# note the trailing , necessary to skip needing an inventory file
- hosts: localhost
connection: local
become: yes
vars:
ansible_python_interpreter: /usr/local/bin/python2.7
databases/couchdb2: new port via PR#218844
Summary: JSON document database with HTTP API & scalable multi-master sync
A number of people provided signficant assistance while developing this
port. Thank-you for your perseverance and assistance.
PR: 218844
Submitted by: dch
Reported by:
@dch
dch / hexpm.mk
Created September 21, 2018 06:27
# $FreeBSD$
#
# Fetch packages from https://hex.pm/packages/ for Elixir and Erlang/OTP
#
# Feature: hexpm
# Usage: USES=hexpm
# Valid ARGS: does not require args
#
# MAINTAINER= [email protected]
#
@dch
dch / ibrowse.diff
Last active September 19, 2018 08:32
git diff --patience CouchDB-4.0.1...v4.4.1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a48c26e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+_build
+ebin
+*.beam
+*.sw*
@dch
dch / gist:8c58268f700309ecc90d0c9a6cab8f26
Created September 19, 2018 08:31
git diff --patience CouchDB-4.0.1...v4.4.1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a48c26e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+_build
+ebin
+*.beam
+*.sw*