Skip to content

Instantly share code, notes, and snippets.

@troy
troy / Battery at Denny, northbound
Created March 22, 2015 18:12
Towards a graph of Seattle Metro delay by stop and route -- on-time ratings for routes
13944 seconds ago: #16 (NORTHGATE WALLINGFORD) arrived -3454 seconds off.
16632 seconds ago: #5 (SHORELINE GREENWOOD) arrived 54 seconds off.
16005 seconds ago: #E Line (AURORA VILLAGE TRANSIT CENTER) arrived -102 seconds off.
15804 seconds ago: #16 (NORTHGATE WALLINGFORD) arrived 652 seconds off.
14205 seconds ago: #E Line (AURORA VILLAGE TRANSIT CENTER) arrived 76 seconds off.
13032 seconds ago: #5 (SHORELINE GREENWOOD) arrived 135 seconds off.
12705 seconds ago: #E Line (AURORA VILLAGE TRANSIT CENTER) arrived 114 seconds off.
12144 seconds ago: #16 (NORTHGATE WALLINGFORD) arrived 540 seconds off.
11232 seconds ago: #5 (SHORELINE GREENWOOD) arrived -27 seconds off.
10313 seconds ago: #16 (NORTHGATE WALLINGFORD) arrived 322 seconds off.
@troy
troy / search-on-spotify.js
Created November 29, 2015 02:02
Bookmarklet to search/play highlighted artist on Spotify Web Player
javascript:window.location.href="https://play.spotify.com/search/"+encodeURIComponent(window.getSelection())
@troy
troy / bookmarklet.js
Last active May 8, 2018 16:38
Seattle Public Library (SPL.org) search bookmarklet
javascript:(function(){window.open('https://www.spl.org/search?terms='+window.getSelection());})();
@troy
troy / 1_view_in_google_maps_bookmarklet.js
Last active December 11, 2020 14:04
Browser bookmarklet to view a highlighted venue name, highlighted street address, or the place about the current URL in Google Maps (where you can click Save to save it to a list)
javascript:( function() {q = window.getSelection().toString(); if (q.length == 0) {q = window.location.hostname.replace(/^www./,''); if (['instagram.com', 'facebook.com'].includes(q)) {q = window.location.hostname + '/' + window.location.pathname.split('/')[1] } else if (['yelp.com'].includes(q)) { q = document.title.split(' - ')[0] } } window.open('http://maps.google.com?q='+q.trim().replace(/\r\n|\r|\n/g,", ")); }) ();