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 | |
// http://gearside.com/calendars/sick.php | |
$debug = 0; //Enable forced debug mode here | |
if ( $debug == 0 && !array_key_exists('debug', $_GET) ) { | |
header('Content-type: text/calendar; charset=utf-8'); | |
header('Content-Disposition: attachment; filename=sickness_probability.ics'); | |
} |
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 the full URL. Not intended for secure use ($_SERVER var can be manipulated by client/server). | |
function gearside_requested_url($host="HTTP_HOST") { //Can use "SERVER_NAME" as an alternative to "HTTP_HOST". | |
$protocol = ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443 ) ? 'https' : 'http'; | |
$full_url = $protocol . '://' . $_SERVER["$host"] . $_SERVER["REQUEST_URI"]; | |
return $full_url; | |
} | |
//Separate a URL into it's components. | |
//See http://gearside.com/php-function-easily-return-url-components/ for documentation |
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
//Parse the GA Cookie | |
function gaParseCookie() { | |
if (isset($_COOKIE['_ga'])) { | |
list($version, $domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4); | |
$contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1 . '.' . $cid2); | |
$cid = $contents['cid']; | |
} else { | |
$cid = gaGenerateUUID(); | |
} | |
return $cid; |
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
//This can go in main.js or where ever. | |
jQuery.getJSON('/includes/twitter_cache.php', function(data) { //If using Nebula, the path will be: nebula.site.directory.stylesheet.uri + '/includes/twitter_cache.php' | |
jQuery.each(data, function(i) { | |
console.log(data[i]); | |
}); | |
//Example full implementation: | |
jQuery('#tweetlink').attr('href', 'https://twitter.com/' + data[0].user.screen_name).text('@' + data[0].user.screen_name); | |
var tweetTime = new Date(Date.parse(data[0].created_at)); | |
jQuery('#tweet').html(tweetLinks(data[0].text)).append(" <span class='twitter-posted-on'><i class='fa fa-clock-o'></i> " + timeAgo(tweetTime) + "</span>"); |
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
<style> | |
/* Responsive Ooyala Player */ | |
.ooyalacon {position: relative; width: 100%; padding: 56.25% 0 0 0;} /* 56.25% = 16:9 ratio */ | |
.ooyalacon .innerWrapper {position: absolute !important; top: 0; left: 0; width: 100%; height: 100%;} | |
.ooyalacon .video {position: absolute; top: 0; padding-bottom: 0 !important; height: 100% !important;} | |
</style> | |
<script src='http://player.ooyala.com/v3/MzZiMzc1ZDUzZGVlYmMxNzA3Y2MzNjBk'></script> <!-- Branding ID here --> | |
<script> |
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
SetEnvIfNoCase Referer semalt.com spambot=yes | |
SetEnvIfNoCase Referer econom.com spambot=yes | |
SetEnvIfNoCase Referer buttons-for-website.com spambot=yes | |
SetEnvIfNoCase Referer ilovevitaly.com spambot=yes | |
SetEnvIfNoCase Referer ilovevitaly.ru spambot=yes | |
SetEnvIfNoCase Referer darodar.com spambot=yes | |
SetEnvIfNoCase Referer 7makemoneyonline.com spambot=yes | |
SetEnvIfNoCase Referer myftpupload.com spambot=yes | |
SetEnvIfNoCase Referer priceg.com spambot=yes | |
Order allow,deny |
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
<style> | |
.hidden {display: none;} /* Just for reference. This should be in your stylesheet! */ | |
</style> | |
<div class="extra_resources"> | |
<!-- [AD_CODE_HERE] --> | |
</div> | |
<a class="blockdetection hidden" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VALMBPW4PWH8S" target="_blank"><img src="donate_image.png" alt="Donate via Paypal" /></a> |
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
add_shortcode('yolo', 'gearside_yolo_shortcode'); | |
function gearside_yolo_shortcode(){ | |
//Code will go here... | |
} |
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 gaParseCookie() { | |
if (isset($_COOKIE['_ga'])) { | |
list($version,$domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4); | |
$contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1 . '.' . $cid2); | |
$cid = $contents['cid']; | |
} else { | |
$cid = gaGenerateUUID(); | |
} | |
return $cid; | |
} |
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
<noscript> | |
<iframe class="hidden" src="includes/no-js.php?h=HOME_URL&p=PAGE_URI&t=PAGE_TITLE" width="0" height="0" style="display:none;position:absolute;"></iframe> | |
</noscript> | |
<!-- Notes: Use server-side scripting to fill in the HOME_URL, CURRENT_PAGE_URI, and PAGE_TITLE. Be sure to encode the page title to avoid spaces! If you are using Wordpress, you can use the following snippet: --> | |
<noscript> | |
<iframe class="hidden" src="<?php echo get_template_directory_uri(); ?>/includes/no-js.php?h=<?php echo home_url('/'); ?>&p=<?php echo get_page_uri(); ?>&t=<?php urlencode(get_the_title()); ?>" width="0" height="0" style="display:none;position:absolute;"></iframe> | |
</noscript> |