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
var one_block = 0.0012; | |
var bbox = (lon - one_block) + "," + (lat - one_block) + "," + (lon + one_block) + "," + (lat + one_block) |
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 isPointInPoly(poly, pt) { | |
for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) | |
((poly[i][1] <= pt.y && pt.y < poly[j][1]) || (poly[j][1] <= pt.y && pt.y < poly[i][1])) && (pt.x < (poly[j][0] - poly[i][0]) * (pt.y - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0]) && (c = !c); | |
return c; | |
} | |
isPointInPoly([[1, 1], [5, 1], [5, 5], [1, 5]], {x: 2, y: 2}); //true | |
isPointInPoly([[1, 1], [5, 1], [5, 5], [1, 5]], {x: 100, y: 100}); //false |
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
# TalkMiner.com scraper! | |
# | |
# Instructions for overriding max results per page on talkminer: | |
# 1. Go to TalkMiner.com search results page | |
# 2. Enter into Firebug: setCookie('resultspp', 99999); | |
# 3. Refresh page or alter your search filters | |
# 4. You should now be receiving unlimited results per page | |
# 5. Save HTML of results page to your computron | |
# 6. Run the following ruby script against that file |
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
FROM /COUCHAPPSPORA/_DESIGN/COUCHAPPSPORA: | |
"rewrites":[{"to":"_show/challenge","from":"xml","method":"GET"},{"to":"_update/test","from":"xml","method":"POST"},{"from":"./well-known/host-meta","to":"_show/webfinger"}] | |
FROM _CONFIG: | |
"vhosts":{"myawesomewebsite.com":"/couchappspora/_design/couchappspora/_rewrite"} | |
REQUEST LOG FOR localhost:5984 AS 'Host':"myawesomewebsite.com": | |
[debug] [<0.2278.0>] Vhost Target: '"/couchappspora/_design/couchappspora/_rewrite/"' | |
[debug] [<0.2155.0>] 'GET' /couchappspora/_design/couchappspora/_rewrite/ {1,1} |
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(head, req){ | |
return { | |
\"headers\" : {\"Content-Type\" : \"application/xml\"}, | |
\"body\" : \"<?xml version='1.0' encoding='UTF-8'?> | |
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' | |
xmlns:hm='http://host-meta.net/xrd/1.0'> | |
<hm:Host xmlns='http://host-meta.net/xrd/1.0'>example.com</hm:Host> | |
<Link rel='lrdd' | |
template='http://example.com/webfinger/?q={uri}'> | |
<Title>Resource Descriptor</Title> |
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
{"error":"compilation_error","reason":"Expression does not eval to a function. ((new String(\"function(head, req){ \\n return {\\n \\\"headers\\\" : {\\\"Content-Type\\\" : \\\"application/xml\\\"},\\n \\\"body\\\" : \\\"<?xml version='1.0' encoding='UTF-8'?>\\n <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' \\n xmlns:hm='http://host-meta.net/xrd/1.0'>\\n <hm:Host xmlns='http://host-meta.net/xrd/1.0'>example.com</hm:Host>\\n <Link rel='lrdd' \\n template='http://example.com/webfinger/?q={uri}'>\\n <Title>Resource Descriptor</Title>\\n </Link>\\n </XRD>\\\"\\n }\\n}\")))"} |
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
[Sun, 03 Oct 2010 18:05:53 GMT] [debug] [<0.6109.823>] Exit from linked pid: {<0.6112.823>, | |
{timeout, | |
{gen_server,call, | |
[couch_query_servers, | |
{get_proc,<<"javascript">>}]}}} | |
[Sun, 03 Oct 2010 18:05:53 GMT] [error] [<0.6109.823>] ** Generic server <0.6109.823> terminating | |
** Last message in was {'EXIT',<0.6112.823>, | |
{timeout, | |
{gen_server,call, | |
[couch_query_servers, |
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
<informationResponse><messageHeader><sender><agencyIdentifier>us.or..dot</agencyIdentifier><agencyName>ODOT</agencyName></sender><messageID>3025121414</messageID><responseTo>3025121414</responseTo><timeStamp><date>20101015</date><time>12141400</time></timeStamp></messageHeader><responseGroups><responseGroup><head><updateTime><date>20101015</date><time>121414</time></updateTime></head></responseGroup><responseGroup><events><event><head><id>33312</id><updateTime><date>20101015</date><time>115043</time></updateTime></head><location><locationName>1E - PACIFIC HIGHWAY EAST</locationName><linkLocation><linearReferenceLink><refOrImplicitType><link><linkName>ORE99E</linkName><linkId><idAlpha>81</idAlpha></linkId></link></refOrImplicitType><offset1><miDec>.89</miDec></offset1><offset2><miDec>1.69</miDec></offset2><travelDirection>south</travelDirection></linearReferenceLink><geoLocationLink><startPoint><latitude>455098</latitude><longitude>-122661843</longitude></startPoint><endPoint><latitude>45498765</latitude><long |
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
<informationResponse><messageHeader><sender><agencyIdentifier>us.or..dot</agencyIdentifier><agencyName>ODOT</agencyName></sender><messageID>3025121614</messageID><responseTo>3025121614</responseTo><timeStamp><date>20101015</date><time>12161400</time></timeStamp></messageHeader><responseGroups><responseGroup><head><updateTime><date>20101015</date><time>121614</time></updateTime></head></responseGroup><responseGroup><events><event><head> | |
<id>33312</id><updateTime><date>20101015</date><time>115043</time></updateTime></head><location><locationName>1E - PACIFIC HIGHWAY EAST</locationName><linkLocation><linearReferenceLink><refOrImplicitType><link><linkName>ORE99E</linkName><linkId><idAlpha>81</idAlpha></linkId></link></refOrImplicitType><offset1><miDec>.89</miDec></offset1><offset2><miDec>1.69</miDec></offset2><travelDirection>south</travelDirection></linearReferenceLink><geoLocationLink><startPoint><latitude>455098</latitude><longitude>-122661843</longitude></startPoint><endPoint><latitude>45498765</latitude><lon |
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
{"items": [ | |
{ | |
"verb": "post", // Id which maps to specification submitted to activity streams registrar | |
"postedTime": "2010-12-12T12:12:12Z", | |
"title": "Plain Text", | |
"summary": "Plain Text", // Have not decided on plain text only | |
"permalinkUrl": "...", | |
"to": [{"id" : "acct:[email protected]"}], // We should use person constructs here | |
"cc": [{"id":"acct:[email protected]"}], | |
"bcc": [{"id":"acct:[email protected]"}], |