Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile
@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*
# 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
dch / 2.1.2.fail.log
Created July 9, 2018 23:26
2.1.2 hates me
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
dch / ddb.conf
Last active June 26, 2018 07:51
wintermute config files & dmesg @ r335576+8a125fa67c5d
# ansible_managed
hostname="wintermute.skunkwerks.at"
# kernel
kld_list="linux64 fuse nvidia-modeset ipmi smb ichsmb dtraceall cc_htcp filemon cuse"
update_motd=YES
# daemons
zfs_enable="YES"
syslogd_flags="-ss"
@dch
dch / set_jail_hostname.md
Created June 23, 2018 10:32
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";
exec.clean;
mount.devfs;
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
@dch
dch / openssh.erl
Created February 27, 2018 13:19 — forked from maxlapshin/openssh.erl
#!/usr/bin/env escript
%%
%%
-mode(compile).
-compile(export_all).
main([Port]) ->
{ok, _} = application:ensure_all_started(ssh),
@dch
dch / tips.md
Created February 26, 2018 08:33 — forked from ferd/tips.md
  • 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
@dch
dch / gaelic.md
Last active November 15, 2017 15:23
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!

[chorus]
Oh-roe shay duh vah-ha wall-ya,
Oh-roe shay duh vah-ha wall-ya,
Oh-roe shay duh vah-ha wall-yaaa,