Skip to content

Instantly share code, notes, and snippets.

View Eleeleth's full-sized avatar

Anthony Clever Eleeleth

View GitHub Profile
@Eleeleth
Eleeleth / resolver.rb
Last active December 18, 2015 13:58
Resolve a server to its IP for Toribash.
require 'socket'
host = 'game.toribash.com'
port = 22000
server = 'judo1'
#Create our socket.
lobbySock = TCPSocket.new host, port
@Eleeleth
Eleeleth / createroom.rb
Created June 16, 2013 23:31
Resolver + get forwarded ip if not resolved.
#create a new server if none exists already
require 'socket'
def resolver(server)
puts "Trying to resolve #{server} to IP..."
#Create our socket.
host = 'game.toribash.com'
port = 22000
@Eleeleth
Eleeleth / tbbot.rb
Last active December 18, 2015 14:08
Basic toribash idlebot.
#!/usr/bin/env ruby
## Bot, sits in TB server and pings periodically to
## remain connected. Parses SAY strings for globals
require 'socket'
require 'digest/md5'
def resolver(server)
puts "Trying to resolve #{server} to IP..."
@Eleeleth
Eleeleth / tbbot-irc.rb
Last active December 18, 2015 14:49
Bot to mirror globals into irc.
#!/usr/bin/env ruby
## Bot, sits in TB server and pings periodically to
## remain connected. Parses SAY strings for globals
require 'socket'
require 'digest/md5'
require 'io/wait'
def resolver(server)
puts "Trying to resolve #{server} to IP..."
@Eleeleth
Eleeleth / pykl-repo-parser.js
Created October 2, 2013 02:05
Turn s3 xml from hitting our Maven repository into a useable json object.
'use strict';
var http = require('http');
var url = '';
var data = '';
var libraries = {
releases: {},
snapshots: {}
};
//bookmarklet:
javascript:(function(e){var t=e(".comment"),n=t.find(".md > p");n.each(function(t){if(/^not\s+\w.+but/ig.test(e(this).text())){e(this).parentsUntil(".comment").parent().hide()}})})($)
//un minified:
(function ($) {
var c = $('.comment'), t = c.find('.md > p');
t.each(function (index) {
if (/^not\s+\w.+but/ig.test($(this).text())) {
$(this).parentsUntil('.comment').parent().hide();