This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
STDOUT.sync = true | |
require 'rubygems' | |
require 'smqueue' | |
require 'yaml' | |
require 'socket' | |
puts "Starting..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'socket' | |
socket = TCPSocket.open('localhost', '11211') | |
socket.send("stats\r\n", 0) | |
statistics = [] | |
loop do | |
data = socket.recv(4096) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CraigW: ?snmp xeriom-vm-host-06 .1.3.6.1.2.1.1.1 | |
bot: SNMPv2-MIB::sysDescr.0 = STRING: Linux xeriom-vm-host-06.core.xeriom.net 2.6.24-17-xen #1 SMP Thu May 1 15:55:31 UTC 2008 x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Command | |
class << self | |
def execute(name, channel, username, arguments) | |
hostname, oid, remainder = arguments.split(/ /, 3) | |
`snmpwalk -c public -v 1 #{hostname}.core.xeriom.net #{oid}` | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
COMMANDS = File.expand_path(File.dirname(__FILE__)) | |
name, channel, username, command, arguments = *ARGV[0].split(/ /, 5) | |
command_script = File.join(COMMANDS, File.basename(command)) | |
if File.exists?(command_script) && !%W(run router).include?(command) | |
load command_script | |
puts Command.execute(name, channel, username, arguments).strip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script handles ?commands to irccat | |
exec ruby ./scripts/router "$@" 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CraigW: !channels | |
bot: I am in 2 channels: #foo #bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ant -Dconfgfile=./config/irccat.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git://github.com/RJ/irccat.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec 2>&1 | |
echo "Starting..." | |
ENVIRONMENT=production | |
PORT=8000 | |
IP=0.0.0.0 | |
CHDIR=/var/www/www.application.com |