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
// **WARNING** | |
// in place (by reference) reordering | |
// http://stackoverflow.com/a/2450976/1037948 | |
function knuthfisheryates2(arr) { | |
var temp, j, i = arr.length; | |
while (--i) { | |
j = ~~(Math.random() * (i + 1)); | |
temp = arr[i]; | |
arr[i] = arr[j]; | |
arr[j] = temp; |
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
/** | |
* "reinitilizes" bootstrap on the jQuery | |
* object passed in | |
* | |
* @param {object} jQuery | |
* @param {string} url to retrieve the bootstrap source | |
*/ | |
function bindBootstrap($target, source){ | |
if(!source){ |
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
;(function(exports) { | |
// export the class if we are in a Node-like system. | |
if (typeof module === 'object' && module.exports === exports) | |
exports = module.exports = SemVer; | |
// The debug function is excluded entirely from the minified version. | |
// Note: this is the semver.org version of the spec that it implements | |
// Not necessarily the package version of this code. |
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
function parseQuery(q) { | |
var dec = window.decodeURIComponent; | |
var hash = {}; | |
//if `q` is `null` or `undefined`, there are no keys | |
if (q == null) { | |
return hash; | |
} |
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
[ | |
{ | |
"_id": 1234, | |
"picture": "http://www.eonline.com/resize/200/200//eol_images/Entire_Site/201095/300.superman.lc.100510.jpg", | |
"name": "Superman", | |
"secret_identity": "Clark Kent", | |
"superpower": "Being Super", | |
"likes": 4, | |
"sidekick": null | |
}, |
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
<table border="0" cellspacing="0" cellpadding="0" width="470" style="width:470px"> | |
<tbody> | |
<tr valign="top"> | |
<td style="border-right:1px solid #0072b1;padding-right:10px;width:10px"> | |
<img src="https://s3-us-west-2.amazonaws.com/thethechad.misc/thethechad/THEtheChad_Portrait_75x75.jpg" alt="What a handsome mug!" title="What a handsome mug!" style="border-radius:50%;width:74px;min-height:74px;max-width:120px" class="CToWUd"><span class="HOEnZb"><font color="#888888"> </font></span> | |
</td> | |
<td style="font:14px Arial;color:#646464;padding-left:10px"> | |
<div> | |
<b>Chad Elliott</b><br> | |
</div> |
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
/** | |
* @param {Function} fn Function to curry. | |
* @param {Number} lenght The arguments required to invoke the function. Optional. By default is fn.length | |
* @returns {Function} The currified function. | |
*/ | |
function curry(fn, length) { | |
length = length || fn.length; | |
return function currified() { | |
// Optimization friendly arguments |
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
// 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']); | |
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
<?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 |
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
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.' | |
]; |