Skip to content

Instantly share code, notes, and snippets.

View THEtheChad's full-sized avatar

Chad Elliott THEtheChad

View GitHub Profile
var s = s_gi(s_mpcs_account);
// set defaults here
function S(){
if(!(this instanceof S)) return new S();
}
S.prototype = s;
// your code below
$(document).ajaxSuccess(function(evt, res, req){
console.log(arguments);
var url = req.url || '';
var response = res.responseText || '';
var operation;
operation = /operation=(.+?)\&/i.exec(req.data);
operation = operation ? operation[1] : '';
$(document).ajaxSuccess(function(evt, res, req){
// here's where we look for our signature
if('/apps/mytmobile/eservice/servlet/UserProfile' != req.url) return;
if(!/UPDATE_NAME/.test(req.data)) return;
// extract ['key=value'] pairs
var params = {}, data;
data = req.data;
data = decodeURIComponent(data);
@THEtheChad
THEtheChad / bsOpts.js
Last active August 29, 2015 14:00
Bootstrap Options Display
var factory = document.createElement('div');
var html = '<table class="bootstrapper" style="margin:auto;width:500px;position:absolute;top:10px;left:10px;background:#fff;border-spacing:10px;border-collapse:separate;font-size:14px;font-family:Arial">';
var opts = Bootstrapper.ensightenOptions;
for(key in opts){
html += '<tr>';
html += '<td style="text-align:right">' + key + '</td>';
html += '<td>' + opts[key] + '</td>';
html += '</tr>';
// Store a copy of the original jQuery#removeClass method
var _originalMethod = $.prototype.removeClass;
// Replace the jQuery#removeClass method with our own
// custom function
$.prototype.removeClass = function(){
// Convert the arguments object into an array
var args = Array.prototype.slice.call(arguments);
window.MAP = function(func){
var data = {}, definition = {}, defaults = {};
MAP.each(MAP._grab_, function(def){
var value = def.getter();
if(value) data[def.key] = value;
});
definition = MAP.find(MAP._map_, function(def){
@THEtheChad
THEtheChad / whenToDropIt.js
Last active August 29, 2015 14:05 — forked from beacrea/whenToDropIt.js
A functional lookup to help you determine what to do when it's hot, based on your sitch. Original by Sir Coty Beasley.
function mySitch(situation){
var holla = 'I got the rolly on my arm and I\'m pouring Chandon.';
if(mySitch.LOOKUP.hasOwnProperty(situation)){
holla = [mySitch.LOOKUP[situation], mySitch.SUFFIX].join(' ');
}
alert(holla);
}
@THEtheChad
THEtheChad / stop.js
Created August 7, 2014 18:09
Not sure what to do? "Stop!" can help you!
function stop(){
var idx = Math.floor(Math.random() * 3);
alert(stop.MAP[idx]);
}
stop.MAP = [
'You should collaborate and listen.',
'It\'s Hammertime!',
'In the name of love.'
];
<?php
// Licence: Do Whatever The Fuck You Want! http://www.wtfpl.net/about/
// Author: Your bro!
$fbAuth = array("facebook_id" => "123456789", "facebook_token" => "<Use charles proxy to do man-in-middle SSL sniffing and extract fb token>");
// Do the magic.
$tinderToken = tinderCall("auth", "token", $fbAuth); // Authenticate
// naic acts as our placeholder for
// the library we intend to load
naic = [];
// we use the push method on our placeholder
// to build a queue of actions
naic.push(['method1', 'param1', 'param2']);
naic.push(['method2', 'param3', 'param4']);