Skip to content

Instantly share code, notes, and snippets.

View jasonrm's full-sized avatar

Jason R. McNeil jasonrm

  • Arizona
  • 18:35 (UTC -07:00)
View GitHub Profile
@jasonrm
jasonrm / loop1p10.superblock
Created July 3, 2018 05:41
2010 BWM 328i CIC Hard Drive
Disk /dev/loop1: 74.5 GiB, 80026361856 bytes, 156301488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6ad4b821
Device Boot Start End Sectors Size Id Type
/dev/loop1p1 63 156296384 156296322 74.5G 5 Extended
/dev/loop1p5 126 117451214 117451089 56G 4d QNX4.x
@jasonrm
jasonrm / config.gateway.json
Last active May 9, 2018 00:35
UniFi config.gateway.json
{
"firewall": {
"group": {
"network-group": {
"rfc1918_networks": {
"network": [
"192.168.0.0/16",
"172.16.0.0/12",
"10.0.0.0/8"
],
@jasonrm
jasonrm / system-auth
Created May 8, 2018 23:19
old ldap config
#%PAM-1.0
# If LDAP lookup is successful, continue through group checks, otherwise skip
auth sufficient pam_ldap.so minimum_uid=1000
auth required pam_unix.so try_first_pass nullok
auth optional pam_permit.so
auth required pam_env.so
# If LDAP lookup is successful, continue through group checks, otherwise skip
account [success=ok default=2] pam_ldap.so minimum_uid=1000
account sufficient pam_succeed_if.so user ingroup posixSystemAdministrators
@jasonrm
jasonrm / clima-spindump
Created October 27, 2017 18:53
Clima.app is great, until it uses 100% CPU for extended periods of time for no reason
Thread 0x19b5941 Thread name "Threadpool worker" 1000 samples (1-1000) priority 31 (base 31) cpu time 9.974
907 thread_start + 13 (libsystem_pthread.dylib + 12429) [0x7fffa14de08d]
907 _pthread_start + 286 (libsystem_pthread.dylib + 14471) [0x7fffa14de887]
907 _pthread_body + 180 (libsystem_pthread.dylib + 14651) [0x7fffa14de93b]
907 start_wrapper + 675 (Clima + 2274083) [0x10fd3b323]
907 worker_thread + 353 (Clima + 2232337) [0x10fd31011]
907 worker_callback + 928 (Clima + 2241792) [0x10fd33500]
907 do_runtime_invoke + 88 (Clima + 1970888) [0x10fcf12c8]
907 mono_jit_runtime_invoke + 1316 (Clima + 1150308) [0x10fc28d64]
907 ??? [0x1169d9fe2]
@jasonrm
jasonrm / 01-with-traffic-control.md
Last active April 16, 2023 05:19
EdgeRouter Lite 3-Port max-throughput with a single root queue

EdgeRouter

ubnt@ubnt:~$ show version
Version:      v1.9.7+hotfix.3
Build ID:     5013619
Build on:     08/30/17 02:42
Copyright:    2012-2017 Ubiquiti Networks, Inc.
HW model:     EdgeRouter Lite 3-Port
Uptime:       00:49:12 up 49 min,  1 user,  load average: 0.36, 0.52, 0.29
@jasonrm
jasonrm / 01-cmd.sh
Created October 1, 2017 20:05
zfsonlinux change-key panic
❯ dd if=/dev/urandom of=/etc/zfs/initcpio-keys.d/rpool.key bs=32 count=1
❯ zfs change-key -o keyformat=raw -o keylocation=file:///etc/zfs/initcpio-keys.d/rpool.key rpool
@jasonrm
jasonrm / gist:c3d33ad37e06507485e9ca40d9ccfa82
Created July 7, 2017 18:44
Why you should be setting filesystem_limit on ZFS
❯ zfs list
[ snip ]
rpool/docker/fffdfe341e219c1614beea8169b74a332b7c95b2f221d2e9fce1e437d3bad107-init   128K   370G  15.8M  legacy
rpool/docker/fffe97b6522c951339049f889cd3019dd11b458eb0db98a18c867ad310cea625        176K   370G  15.8M  legacy
rpool/docker/fffe97b6522c951339049f889cd3019dd11b458eb0db98a18c867ad310cea625-init   128K   370G  15.8M  legacy

~ root@caramel 3m 17s
[global]
<snip>
mon host = 10.76.35.12 10.76.35.13 10.76.35.14
mon initial members = marlin dory nemo
<snip>

Roughly the initial state

❯ ceph osd dump
2017-05-26 21:46:43.373290 7f8bb3513700 -1 WARNING: the following dangerous and experimental features are enabled: bluestore,rocksdb
2017-05-26 21:46:43.379603 7f8bb3513700 -1 WARNING: the following dangerous and experimental features are enabled: bluestore,rocksdb
epoch 3361
fsid bc56bb17-4fad-40c2-93fa-cb07c3f7da0a
created 2017-02-28 08:43:12.121679
modified 2017-05-25 06:42:27.953396
@jasonrm
jasonrm / gist:bf11a80f9f3a147e2fd8f7e8c16f6079
Created April 20, 2017 18:44
tmux 2.4: Click-drag copy to clipboard on macOS
# When ending drag, copy to clipboard
bind -Tcopy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel "/usr/local/bin/reattach-to-user-namespace pbcopy"
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "/usr/local/bin/reattach-to-user-namespace pbcopy"