Skip to content

Instantly share code, notes, and snippets.

View ukd1's full-sized avatar

Russell Smith ukd1

View GitHub Profile
@ukd1
ukd1 / graylog2_mapreduce_report.php
Created April 28, 2011 16:33
Generate a simple report of attacks on your servers from Graylog2 data using MapReduce (now requires MongoDB driver >= 1.2)
<?php
/**
* A quick & dirty script that outputs a list of possible attacking IP address,
* per host with a total count.
*
* Tweak the "THE_QUERY" constant to suit your environment - we use Debian & Ubuntu
*
* @author Russell Smith <[email protected]>
* @copyright UKD1 Limited, 2011
* @license ISC license
@ukd1
ukd1 / truncate.php
Created November 29, 2010 20:38
Allows deleting of all keys in a riak bucket using the streaming api
<?php
/**
* Delete all keys from a riak bucket using key streaming
*
* History:
*
* 29-Nov-10
* First version
*
* @author Russell Smith <[email protected]>
#! /usr/bin/env bash
open -a iTunes http://store.ukd1.co.uk.s3.amazonaws.com/coin.wav || open http://store.ukd1.co.uk.s3.amazonaws.com/coin.wav
sudo fs_usage -w -f filesys mdworker