link page 13 - Dave's Blog

Search
My timeline on Mastodon

Vincent Liu: Tab Completion for Vim (Updated)

2009 May 27, 3:39A fancy tab completion script for Vim that does neat things for Java. Links to other Java+Vim tips as wel.PermalinkCommentsvim java script reference

The Grid, Our Cars and the Net: One Idea to Link Them All | Autopia | Wired.com

2009 May 13, 11:04To summarize: build the smart grid on top of the Internet, and put wireless mesh routers in power meters and cars.PermalinkCommentsdavid-weinberger network wifi mesh-networking wired article robin-chase car smart-grid

HTML 5 - Links - Link Types

2009 May 4, 12:06"The following table summarizes the link types that are defined by this specification. This table is non-normative; the actual definitions for the link types are given in the next few sections."PermalinkCommentshtml html5 w3c link reference standard url uri

Netflix CSRF - Stolen Thoughts

2009 May 3, 10:36

Looking at the HTTP traffic of Netflix under Fiddler I could see the HTTP request that added a movie to my queue and didn't see anything obvious that would prevent a CSRF. Sure enough its pretty easy to create a page that, if the user has set Netflix to auto-login, will add movies to the user's queue without their knowledge. I thought this was pretty neat, because I could finally get people to watch Primer. However, when I searched for Netflix CSRF I found that this issue has been known and reported to Netflix since 2006. Again my thoughts stolen from me and the theif doesn't even have the common decency to let me have the thought first!

With this issue known for nearly three years its hard to continue calling it an issue. Really they should just document it in their API docs and be done with it. Who knows what Netflix based web sites and services they'll break if they try to change this behavior? For instance, follow this link to add my Netflix recommended movies to your queue.

PermalinkCommentstechnical stolen-thoughts csrf netflix security

YouTube Blog - Link To The Best Parts In Your Videos

2009 Apr 23, 6:25"To create a deep link, append the following to the end of a YouTube video URL: #t=1m15s. This says to link to the time 1:15 - you can replace the numbers before the 'm' and the 's' with anything you like."PermalinkCommentsreference video blog google youtube api url fragment link

Clickable transcript of my Canonical Link Element talk

2009 Apr 23, 6:21You can link into the middle of a YouTube video using a fragment like '#t=30m14s'. Matt combines this with his transcript...: "If you run that over your entire caption file - boom - you have a clickable transcript of your video."PermalinkCommentsvideo blog hack youtube url transcript

Send URL to Cellphone - QR Encode Accelerator

2009 Apr 14, 9:26

I've made a QR Encode accelerator around Google Chart's QR code generator. QR codes are 2D bar-codes that can store (among other things) URLs and have good support on mobile phones. The accelerator I've written lets you generate a QR code for a selected link and view it in the preview window. In combination with the ZXing bar-code scanner app for my Android cellphone, its easy for me to right click on a link in IE8 on my desktop PC, hover over the QR Encode accelerator to have the link's associated QR code displayed, and then with my phone read that QR code to open my phone's browser to the URL contained inside. Its much easier to browse around in the comfort of my desktop and only send particular URLs to my cellphone as necessary.

PermalinkCommentstechnical boring accelerator android barcode ie8 google qr code

Kal Penn [spoiler redacted] for White House | TV | A.V. Club

2009 Apr 7, 5:26"According to an exclusive interview Penn gave to Entertainment Weekly's Michael Ausiello, he's been asked to serve in the Obama administration as as the associate director of the office of public liaison." Spoilers in the link.PermalinkCommentskal-penn house tv politics

rev=canonical: url shortening that doesn't hurt the internet

2009 Apr 7, 1:59A URL shortening service that tries to find the normal form (which hopefully translates to shorter in length) of a URL via PermalinkCommentsvia:connolly tinyurl canonical normalize uri url

Thoughts on registerProtocolHandler in HTML 5

2009 Apr 7, 9:02

I'm a big fan of the concept of registerProtocolHandler in HTML 5 and in FireFox 3, but not quite the implementation. From a high level, it allows web apps to register themselves as handlers of an URL scheme so for (the canonical) example, GMail can register for the mailto URL scheme. I like the concept:

However, the way its currently spec'ed out I don't like the following: PermalinkCommentsurl template registerprotocolhandler firefox technical url scheme protocol boring html5 uri urn

Charles Stross - Fiction intro

2009 Apr 6, 10:40Charles Stross personal website that links to the text of a bunch of his short stories.PermalinkCommentsblog scifi fiction literature charles-stross

RFC 5514 - IPv6 over Social Networks

2009 Apr 1, 10:42Lol at actual Facebook app that does IPv6 over Facebook. "...most network users are not aware of what IPv6 is or are even afraid by IPv6 because it is unknown. On the other hand, Social Networks (like Facebook, LinkedIn, etc.) are well-known by users and the usage of those networks is huge... With IPv6 over Social Network (IPoSN): * Every user is a router with at least one loopback interface; * Every friend or connection between users will be used as a point-to-point link... A working prototype has been developed by the author and is freely available: IPv6 over Facebook Social Network [IPv6overFacebook]."PermalinkCommentshumor social network ipv6 ip iposn facebook ietf rfc

MP3 player from Yahoo! - bookmarklet / phpied.com

2009 Mar 25, 10:09Bookmarklet to apply the Yahoo media player to any page that has mp3 links. "Take the player with you. Run my bookmarklet that will simply insert the required javascript into the page."PermalinkCommentsbookmarklet mp3 javascript music yahoo

Notes on Creating Internet Explorer Extensions in C++ and COM

2009 Mar 20, 4:51

Working on Internet Explorer extensions in C++ & COM, I had to relearn or rediscover how to do several totally basic and important things. To save myself and possibly others trouble in the future, here's some pertinent links and tips.

First you must choose your IE extensibility point. Here's a very short list of the few I've used:

Once you've created your COM object that implements IObjectWithSite and whatever other interfaces your extensibility point requires as described in the above links you'll see your SetSite method get called by IE. You might want to know how to get the top level browser object from the IUnknown site object passed in via that method.

After that you may also want to listen for some events from the browser. To do this you'll need to:

  1. Implement the dispinterface that has the event you want. For instance DWebBrowserEvents2, or HTMLDocumentEvents, or HTMLWindowEvents2. You'll have to search around in that area of the documentation to find the event you're looking for.
  2. Register for events using AtlAdvise. The object you need to subscribe to depends on the events you want. For example, DWebBrowserEvents2 come from the webbrowser object, HTMLDocumentEvents come from the document object assuming its an HTML document (I obtained via get_Document method on the webbrowser), and HTMLWindowEvents2 come from the window object (which oddly I obtained via calling the get_script method on the document object). Note that depending on when your SetSite method is called the document may not exist yet. For my extension I signed up for browser events immediately and then listened for events like NavigateComplete before signing up for document and window events.
  3. Implement IDispatch. The Invoke method will get called with event notifications from the dispinterfaces you sign up for in AtlAdvise. Implementing Invoke manually is a slight pain as all the parameters come in as VARIANTs and are in reverse order. There's some ATL macros that may make this easier but I didn't bother.
  4. Call AtlUnadvise at some point -- at the latest when SetSite is called again and your site object changes.

If you want to check if an IHTMLElement is not visible on screen due how the page is scrolled, try comparing the Body or Document Element's client height and width, which appears to be the dimensions of the visible document area, to the element's bounding client rect which appears to be its position relative to the upper left corner of the visible document area. I've found this to be working for me so far, but I'm not positive that frames, iframes, zooming, editable document areas, etc won't mess this up.

Be sure to use pointers you get from the IWebBrowser/IHTMLDocument/etc. only on the thread on which you obtained the pointer or correctly marshal the pointers to other threads to avoid weird crashes and hangs.

Obtaining the HTML document of a subframe is slightly more complicated then you might hope. On the other hand this might be resolved by the new to IE8 method IHTMLFrameElement3::get_contentDocument

Check out Eric's IE blog post on IE extensibility which has some great links on this topic as well.

PermalinkCommentstechnical boring internet explorer com c++ ihtmlelement extension

Yahoo! Media Player

2009 Mar 10, 11:26I've seen Yahoo's media player javascript widget around but until I read the dev. instructions I didn't appreciate it. You just include their js file and it finds all your links to mp3s (finer grained and more explicit control available too), adds them to its playlist, and sticks a simple play/pause button on each link.PermalinkCommentsmp3 music ajax design yahoo javascript

Some Datasets Available on the Web - Data Wrangling Blog

2009 Feb 23, 10:34Lots of neat web APIs. Added to Delicious network. "Over the past year, I've been tagging interesting data I find on the web in del.icio.us. I wrote a quick python script to pull the relevant links from my del.icio.us export and list them at the bottom of this post. Most of these datasets are related to machine learning, but there are a lot of government, finance, and search datasets as well."PermalinkCommentsapi data semanticweb information reference

Semantic Search the US Library of Congress

2009 Feb 23, 10:31"This is an experimental service that makes the Library of Congress Subject Headings available as linked-data using the SKOS vocabulary. The goal of lcsh.info is to encourage experimentation and use of LCSH on the web with the hopes of informing a similar effort at the Library of Congress to make a continually updated version available. More information about the Linked Data effort can be found on the W3C Wiki."PermalinkCommentslibrary-of-congress loc semanticweb web rdf metadata library api

Official Google Webmaster Central Blog: Specify your canonical

2009 Feb 14, 5:41"Now, you can simply add this link tag to specify your preferred version... and Google will understand that the duplicates all refer to the canonical URL: http://www.example.com/product.php?item=swedish-fish. Additional URL properties, like PageRank and related signals, are transferred as well."PermalinkCommentsvia:mattb google link html url uri canonical canonicalization web

Meteorology Law of the People's Republic of China -- china.org.cn

2009 Feb 4, 4:16From Sorting it all Out wrt the weather gadget in Vista's sidebar, this link to China's laws on weather forecast: "Article 22 The State applies a unified system for the issue of public meteorological forecast and severe weather warning... No other organizations or individuals may issue to the community such forecast or warning." "Article 25 When the media, including radio, television, newspaper and telecommunication, issue to the community public meteorological forecast or severe weather warning, they shall use the latest meteorological information provided by a meteorological office... Part of the revenues from the distribution of meteorological information shall be drawn to support the development of meteorological service." Whether an application is legally allowed to provide a weather forecast is not an attribute I would have imagined necessary for a localization API.PermalinkCommentsvia:michael-kaplan china law legal politics weather forecast localization

Paper: "moral panic" behind attempts to link games, violence

2009 Jan 22, 9:43'Behind the press reports, the academic community has been engaged in a hot debate over whether the evidence supports a connection between the violent content of games and any behavioral effects. One of the researchers who has argued forcefully that it's not is Christopher Ferguson, who has just published a paper that argues that the continued societal focus on games as a causal factor in violence is an example of what's termed a "moral panic."'PermalinkCommentsgame violence society videogames
Older EntriesNewer Entries Creative Commons License Some rights reserved.