Skip to content

Instantly share code, notes, and snippets.

View faxm0dem's full-sized avatar
⌨️
Typing…

Fabien Wernli faxm0dem

⌨️
Typing…
View GitHub Profile
#!/usr/bin/perl -w
#
# Jesper Nyerup <[email protected]>
my $ipmitool = '/usr/bin/ipmitool';
my @chararray = split(//, join(' ', @ARGV));
usage() if (@chararray == 0 or @chararray > 14);
system("$ipmitool raw 0x6 0x58 193 0x0 0x0 ".
@faxm0dem
faxm0dem / riemann.config.clj
Created November 16, 2015 14:00
Riemann.io exceptions to events
;; watchdog-cfg is just a hash with host, port, etc.
(streams
;; irrelevant code ommited :)
(where (service #"riemann server")
(let [send-watchdog (forward (riemann.client/tcp-client watchdog-cfg))]
(fn watchdog-sending [event]
(try (send-watchdog event)
(catch Exception exc
(tell-ops (utils/exception->event exc))))))))
@faxm0dem
faxm0dem / node
Created January 24, 2014 09:47
node.js fedora style init script
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="node"
@faxm0dem
faxm0dem / gist:7928492
Last active December 31, 2015 03:38 — forked from mayhem/gist:7928414
{
"order" : 0,
"template" : "*stash-*",
"mappings" : {
"properties" : {
"useragent" : { "type" : "string", "index" : "not_analyzed" }
}
}
}