/*! | |
* toggleAttr() jQuery plugin | |
* @link https://gist.github.com/aboutaaron/6916c539db4ee9f66d51 | |
* @description .toggleClass() but for attrs. Useful for toggling classes with SVGs or anything that's not a class | |
* @author Aaron Williams <http://aboutaaron.com/> | |
* @thanks: Mathias Bynens <http://mathiasbynens.be/> for original | |
*/ | |
jQuery.fn.toggleAttr = function(attr, value) { | |
return this.each(function() { | |
var $this = $(this); |
# When to scrape | |
## What is web scraping | |
The process of harvesting or collecting information from a web page | |
Automating server request | |
Can be done by writing a script (code) or with paid software tools, e.g., Helium Scraper | |
Can even be done simply by using Excel and wget |
# New frontiers in javascript: the browser at the bleeding edge | |
## Possible futures | |
1. new libs (new jQuery) | |
2. ECMAscript 6 | |
3. Make your own (sweet.js) | |
4. web assembly (coffeescript) | |
## 1. New Libs | |
- React.js: shadow DOM (diffing shadow DOM to DOM) | |
- calculate differences in DOM nodes |
ssh: connect to host ec2-54-190-57-155.us-west-2.compute.amazonaws.com port 22: Connection timed out | |
Fatal error: local() encountered an error (return code 255) while executing 'ssh ubuntu@ec2-54-190-57-155.us-west-2.compute.amazonaws.com -i /home/aaron/.ec2/calaccess.pem' | |
Aborting. | |
local() encountered an error (return code 255) while executing 'ssh ubuntu@ec2-54-190-57-155.us-west-2.compute.amazonaws.com -i /home/aaron/.ec2/calaccess.pem' |
Ingleside Light, Summer 2010
Cayuga Park has seen better days.
The famous park has a fence and chains around its play areas and the clubhouse closed two years ago due to plumbing issues. However, plans to rebuild Cayuga Park are in the final stag- es as community members and city departments figure out to maintain and enhance the garden-like vibe of the park.
The joint venture between the city’s Parks and Recreation Department, The Cayuga Improvement Association and the San Francisco Arts Commission needs final approval from the Art Commission, which is scheduled to happen in September. Prospective park builders will then be sought for afterward. Funding for the park came from the 2008 voter-approved $185 million Neighborhood Parks bond that gave money to parks in dire need of repair. Funding also came from BART to replace the playground area that will be removed while they rebuild the track support columns.
tooltip: { | |
useHTML: true, | |
formatter: function() { | |
// This is using the Highcharts tooltip API plus the JS ternary operator to conditionally add tooltips to the accumulated gross | |
// http://stackoverflow.com/a/7344366/868724 | |
return this.x + "<br>" + this.series.name + ': <strong>$' + Highcharts.numberFormat(this.y) + '</strong>' + ( typeof this.point.weeks !== "undefined" ? "<br>Weeks in box office: " + this.point.weeks : "" ) | |
}, |
<script type="text/javascript"> | |
$(function () { | |
// Creating styles here to keep boilerplate down | |
var chartStyles = { | |
fontSize: '14px', | |
fontWeight: 'normal', | |
color: '#231F20', | |
fontFamily: "Georgia, 'Times New Roman', Times, serif", | |
textTransform: 'uppercase' |
<script src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
function onYouTubePlayerReady(playerId) { | |
ytplayer = document.getElementById("myytplayer"); | |
setInterval(updateytplayerInfo, 250); | |
updateytplayerInfo(); | |
ytplayer.addEventListener("onStateChange", "onytplayerStateChange"); | |
ytplayer.addEventListener("onError", "onPlayerError"); | |
} | |