Skip to content

{ Category Archives } programming

prototypes in javascript for image onload handlers

All this was trying to get it so all subsequent images created in a document would have a onload handler already setup (yes you guessed it I was trying to spy on a metrics library).
This works:
var t = new Image();
t.onload = function(){alert(’yes’)};
t.src=”http://www.cisco.com/web/fw/i/logo.gif”;
does not work
Image.prototype.onload = function(){alert(’yes’)};
var t = new Image();
t.src=”http://www.cisco.com/web/fw/i/logo.gif”;
this works in that you get [...]

js1k contest entry

Here’s my entry into the 1k contest:
http://js1k.com/demo/754
It made me really appreciate the other entries (most of which are much more complex than mine).
Compression-by-hand is a fine art, which I’ve probably had enough of for a while now.
Here’s the code on github:
http://github.com/facetcounter/bubble1k.js
Here’s a bookmarklet so you can destroy any page!

AtomPub

I need to see if I can start using this to standardize how some of the simpler web services structure their output.  RSS has sometimes ended up being a default way of representing a list of things because it’s well defined and makes an easy point of agreement.
AtomPub

css precompilers

These let you use parts of CSS 3 and some additional  syntactic sugar, then get processed into regular css.  I have it on my list to look at the output and see how livable it is.

sass
less

git is awesome

I’ve been tinkering with git and github.  Here’s an intro to git:
http://pivotallabs.com/talks/80-git-for-newbies
Here’s a git cheat sheet:
http://ktown.kde.org/~zrusin/git/git-cheat-sheet-large.png
Some docs:
http://git-scm.com/#documentation
And some more docs (with info on fast forwards):
http://www.kernel.org/pub/software/scm/git/docs/git-push.html
My github page:
http://github.com/facetcounter
A git book online:
http://progit.org/book/

dragdealer

drag dealer does drag and drop, iPhone compatible…
http://code.ovidiu.ch/dragdealer/

CORS

Cross origin resource sharing is a browser standard that lets you get around the script tag or iframe hacks for accessing web service content hosted on another domain.
Here’s the spec: http://www.w3.org/TR/cors/
Firefox and webkit browsers switch to CORS anytime you ask for an XHR to another domain, but the XHR interface is the same.  IE8 has [...]

processing.js

It’s the processing API ported to javascript and implemented in canvas.  Let the fun begin.
http://processingjs.org/

discovering YQL

A co-worker started using pipes, which is awfully cool, then someone else stumbled on YQL, which I think pipes is a front end for.  YQL imagines the web as a giant database, with tables defined for diffferent web services, for search results, for HTML documents… it’s crazy.

yql article at ajaxian
rss aggregating query (console / json)

select [...]

processing for javascript

balldroppings, a philip glass constructor.
processing js samples.  A lot were done as chrome experiments.