Skip to content

Instantly share code, notes, and snippets.

View timmmmyboy's full-sized avatar

Tim Owens timmmmyboy

View GitHub Profile
@Kapeli
Kapeli / cdn.js
Created February 25, 2014 22:17
function latencyTest(url) {
$.ajax({
url: "http://"+url+".kapeli.com/feeds/latencyTest_v2.txt",
cache: false,
success: function(content){
if(beginsWith("Just a latency test. Move along.", content))
{
var link = document.getElementsByClassName("downloadButton")[0];
if(link.getAttribute("href") == "Dash.zip")
{
@pamelafox
pamelafox / showspreadsheet.php
Created January 8, 2011 05:47
PHP for parsing the JSON output a published Google spreadsheet and displaying columns from each row.
<?php
// Parsing this spreadsheet: https://spreadsheets.google.com/pub?key=0Ah0xU81penP1dFNLWk5YMW41dkcwa1JNQXk3YUJoOXc&hl=en&output=html
$url = 'http://spreadsheets.google.com/feeds/list/0Ah0xU81penP1dFNLWk5YMW41dkcwa1JNQXk3YUJoOXc/od6/public/values?alt=json';
$file= file_get_contents($url);
$json = json_decode($file);
$rows = $json->{'feed'}->{'entry'};
foreach($rows as $row) {
echo '<p>';