Skip to content

Instantly share code, notes, and snippets.

Dave Cottlehuber dch

Block or report user

Report or block dch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dch / gist:8c58268f700309ecc90d0c9a6cab8f26
Created Sep 19, 2018
git diff --patience CouchDB-4.0.1...v4.4.1
View gist:8c58268f700309ecc90d0c9a6cab8f26
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a48c26e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
View config
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
dch@i09 /t/c/apache-couchdb-2.1.2> ./configure -c --skip-deps --disable-docs --disable-fauxton
==> configuring couchdb in rel/couchdb.config
You have configured Apache CouchDB, time to relax. Relax.
dch@i09 /t/c/apache-couchdb-2.1.2> gmake; and gmake check
==> config (compile)
Compiled src/config_sup.erl
Compiled src/config_listener_mon.erl
Compiled src/config_writer.erl
Compiled src/config_util.erl
dch / ddb.conf
Last active Jun 26, 2018
wintermute config files & dmesg @ r335576+8a125fa67c5d
View ddb.conf
# ansible_managed
# kernel
kld_list="linux64 fuse nvidia-modeset ipmi smb ichsmb dtraceall cc_htcp filemon cuse"
# daemons
dch /
Created Jun 23, 2018
pushing jail hostname into jails

I tried the following jail.conf and everything works perfectly.

exec.start = "/bin/sh /etc/rc";
exec.poststart = "jail -m name=$name host.hostname=$name.`hostname`";
exec.stop = "/bin/sh /etc/rc.shutdown";
db {
#!/bin/sh -e
# ansible managed
/bin/freebsd-version -ku
export PAGER="/bin/cat -bu"
cd /etc
test -d .git || git init .
git add -A
git commit --allow-empty -am `freebsd-version -ku | sort -r |head -1`-update
zfs snapshot -r zroot@`date -u +%Y%m%d-%H%M`:`freebsd-version -ku | sort -r |head -1`-update
beadm create `freebsd-version -ku | sort -r |head -1`-update
View openssh.erl
#!/usr/bin/env escript
main([Port]) ->
{ok, _} = application:ensure_all_started(ssh),
  • plan for code that is easy to delete/replace rather than code that is easy to extend or reuse. As needs change, you're more likely to change the assumptions about what the system should do than in how many ways it should do it. If the code needs extending, it's then easy to replace it with a bit that's easy to extend
  • planning for code that is easy to throw away is the best way I've found to properly bake in abstraction and isolation. The question is always "if I take this shit out or change its implementation entirely, do I need to replace anything else?". If the answer is "yes", then you may be leaking into other components. Fix it. turns out when you have that, it's also suddenly easier to reuse code.
  • write a prototype of whatever significant task you have to do, and consider it a draft. Use it to figure out requirements or to make your first mistakes in. Throw it away. Try again. As I gain more experience I find my prototypes smaller and individually more solid, but anything where I lack experience t
#!/bin/sh -ex
# /root/bin/
date -u +%Y%m%d-%H%M
sudo kldload filemon || /usr/bin/true
echo 'WITH_CCACHE_BUILD=yes' > /etc/src.conf
echo 'WITH_META_MODE=yes' > /etc/src-env.conf
# echo 'WITH_DIRDEPS_BUILD=yes' >> /etc/src-env.conf
NCPU=$(sysctl -n hw.ncpu)
cd /usr/src
sudo zfs rollback -rRf embiggen/usr/obj/release@empty
dch /
Last active Nov 15, 2017
Oró Sé do Bheatha 'Bhaile (Welcome Home)
Oh-roe shay duh vah-ha wall-ya,
Oh-roe shay duh vah-ha wall-ya,
Oh-roe shay duh vah-ha wall-yaaa,
[everyone] Ah-nish air hawkt un tauw-rEE!

Oh-roe shay duh vah-ha wall-ya,
Oh-roe shay duh vah-ha wall-ya,
Oh-roe shay duh vah-ha wall-yaaa,
You can’t perform that action at this time.