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
/* | |
|-------------------------------------------------------------------------- | |
| Get parameters from the URI hash | |
|-------------------------------------------------------------------------- | |
*/ | |
function getParamsFromHash() { | |
var rawHash = window.location.hash.substr(1); | |
var hashParts = rawHash.split(';'); | |
var paramData = {}; | |
hashParts.forEach(function(part) { |
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
var delay = (function(){ | |
var timer = 0; | |
return function(callback, ms) { clearTimeout (timer); timer = setTimeout(callback, ms); }; | |
})(); |
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 | |
system("clear"); | |
$data = file_get_contents("http://www.comichron.com/monthlycomicssales/2014/2014-04.html"); | |
$dom = new domDocument; | |
@$dom->loadHTML($data); | |
$dom->preserveWhiteSpace = false; | |
$tables = $dom->getElementsByTagName("table"); | |
// Find the largest table to isolate the table we want to work with |
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 | |
// (string) $message - message to be passed to Slack | |
// (string) $room - room in which to write the message, too | |
// (string) $icon - You can set up custom emoji icons to use with each message | |
public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
$room = ($room) ? $room : "engineering"; | |
$data = "payload=" . json_encode(array( | |
"channel" => "#{$room}", | |
"text" => $message, |
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 | |
system('clear'); | |
// $string = "Iron Man Vol. 5 #23.NOW"; | |
// $string = "Ms. Marvel (2014-) (Vol. 13) #2.NOW"; | |
// $string = "Uncanny X-Men Vol. 3 #19.NOW"; | |
$string = "Winter Soldier: The Bitter March #2 (of 5)"; | |
echo $string . "\n"; | |
// Parse out the ttle for the key |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>{Title}</title> | |
{block:Description} | |
<meta name="description" content="{MetaDescription}"> | |
{/block:Description} | |
</head> | |
<body> | |
<h1 class="title">{Title}</h1> |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Connect to Dropbox | |
|-------------------------------------------------------------------------- | |
*/ | |
Route::get('connect/dropbox', array('before' => 'auth', function() { | |
$app_info = Dropbox\AppInfo::loadFromJson(Config::get('dropbox.credentials')); | |
$webAuth = new Dropbox\WebAuthNoRedirect($app_info, "PHP-Example/1.0"); |