Skip to content

Instantly share code, notes, and snippets.

Brian Bennett bahamat

Block or report user

Report or block bahamat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hgrep.c
* This is free and unencumbered software released into the public domain.
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the

Keybase proof

I hereby claim:

  • I am bahamat on github.
  • I am bahamat ( on keybase.
  • I have a public key whose fingerprint is A383 6091 90D8 6943 6461 DC5E 4446 1DC0 B5CA 6B92

To claim this, I am signing this object:

bahamat /
Last active Aug 29, 2015
SMF Manifest and shell script for SmartOS to register common, active DNS-SD services.
# -- Register common services for SmartOS
# This is really only useful for people who run SmartOS on a LAN segment
# with workstations. E.g., your house.
# This script scans for common locally listening services and registers
# them with mDNS/DNS-SD/Bonjour.
bahamat /
Last active Aug 29, 2015
A cfengine bundle to upgrade all or a list of packages on a Debian system.
bundle agent dpkgup(p_list) {
"pkg_list" string => join(" ", p_list), policy => "free";
"pkg_list" string => "", policy => "free";
View gist:7c4abade72d674e34281
$ echo quote what? ; read quoteme ; printf %q "$quoteme" ; echo
quote what?
The horse said "$)#*@(!!%" when he stubbed his hoof.
The\ horse\ said\ \"\$\)#\*@\(\!\!%\"\ when\ he\ stubbed\ his\ hoof.
# Copyright 2014 Brian Bennett <>
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
bahamat / gist:851c24b6d1a0de0e4f10
Last active Aug 29, 2015
CFEngine health check example
View gist:851c24b6d1a0de0e4f10
"zone_data_is_healthy" expression => returnszero("/usr/bin/host -t soa","noshell");
"Zone data is healthy";
View splunkforwarder-manifest.xml
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='site/splunkforwarder' type='service' version='0'>
<create_default_instance enabled='true'/>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
<dependency name='splunk_multi-user' grouping='require_all' restart_on='none' type='service'>
bahamat / install.txt
Last active Oct 12, 2016 — forked from bahamas10/install.txt
Chef on SmartOS
View install.txt
(as root)
mkdir ~/src
cd ~/src
# install ruby
tar xf ruby-2.2.1.tar.gz
cd ruby-2.2.1
./configure --prefix=/opt/chef --with-opt-dir=/opt/local --enable-shared ac_cv_func_dl_iterate_phdr=no CFLAGS="-R -fPIC" rb_cv_have_signbit=no --disable-install-doc
You can’t perform that action at this time.