A quick javascript hack to fake adjusting HTML5 audio elements' timeupdate event frequency

I was trying to make a bunch of elements change position as an audio file played, using a snippet something like:

$(audiohtml).bind("timeupdate", onAudioUpdate);
$(audiohtml).bind("play", onAudioUpdate);
$(audiohtml).bind("pause", onAudioUpdate);

function onAudioUpdate() {
	// Move the elements here
}

But the trouble was that the audio element's timeupdate event only fires once every 200ms or so on my browser (this is set by the HTML5 audio specification and isn't modifiable as far as I know).

200ms was slow enough that the animation of the elements looked jerky (5 fps).

Instead, I used a 10Hz setInterval clock to trigger the movement functions, and used the audio's play and pause events to create and destroy the clock:

Fix the Photoshop CS4 layer-dragging crash bug in Mac OS 10.8 Mountain Lion

This has been plaguing me for a while since I updated to Mac OS 10.8. Dragging layers in the layers palette of Photoshop CS4 would cause an immediate crash to desktop. Finally found a solution in this thread which worked.

Solution: turn off the OS power-saving graphics switching.

It's the checkbox at the top of the Energy Saving preference pane:

Mac OS 10.8 Energy Saving preference pane

You'll need to ensure that it's unchecked and probably restart after that.

Now I can drag layers all day long.

Goods and services

Read this old, unsurprising report in New Scientist. From the article:

Automated trading ...has come to account for more than half of trades in many markets around the globe. ...Because of the finite speed of light, trading speed depends on where you are sitting. ..."The basic insight," says Wissner-Gross, "is that the optimal location lets the trader exploit fluctuations equally on both exchanges." ..."This shows that the technological arms race to extract every penny from high-frequency mechanical arbitrage will soon reach its ultimate limits," says physicist and hedge-fund manager Jean-Philippe Bouchaud

If this is how money and the free markets work now, I'm pretty sure we no longer know what words mean.

How to remove "+1" icons from Google search results

Having apparently abandoned former principles of simplicity and unintrusiveness, Google now punishes account holders by sticking coloured icons next to every Google search result and, worse, animating them on a mouse-over of the result.  Obnoxious!  There currently seems to be no setting to remove these that I could find, but I figured a way to use AdBlock to hide them away.  If you have AdBlock installed on your browser, simply add:

www.google.com##[class="esw eswd esws"]
www.google.com##[class="esw eswd eswh"]
www.google.com##[class="esw eswd"]

to your custom filters.  There, somewhat cleaner search results!

Edit: Now you also need to add:

www.google.com##BUTTON[class="gbil esw eswd"]
www.google.com##BUTTON[class="gbil esw eswd esws"]
www.google.com##BUTTON[class="gbil esw eswd eswh"]

Edit: OK, I found another way to fix this.

Twitter account suspended

Aw man.  I got hacked (or something) and an obviously spam message got posted in my twitter feed. Of course, I've had my account suspended, pending investigation. I should be back up within a month, according to twitter. I don't know whether the error is twitter's or mine, but needless to say every place where I used the same password as for twitter has been changed, just in case. All in all, not as painful as it might have been, I guess!