Skip to content

Instantly share code, notes, and snippets.

View kmullin's full-sized avatar

Kevin Mullin kmullin

View GitHub Profile
/*****************************************************/
// Email Checker
// Designer : Arturo Erbsman
// Programmer : Antoine Villeret
// ENSADLab - 2010
/*****************************************************/
#include <Ethernet.h>
#define LEDPIN 9 // LED connected to this pin
@kmullin
kmullin / sphinx.rb
Created October 17, 2012 20:10
homebrew formula for sphinx 0.9.9
require 'formula'
class Sphinx < Formula
url 'http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz'
homepage 'http://www.sphinxsearch.com'
md5 '7b9b618cb9b378f949bb1b91ddcc4f54'
depends_on 'mysql'
def install
@kmullin
kmullin / hipchat_notify.rb
Created November 2, 2012 09:29 — forked from srinivasmohan/hipchat_notify.rb
Post Nagios alerts to Hipchat
#!/usr/bin/ruby
require 'rubygems'
require 'hipchat-api'
require 'getopt/long'
require 'socket'
require 'erb'
#Do not modify these constants! (after you set these up, of course)
HipApiKey='ABCDEFGHKJHKJHKJHKJH'
Room='Nagios'
@kmullin
kmullin / flac_to_mp3.sh
Last active December 18, 2015 14:39
Flac to MP3 script
#!/bin/sh
for a in *.flac; do
OUTF=${a%.flac}.mp3
ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g`
TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g`
ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g`
GENRE=`metaflac "$a" --show-tag=GENRE | sed s/.*=//g`
TRACKNUMBER=`metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g`
@kmullin
kmullin / flac_to_alac.sh
Created June 17, 2013 18:22
flac to apple lossless
#!/bin/sh
for i in *.flac; do
ffmpeg -i "$i" -acodec alac "${i%.flac}.m4a"
done
@kmullin
kmullin / bootstrap_ruby.sh
Last active December 19, 2015 13:19
script to install ruby from source curl -s https://gist.github.com/kmullin/5961565/raw/bootstrap_ruby.sh | bash -x
#!/bin/bash
RUBY_URL=${RUBY_URL:-"ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz"}
RUBY_MD5=${RUBY_MD5:-"993c72f7f805a9eb453f90b0b7fe0d2b"}
LIBYAML_URL=${LIBYAML_URL:-"http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"}
LIBYAML_MD5=${LIBYAML_MD5:-"36c852831d02cf90508c29852361d01b"}
get_source() {
# 1: url
@kmullin
kmullin / sphinx.rb
Last active March 8, 2016 19:14
sphinx.rb
require 'formula'
class Sphinx < Formula
url 'http://sphinxsearch.com/files/archive/sphinx-0.9.9.tar.gz'
homepage 'http://www.sphinxsearch.com'
md5 '7b9b618cb9b378f949bb1b91ddcc4f54'
depends_on 'mysql'
def install
@kmullin
kmullin / get_nic_speeds.c
Last active September 12, 2019 15:23
determine speed of network interfaces in linux using ioctl, and getifaddrs(3) will detect bonding interfaces, and sum speeds of slave devices. purpose for writing was to use with puppet and external facts
/*
* most of the code shamelessly stolen from:
* http://stackoverflow.com/a/2876605
*
* more code stolen from getifaddrs(3) manpage
*
* output is: interface=speed
* written by Kevin Mullin 01/07/14
*
*/
@kmullin
kmullin / streamtop.rb
Created January 8, 2014 04:22
streamtop.rb a quick (poorly written) ruby hi_scores list for checking http log files to quickly find trends
#!/usr/bin/env ruby
require 'optparse'
$ctable = Hash.new(0) # table of string => count
def clearTerm
print "\e[2J\e[f"
end
@kmullin
kmullin / README.md
Last active January 4, 2016 01:49
FreeDOS BIOS Flasher / Util bootdisk

Create a FreeDOS BIOS Flash bootdisk

General Info

Those BIOS images not fitting onto 1.44MB floppy anymore?

Did you need to use some other utilities in a minimal DOS environment?

In order to boot a system into DOS and have an emulated CDROM drive with the extra utilities, we need to first create a boot floppy