View youtube_channel_extractor.py
This file contains 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
#code from https://stackoverflow.com/questions/18953499/youtube-api-to-fetch-all-videos-on-a-channel | |
#1. get an API Key : https://console.developers.google.com/apis/credentials | |
#2. enable Youtube API : https://console.developers.google.com/apis/api/youtube.googleapis.com/ | |
import urllib | |
import json | |
API_KEY = 'YOUR_API_KEY_HERE' | |
CHANNEL_ID = 'YOUR_CHANNEL_ID' |
View xiti_tag_prototype.js
This file contains 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
vpTrackClick = function(tag, element) { | |
return xt_click(element,'C', xtn2, tag,'N'); | |
} | |
vpAttachClickTag = function(col, tag) { | |
col.each( function(element){ | |
$(element).observe('click', function(e) { | |
if (element.tagName=='A') { | |
e.preventDefault(); | |
return vpTrackClick(tag, element); | |
} else if (element.tagName=='INPUT' && element.type=="submit") { |
View convertGeoToPixel.php
This file contains 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 | |
function convertGeoToPixel($lat, $lon){ | |
$mapWidth = 400; | |
$mapHeight = 260; | |
$mapLonLeft = -180; | |
$mapLonRight = 180; | |
$mapLonDelta = $mapLonRight - $mapLonLeft; |
View interactionCounts.php
This file contains 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
/* | |
Example : | |
<?php $url = 'http' . ($_SERVER['HTTPS'] ? 's':'') .'://'.$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; ?> | |
<meta itemprop="interactionCount" content="UserTweets:<?php echo get_tweets($url);?>"/> | |
*/ | |
function get_tweets($url) { | |
$url = urlencode($url); |