Skip to content

Instantly share code, notes, and snippets.

View 0xf10e's full-sized avatar
😶
I may be slow to respond.

Florian Ermisch 0xf10e

😶
I may be slow to respond.
View GitHub Profile
@0xf10e
0xf10e / README.md
Last active March 23, 2020 23:00
How To Connect to the Serial Console of a FreeBSD guest running under VMware Fusion 11 Pro

So Cisco's AnyConnect prevents access to virtual local networks, too, great!

Turns out, you can do more with a serial port in VMware Fusion than logging it's output. Like, use it as a proper serial console so you can log in when something is messing with your network stack.

This primarily shows @kuenishi's directions still work on macOS 10.14 Mojave with VMware Fusion 11.x Pro.

  1. Create VM, add serial port, make sure VM is shut down, edit .vmx file's `serial0' lines to look like this:
@0xf10e
0xf10e / 00_clean_src.sh
Last active February 21, 2018 07:41
Used on my 11^W12-CURRENT laptop to rebuild FreeBSD from source.
#!/bin/sh
UPDATE_SRC=false
if [ ! -z "$1" ] && [ "$1" = "-u" ];
then
UPDATE_SRC=true
if which svn; then
SVN=`which svn`
elif which svnlite; then
SVN=`which svnlite`
@0xf10e
0xf10e / updates.sh
Created February 21, 2018 07:33
Update command from my shell history
sudo pkg upgrade && sudo portsnap fetch update && \
( pkg version | grep -v =; pkg audit ); \
NUM_SNAPS=`zfs list -rt snapshot | wc -l`; \
sudo zfSnap -d -p cron_; sudo -K; \
NUM_SNAPS_NEW=`zfs list -rt snapshot | wc -l`; \
printf "\n%8d ZFS snapshots across all pools \n%8d Snapshots deleted in last purge\n" \
$NUM_SNAPS_NEW $(( $NUM_SNAPS - $NUM_SNAPS_NEW ))
@0xf10e
0xf10e / example.md
Created September 13, 2017 07:21
HPR 2378 - lists and code blocks
  1. ok,
  2. let's
  3. see: foo, four spaces in as $HOST said doesn't work
  4. but
  5. what about three backticks?

echo $HPR

1. didn't work?
@0xf10e
0xf10e / babilen_asked_for_it.log
Created January 28, 2016 11:47
using pillar.get in state files broken in 2015.8 on Ubuntu?
user@workstation:/srv/salt/formulas/openstack-formula.git% sudo salt controller pillar.get 'openstack:skip_pillar_check'
controller:
True
user@workstation:/srv/salt/formulas/openstack-formula.git% head nova/nova_conf.sls
{% from 'openstack/defaults.jinja' import openstack_defaults %}
{% from 'nova/map.jinja' import nova with context %}
{% if not pillar.get('openstack:skip_pillar_check', False) %}
nova passwords in pillar:
test.check_pillar:
- failhard: True
user@workstation:/srv/salt/formulas/openstack-formula.git% cat /srv/salt/base.hg/test.sls
pillarkey_to_check:
test.check_pillar:
- string: 'nova:database:password'
user@workstation:/srv/salt/formulas/openstack-formula.git% sudo salt con\* state.sls test
controller:
----------
ID: pillarkey_to_check
Function: test.check_pillar
Result: True
@0xf10e
0xf10e / gelitest.md
Last active January 23, 2016 14:06 — forked from anonymous/gelitest.md
Draft for a FreeBSD bugreport

Preface

I added a 256GB mSATA SSD to my Lenovo x220 of which I planned to use a nice chunk as L2ARC for the SATA HDD. Even without a SATA disk present the SSD showed up as HDD2 in the BIOS.

Made a fresh installation of FreeBSD 10.2 amd64 with the memstick image and chose ZFS+Geli. Booted, worked, everything just fine. I added a

@0xf10e
0xf10e / _var_log_messages
Created December 27, 2015 17:52
stack backtrace on `zpool export` since upgrade to 11-CURRENT
Dec 27 18:44:02 fuchi-cyber220 kernel: lock order reversal:
Dec 27 18:44:02 fuchi-cyber220 kernel: 1st 0xfffff800c7472418 zfs (zfs) @ /usr/src/sys/kern/vfs_mount.c:1224
Dec 27 18:44:02 fuchi-cyber220 kernel: 2nd 0xfffff800c73fad50 zfs_gfs (zfs_gfs) @ /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c:494
Dec 27 18:44:02 fuchi-cyber220 kernel: stack backtrace:
Dec 27 18:44:02 fuchi-cyber220 kernel: #0 0xffffffff80a7d6f0 at witness_debugger+0x70
Dec 27 18:44:02 fuchi-cyber220 kernel: #1 0xffffffff80a7d5f1 at witness_checkorder+0xe71
Dec 27 18:44:02 fuchi-cyber220 kernel: #2 0xffffffff809fedcb at __lockmgr_args+0xd3b
Dec 27 18:44:02 fuchi-cyber220 kernel: #3 0xffffffff80ac55ec at vop_stdlock+0x3c
Dec 27 18:44:02 fuchi-cyber220 kernel: #4 0xffffffff80fbb220 at VOP_LOCK1_APV+0x100
Dec 27 18:44:02 fuchi-cyber220 kernel: #5 0xffffffff80ae653a at _vn_lock+0x9a

Keybase proof

I hereby claim:

  • I am 0xf10e on github.
  • I am 0xf10e (https://keybase.io/0xf10e) on keybase.
  • I have a public key whose fingerprint is 05F5 79FB 647A 0501 0F0F BA78 3ECE 2CC6 026B 24D6

To claim this, I am signing this object:

@0xf10e
0xf10e / no_desktop.sh
Created August 4, 2015 11:54
Remove all the desktop stuff from Ubuntu
#!/bin/sh
# may need additional "xubuntu-*" or the likes for other flavors
apt-get remove $(for PKG in $(dpkg-query \
--showformat='${Essential} ${Status}:${Package} ${Depends} ${Recommends}\n\n' \
--show \*-desktop lubuntu\*| sed -e '/^yes/d' -e '/not-installed/d' -e 's/^[^:]*://' \
-e 's/(\(<<\|>=\).*)//g' -e 's/|//g' -e 's/:any //g' -e s/,//g);
do
dpkg-query --showformat='${Status}: ${Package}\n' --show $PKG | sed -ne 's/^install ok installed://p';