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 | |
$yql_url = 'http://query.yahooapis.com/v1/public/yql?'; | |
$query = 'SELECT * FROM flickr.photos.search WHERE has_geo="true" AND text="san francisco"'; | |
$query_url = $yql_url . 'q=' . urlencode($query) . '&format=xml'; | |
$photos = simplexml_load_file($query_url); | |
$result = build_photos($photos->results->photo); | |
echo $result; | |
function build_photos($photos){ |
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 error_reporting(0);?> | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Craigslist Date Filter</title> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0/build/reset-fonts-grids/reset-fonts-grids.css"> | |
<style type="text/css"> | |
body,html{background:#999;color:#000;} | |
#doc{background:#fff;border:1em solid #fff;} |
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
default xml namespace = "http://where.yahooapis.com/v1/schema.rng"; | |
var res = y.query("select * from geo.places(1) where text='"+ | |
place + "'").results; | |
var lat = res.place.centroid.latitude; | |
var lon = res.place.centroid.longitude; | |
lat = Math.round(parseInt(lat)/5)*5; | |
lon = Math.round(parseInt(lon)/5)*5; | |
if(lat === +lat){ | |
var src='http://earthquake.usgs.gov/images/globes/'+ |
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
/* | |
Globebadge by Christian Heilmann | |
http://isithackday.com/hacks/geo/globes/ | |
Copyright (c)2010 Christian Heilmann | |
Code licensed under the BSD License: | |
http://wait-till-i.com/license.txt | |
*/ | |
globebadge = function(){ | |
var elm; | |
function init(o){ |
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
/* | |
World Info by Christian Heilmann | |
Homepage: http://github.com/codepo8/worldinfo | |
Copyright (c)2010 Christian Heilmann | |
Code licensed under the BSD License: | |
http://wait-till-i.com/license.txt | |
*/ | |
$(document).ready(function(){ | |
// define messages and "global variables" |
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
<script> | |
// test for localStorage support | |
if(('localStorage' in window) && window['localStorage'] !== null){ | |
var f = document.getElementById('mainform'); | |
// test with PHP if the form was sent (the submit button has the name "sent") | |
<?php if(isset($_POST['sent']))){?> | |
// get the HTML of the form and cache it in the property "state" | |
localStorage.setItem('state',f.innerHTML); |
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
(function () { | |
try { | |
if (!google.doodle) google.doodle = {}; | |
var a = 200, | |
g = -200, | |
j = -200, | |
k, l, m, n = 0, | |
o = 0, | |
p = 0, | |
q = 35, |
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
.circle{ | |
-moz-border-radius:160px; | |
-webkit-border-radius:160px; | |
-khtml-border-radius:160px; | |
border-radius:160px | |
} |
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
lanyrdbadge = function(){ | |
var l; | |
function init(){ | |
l = document.getElementById('lanyrd'); | |
if(l && l.nodeName.toLowerCase() === 'a'){ | |
l.innerHTML += ' <span>(Loading&hellip)</span>'; | |
var user = l.getAttribute('href'); | |
var url = 'http://query.yahooapis.com/v1/public/yql?'+ | |
'q=select%20*%20from%20html%20where%20url%3D%22'+ | |
encodeURIComponent(user)+ |
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
div#lanyrd{ | |
background:#eef; | |
border:1px solid #999; | |
padding:5px; | |
-moz-border-radius:5px; | |
-wekbit-border-radius:5px; | |
border-radius:5px; | |
width:20em; | |
} | |
#lanyrd a{color:#000;} |
OlderNewer