Skip to content

Instantly share code, notes, and snippets.

View mchail's full-sized avatar

Steve McHail mchail

View GitHub Profile
@mchail
mchail / clever_solver.rb
Created August 18, 2012 00:20
getclever.com puzzle solution
class CleverSolver
require 'rest-client'
require 'json'
def initialize
@root = "https://DEMO_KEY:@api.getclever.com"
@next_url = "/v1.1/students"
@vcount = 0
end
@mchail
mchail / extEventLogger.js
Created February 21, 2012 03:10
Log all Ext events
javascript:(
function() {
var o = Ext.util.Observable.prototype;
o.fireEvent = o.fireEvent.createInterceptor(function(evt) {
var a = arguments;
console.log(this, ' fired event ', evt, ' with args ', Array.prototype.slice.call(a,1,a.length));
});
}
)();
@mchail
mchail / turntablr.js
Created January 19, 2012 22:27
turntable autobopper
javascript:(function(){
if(typeof turntablr !== 'undefined'){alert('already turntablin')}
else{
turntablr = true;
$($($('.roomView > div > a')[2]).data('events').click).each(function(k,h){
a = h.handler.toString().match(/[a-zA-z]+\.callback\(.upvote.\)/)[0]
});
setInterval(function(){eval(a)},10000);
tt = $('<div style=\'display:none;color:red;position:fixed;left:10px;top:10px;padding:10px;border:1px solid red;background:#ddd;-moz-border-radius:10px;-webkit-border-radius:10px\'>turntablin</div>');
$('body').append(tt);