Skip to content

Instantly share code, notes, and snippets.

sdb-sde are 64G zvols on a striped zpool of 8 mirrors
fio was created by:
lvcreate -L 240G -i4 -I64 -n fio TestVolGroup
guest command:
doas cpuset -c -l 16-31 -n ft:1 -- grub-bhyve -S -m /chyves/storage/guests/ubi0/device.map -r hd0,msdos1 -c /dev/nmdm52A -M 32G chy-ubi0; doas cpuset -c -l 16-31 -n ft:1 -- bhyve -A -H -P -S -c 16 -U ec30b988-f5aa-11e7-a76c-ac1f6b0a8cd2 -m 32G -s 0,hostbridge -s
4,ahci-hd,/dev/zvol/storage/chyves/guests/ubi0/disk0 -s 5,virtio-net,tap52 -s 6,kvirtio-net,mtu=1500,queues=4,intf=cc0,mac=00:07:43:3d:92:d1 -s 7,ahci-hd,/dev/zvol/storage/chyves/guests/ubi0/disk1 -s 8,ahci-hd,/dev/zvol/storage/chyves/guests/ubi0/disk2 -s 9,ahci-hd,/dev/zvol/storage/chyves/guests/ubi0/disk3 -s 10,ahci-hd,/dev/zvol/storage/chyves/guests/ubi0/disk4 -l com1,/dev/nmdm52A -s 31,lpc chy-ubi0
ARC MAX 8G (in use 8G)
package locktest
import (
"sync"
"testing"
)
var l sync.Mutex
func dLock() {
@ericclemmons
ericclemmons / example.md
Last active April 24, 2024 18:09
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@zg
zg / freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Last active April 1, 2024 21:47
Create FreeBSD virtual machine using qemu. Run the VM using xhyve.

TL;DR

  • Create 10GB FreeBSD image using QEMU.
  • Run the VM using xhyve.
  • Mount host directory.
  • Resize the image.

Requisites

@tsuna
tsuna / README.md
Created March 27, 2016 04:17
SSL/TLS certificate rotation with gRPC (hack/demo/POC)

gRPC SSL/TLS cert rotation

Generate a couple key pairs:

openssl req -x509 -newkey rsa:2048 -keyout key1.pem -out cert1.pem -days 42 -nodes
openssl req -x509 -newkey rsa:2048 -keyout key2.pem -out cert2.pem -days 42 -nodes
ln -s key1.pem key.pem
ln -s cert1.pem cert.pem
@justincampbell
justincampbell / upvote_gifs.md
Last active March 17, 2016 18:47
Upvote gifs

@bixu
bixu / circonus_httptrap_push.sh
Created January 28, 2016 17:07
Send a key:value pair to a Circonus HTTPTrap endpoint
#!/bin/bash
# Note that the -k flag here means we are ignoring cert warnings.
# If security matters you should use the Circonus cert provided
# here: http://login.circonus.com/pki/ca.crt
KEY=$1
VALUE=$2
ENDPOINT_URL=$3
### grub configuration for alyzon
#
# I run FreeBSD/amd64 with root-on-ZFS on a Lenovo ThinkCentre M83,
# which has UEFI. At the moment, this configuration is basically
# unsupported (although it's coming soon), but I want to be able to
# use my system. I've had prior experience with Lenovo UEFI boxes
# before (Arch on my ThinkPad T440), and I hate autogenerated GRUB
# configs, so I appropriated my hand-written GRUB config, and extended
# it.
#
@szaydel
szaydel / io-size-through-zil-by-file.d
Last active September 21, 2017 23:17
Dtrace snippets for observing behaviour of ZIL
dtrace -qn '
/* Add a number greater than 0 after the script on the command line, to
* tell the script how often to print results to screen. If no value is
* given, script will fail immediately. Value must be positive and is in
* seconds. Results will be printed "this many" seconds apart, but will
* be normalized to a per-second result.
*/
int ts;
BEGIN { ts = timestamp; }