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
View keybase.md

Keybase proof

I hereby claim:

  • I am bahamat on github.
  • I am bahamat (https://keybase.io/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
bahamat / dnssd-register.sh
Last active Aug 29, 2015
SMF Manifest and shell script for SmartOS to register common, active DNS-SD services.
View dnssd-register.sh
#!/bin/bash
# dnssd-register.sh -- 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
bahamat / dpkgup.cf
Last active Aug 29, 2015
A cfengine bundle to upgrade all or a list of packages on a Debian system.
View dpkgup.cf
bundle agent dpkgup(p_list) {
vars:
done_with_classes.package_list_provided::
"pkg_list" string => join(" ", p_list), policy => "free";
done_with_classes.!package_list_provided::
"pkg_list" string => "", policy => "free";
done_with_classes::
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.
$
View psum2graphite.sh
#!/bin/bash
# Copyright 2014 Brian Bennett <bahamat@digitalelf.net>
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@bahamat
bahamat / gist:851c24b6d1a0de0e4f10
Last active Aug 29, 2015
CFEngine health check example
View gist:851c24b6d1a0de0e4f10
classes:
named_is_running::
"zone_data_is_healthy" expression => returnszero("/usr/bin/host -t soa digitalelf.net 127.0.0.1","noshell");
reports:
debian.named_is_running.zone_data_is_healthy::
"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'/>
<single_instance/>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='splunk_multi-user' grouping='require_all' restart_on='none' type='service'>
@bahamat
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
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.gz
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.