Skip to content

Instantly share code, notes, and snippets.

@jamesog
jamesog / gist:4c7f7b448a28f27dd51f
Created January 14, 2015 21:08
FreeBSD dmesg on DigitalOcean
Copyright (c) 1992-2014 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 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz (2400.01-MHz K8-class CPU)
Origin = "GenuineIntel" Id = 0x306e4 Family = 0x6 Model = 0x3e Stepping = 4
Features=0xf83fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2,SS>
TarsnapArgs:
ExcludeFile: /root/crons/tarsnap.exclude
BackupDirs:
- /boot
- /etc
- /home
- /root
- /usr/local/etc
- /var/log
- /data/jail/boxbackup/etc

Keybase proof

I hereby claim:

  • I am jamesog on github.
  • I am jamesog (https://keybase.io/jamesog) on keybase.
  • I have a public key whose fingerprint is E9EB 3E24 C08C 0AE3 2A47 CA16 FF19 DF02 C0D7 49BD

To claim this, I am signing this object:

@jamesog
jamesog / mkinventory.pl
Last active September 2, 2019 22:45
Exporting from RackTables (e.g. for creating an inventory spreadsheet).
#!/usr/bin/env perl
use warnings;
use strict;
# Use modules installed with cpanm -L
use lib 'extlib/lib/perl5';
use DBI;
use POSIX qw(strftime);
use Spreadsheet::WriteExcel;
@jamesog
jamesog / zpools.rb
Created May 9, 2013 16:58
Retrieving zpools in facter
require 'facter'
Facter.add('zpools') do
setcode do
zpools = []
if Facter::Util::Resolution.which('zpool')
Facter::Util::Resolution.exec('zpool list -Ho name').each_line do |line|
line.strip!
zpools << line
end
if tmux has 2>/dev/null; then
echo "tmux sessions found:"
tmux ls
echo
echo -n "Attaching to default tmux session in 5 seconds. Press Ctrl-C to abort"
for ((i=5; i>0; i--))
do
printf "."
if read -s -t 1 -k ; then break; fi
done