Install compiler dependencies
brew install automake autoconf libtool libxml2 pkg-config
brew link libxml2
Build libspatialite
Common minimal format for sending just lat/long data | |
[ | |
{ | |
uuid: "550e8400-e29b-41d4-a716-446655440000", | |
date: "2010-04-30T16:50:00Z", | |
location: { | |
position: { | |
latitude: 45.5118, | |
longitude: -122.6433 | |
} |
[aaron@parecki.com www]$ cat .htaccess | |
RewriteEngine on | |
RewriteCond %{QUERY_STRING} resource=acct:(.+) | |
RewriteRule ^\.well-known/webfinger /profile/%1? [L] | |
[aaron@parecki.com www]$ cat profile/aaron@parecki.com | |
{ | |
"subject": "acct:aaron@parecki.com", | |
"links": [ | |
{ |
{ | |
"layer":{ | |
"bounds":{ | |
"center":{ | |
"latitude":45.521740823313, | |
"longitude":-122.68043538074 | |
}, | |
"map":"http://map.geoloqi.com/45.521752557438,-122.68041864527?radius=546.45073462403", | |
"ne":{ | |
"latitude":45.524569933375, |
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Headers: Authorization'); | |
if(isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/plain') !== false) { | |
$format = 'text'; | |
} else { | |
header('Content-Type: application/json'); | |
$format = 'json'; | |
} |
Swap out the two URLs (first is source, second is target) then run with curl:
curl -X POST -d @pingback.xml http://example.com/xmlrpc
<?php | |
function aqiFromPM($pm) { | |
if($pm >= 350.5) | |
return scale($pm, 500, 401, 500, 350.5); | |
if($pm >= 250.5) | |
return scale($pm, 400, 301, 350.4, 250.5); | |
if($pm >= 150.5) | |
return scale($pm, 300, 201, 250.4, 150.5); | |
if($pm >= 55.5) |
moved to | |
https://github.com/aaronpk/youtube-chat-overlay |
<?php | |
if(!isset($_GET['url'])) { | |
?> | |
<form action="" method="get"> | |
<input type="url" name="url"> | |
<input type="submit" value="Go"> | |
</form> | |
<? | |
die(); | |
} |
<span id="webmention-count"></span> | |
<script type="text/javascript"> | |
function loadWebmentions(data){ | |
document.getElementById("webmention-count").innerHTML = data.count + " mentions"; | |
} | |
</script> | |
<script type="text/javascript" src="http://webmention.io/api/count?jsonp=loadWebmentions&target=http://example.com/page/100"></script> |