Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile

host

iocell clone template tag=iwmnbase \
  host_domainname=example.com \
  host_hostname=iwmnbase \
  ip4_addr='lo1|10.241.0.4' \
  resolver='search example.com;nameserver 10.241.0.0' \
  allow_raw_sockets=1 \
  enforce_statfs=1
#!/usr/bin/env python
# props to the non-functional version found on
# http://stackoverflow.com/questions/21721942/is-there-an-easy-way-to-generate-a-graph-of-ansible-role-dependencies
# thanks xmj@ for the tip
import sys
import pygraphviz
from glob import glob
import yaml
g = pygraphviz.AGraph()
{
"name": "couchdb",
"origin": "databases/couchdb",
"version": "1.6.1_10,2",
"comment": "Document database server, accessible via a RESTful JSON API",
"maintainer": "[email protected]",
"www": "http://couchdb.org/",
"abi": "FreeBSD:12:amd64",
"arch": "freebsd:12:x86:64",
"prefix": "/usr/local",
~ sudo lldb -p 44953 (31s 653ms)
(lldb) process attach --pid 44953
Process 44953 stopped
Executable module set to "/sbin/ifconfig".
Architecture set to: x86_64--freebsd12.0.
(lldb) stacktrace
error: 'stacktrace' is not a valid command.
error: Unrecognized command 'stacktrace'.
(lldb) bt
@dch
dch / droplet.conf
Last active June 7, 2019 11:43
digital ocean's automatic setup script
# /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 / smartctl.log
Last active January 29, 2017 22:40
akai smart status 20170129
smartctl 6.5 2016-05-07 r4318 [FreeBSD 12.0-CURRENT amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Apple SD/SM/TS...E/F SSDs
Device Model: APPLE SSD SM0256G
Serial Number: S2HLNYAH203128
LU WWN Device Id: 5 002538 900000000
Firmware Version: BXW2SA0Q
User Capacity: 251,000,193,024 bytes [251 GB]
@dch
dch / smartctl.md
Created January 29, 2017 22:39
akai smart status 20170129

smartctl 6.5 2016-05-07 r4318 [FreeBSD 12.0-CURRENT amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION === Model Family: Apple SD/SM/TS...E/F SSDs Device Model: APPLE SSD SM0256G Serial Number: S2HLNYAH203128 LU WWN Device Id: 5 002538 900000000 Firmware Version: BXW2SA0Q User Capacity: 251,000,193,024 bytes [251 GB]

@dch
dch / instructions.md
Created January 9, 2017 07:57 — forked from johnko/instructions.md
Installing FreeBSD on a USB drive with ZFS using bsdinstall unattended

Installing FreeBSD on a USB drive with ZFS using bsdinstall unattended

I typically wrap all these commands into a shell script that I can reuse, but here they are in steps.

Please read through all the instructions before actually performing the commands, just to avoid any surprises

Requirements:

  • careful typing and copy/paste skills
  • USB drive (8 GB+ ?) Make sure you don't need anything on that drive
@dch
dch / rsyslog.md
Created January 6, 2017 23:15
rsyslog template forwarding tips via "Dan Woodruff <[email protected]>" in "[rsyslog] collect and forward w/o change"

Some things to keep in mind with the queue are:

  • This queue only takes place where you use 'call ForwardToQRadar' as your action for a filter, such as:
if ($msg contains 'Teardown' )
then {
 call ForwardToQRadar
```
sudo zfs create \
-o mountpoint=/Users/dch/Applications \
-o skunkwerks:automount=osx \
-o com.apple.mimic_hfs=on \
-o casesensitivity=insensitive \
-o normalization=formD \
-o com.apple.browse=on \
zroot/shared/Applications
sudo chown -R dch:staff Applications