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
dch / dmesg.log
Last active Jul 24, 2019
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.
View dmesg.log
---<<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 / pizza.md
Last active Jul 18, 2019
pizza variations
View pizza.md

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 / droplet.conf
Last active Jun 7, 2019
digital ocean's automatic setup script
View droplet.conf
# /etc/rc.digitalocean.d/droplet.conf
# Generated by bsdcloud-init 2017-01-31 08:52
hostname="wolf.example.org"
# Generated by bsdcloud-init 2017-01-31 08:52
ifconfig_vtnet0_alias0="inet 10.18.0.5 netmask 255.255.0.0"
# Generated by bsdcloud-init 2017-01-31 08:52
ifconfig_vtnet0="inet 188.166.73.162 netmask 255.255.192.0"
# Generated by bsdcloud-init 2017-01-31 08:52
defaultrouter="188.166.64.1"
@dch
dch / d10335-cbsd-9p-13.0.diff
Last active May 22, 2019
diff of D10335 patch vs CBSD-provided 13.0 diff, both rebased against latest current https://reviews.freebsd.org/D10335 & https://github.com/cbsd/cbsd/tree/develop/upgrade/patch/p9-13.0
View d10335-cbsd-9p-13.0.diff
diff --git etc/mtree/BSD.include.dist etc/mtree/BSD.include.dist
index 385e096b7e9..88b60c8794c 100644
--- etc/mtree/BSD.include.dist
+++ etc/mtree/BSD.include.dist
@@ -259,10 +259,10 @@
..
lib80211
..
- lib9p
- ..
View websockets-with-gun.ex
defmodule Transport do
def connect(params) do
hostname = params.hostname
port = params.port
path = params.path
timeout = params.connection_timeout
{:ok, conn} = :gun.open(hostname, port)
{:ok, :http} = :gun.await_up(conn)
:gun.ws_upgrade(conn, path)
View dumpacpi.sh
#!/bin/bash
#
# dumpACPItables, get all Tables from Mac OS X ioreg.
#
# 06-19-2009 AlainTox714
#
# path: /usr/local/bin
#
ACPIdir="/Users/${USER}/Desktop/ACPI_tables"
View app.sh
#!/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}
View haproxy.conf.j2
# 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 / gist:4148379
Created Nov 26, 2012 — forked from ajohnstone/gist:4148292
graphite internal performance
View gist:4148379
Carbon relay - performance
alias(color(sumSeries(group(carbon.agents.*.updateOperations)), "blue"),"Updates")
alias(color(sumSeries(group(carbon.agents.*.metricsReceived)), "green"), "Metrics Received")
alias(color(sumSeries(group(carbon.agents.*.committedPoints)),"orange"),"Committed Points"))
alias(secondYAxis(color(sumSeries(group(carbon.agents.*.pointsPerUpdate)),"yellow")),"PPU")
alias(secondYAxis(color(averageSeries(group(carbon.agents.*.cpuUsage)),"red")),"CPU (avg)")
alias(secondYAxis(color(sumSeries(group(carbon.agents.*.creates)),"purple")),"Creates")
Metrics received
carbon.agents.*.metricsReceived
@dch
dch / 20150131_grandpas_sourdough_recipe.md
Last active Jan 21, 2019
Grandpa's sourdough recipe
View 20150131_grandpas_sourdough_recipe.md

Grandpa's Sourdough Bread Recipe

January 2015

  • adapted for use with an ambient room temperature of about 20 degrees

  • uses existing starter

  • see instructions below for making starter if none is available

Awaken the starter

You can’t perform that action at this time.