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
[ | |
{ | |
"beat": "local", | |
"event": "weather", | |
"description": "Boston's current temperature of 51° F is higher than this day's previous record of 49° F set on January 12, 1970.", | |
"url": "http:\/\/www.wunderground.com\/weather-forecast\/US\/MA\/Boston.html", | |
"importance": 1, | |
"timestamp": "2013-01-12T18:37:06-05:00" | |
}, | |
{ |
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
{ | |
"local": { | |
"beat": "local", | |
"name": "Local", | |
"description": "Local news for Boston.", | |
"icon": "local.png", | |
"triggers": [ | |
{ | |
"name": "hotspot", | |
"description": "Local restaurants and shops receiving a sudden increase of attention.", |
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
javascript:(function(){ document.body.innerHTML = document.getElementById("readme").getElementsByTagName("article")[0].outerHTML; })(); |
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
testPolyline = new L.Polyline( | |
[[34.03900467904445,-118.55810165405272], | |
[34.13766755862196,-118.50643157958984], | |
[34.15187463170986,-118.36292266845702], | |
[34.168635904722734,-118.3292770385742], | |
[34.16196020316907,-118.25923919677734]]); | |
testPolyline.addTo(map); | |
//Left-click makes it flat |
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(){ | |
//get jQuery | |
if (window.jQuery === undefined) { | |
var done = false; | |
var script = document.createElement("script"); | |
script.src = "http:////ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"; | |
script.onload = script.onreadystatechange = function(){ | |
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { | |
done = true; |
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
-Step 1: basic HTML skeleton for a full-screen map | |
-Step 2: initialize a map | |
-Step 3: add a tile layer | |
-Step 4: Add a marker | |
-Step 5: Add a line | |
-Step 6: Add a polygon | |
-Step 7: Styling: add a polygon with different styling | |
-Step 8: Click/hover | |
-On click, re-center map | |
-On hover, change styling of polygon |
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 stitch(s1,s2) { | |
var l1 = s1.length; | |
var l2 = s2.length; | |
if (!l1) return s2; | |
if (!l2) return s1; | |
if (s2[0] == s1[l1-1]) return s1.concat(s2.slice(1)); | |
if (s1[0] == s2[l2-1]) return s2.concat(s1.slice(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
repeat | |
tell application "System Events" to start current screen saver | |
delay 60 | |
tell application "System Events" to key code 59 | |
delay 1 | |
end repeat |
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 bs4 import BeautifulSoup | |
import requests | |
url = "http://www.google.com/" | |
text = requests.get(url).text | |
page = BeautifulSoup(text) | |
for link in page.find_all("a"): |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.grid { | |
stroke-width: 0.5px; | |
stroke: steelblue; | |
fill: none; | |
opacity: 0.5; | |
} |
OlderNewer