Vimeo download escalation

Vimeo has recently deployed countermeasures that makes it harder to download videos, unless the uploader has marked them as downloadable.

This affects both my youtubedown script, and Miro. Since Miro is what I use to subscribe to most of the blogs through which I discover new music videos, this negatively impacts my mixtapes, which is how it impacts you.

So help me reverse-engineer their new countermeasures, ok? If we fix this bug, my mixtapes get better.

Here's an example:

As of their new site roll-out a month or two ago, the new way to download that video would be to load "" with the header "X-Requested-With: XMLHttpRequest", but with private videos, that's a 404. However, if you request that style URL on a downloadable video (here's one) then you get HTML with links to MP4 files.

On a private video, when you hit "Play" in either the Flash player or the HTML5 player, it loads "" which returns the full MP4. Those URLs go 403 after some small number of minutes, and it loads a URL with different hex each time you hit play (though the decimal numbers stay the same), so presumably the ctime is a part of the hash.

The fact that this works in the HTML5 player means that they are computing those URLs from Javascript somehow, rather than with a secret key that is baked into their Flash player, so that's promising. But I don't have a lot of experience reverse-engineering gigantic Javascript apps.

Since it will be the first thing you find when googling, let me point out that the old moogaloop URLs like "" are 404. You used to be able to use those to get a signature, then construct a download URL like: "", but no more.


Tags: , , , , ,

DNA Lounge: Wherein there are some construction photos.

Here's something we will probably never see again: the interior of DNA Lounge lit by sunlight! It's from the hole in the roof where the dormer above the new stairs connecting the second floors will go.

Some more shots of the roof work:

This will soon be a roof.

This used to be a roof.

You may have noticed in one of my earlier photos that the roof-cutting revealed some text painted on the South wall of the pizza place, which hasn't been exposed to view since before DNA Lounge was built... It's very dirty in there and hard to read even with a flashlight, but the letters I was able to make out were S_RIES. I'm guessing "ACCESSORIES". But to what? To WHAT??

Let's take a tour of the rest of the roof!

The back room, exterior view.

Bathroom vents.

This is the fan for the hood above the pizza ovens.

Hey, remember the kiosks? They're still up there, rotting.

And back inside:

The floors are being tiled in the new bathrooms.

Meanwhile, bad news in the women's room.

So here's something you don't ever want someone to say to you: "So, when you flush this toilet a bunch of times, water comes out... between the floor tiles... six feet away."

Because when they say that, it results in the above photo of someone jackhammering up your floor.


Oh, also, a couple of the other toilets are leaking. You know, the indestructible stainless steel ones that cost like $2K each, because they last "forever" (not to mention "suicide proof", "no crevices for hiding of contraband", and "foolproof and incapable of error". The theory is that they have developed pinhole leaks in the bowls. Because apparently you don't want to put anything caustic like urine in a toilet. Ok, they're 12 years old now, but still. My idea is, "turn them over, open them up, and coat the underside of the bowl with an inch of epoxy", but our plumber doesn't think that will work.

In addition to being a construction site, we are also a dance club. There are some recent photos of that, too:

Hey, don't forget to vote for us in Best of the Bay! There's only a week left.


Early morning frost on the Planes of Eternal Torment.

I think I just saw Parking Enforcement hassle a FedEx truck for blocking the bike lane.
Tags: , ,

metrics and malloc

Dear Lazyweb, how do I get real font metrics on iOS?

On OSX, the only way I've found to do it is:

  1. Make an NSTextStorage and NSLayoutManager;
  2. Get an NSGlyph from that;
  3. [NSBezierPath appendBezierPathWithGlyph];
  4. currentPoint to find the width;
  5. bounds to find the bounding box.

(You'd think you could get the NSGlyph with [NSFont glyphWithName], but that expects full Unicrud names like "LATIN CAPITAL LETTER A WITH ACUTE" and there is no way to get one of those from a single-character NSString, so I don't understand why that API even exists.)

Naturally, none of these APIs exist on iOS.

  1. [NSString sizeWithFont] gives us width and ascent, but nothing about the bounding box or bearings.
  2. [NSString drawAtPoint] to an offscreen CGContext returns the width of the character and the overall ascent of the font;
  3. CGFontGetGlyphBBoxes() might help (or it might just return the ascent/width again instead of the bounding box, I don't know) but there seems to again be no way to map a single-character NSString to a CGGlyph.

So I'm stuck with assuming that all characters have a 0 lbearing and rbearing, and things get clipped. See query_font() in xscreensaver/OSX/jwxyz.m.


Does the malloc on iOS contain any tricks for allocating out of a private heap? What the LISPMs called *default-cons-area* and PostScript called save/restore. E.g., it would be convenient to do something like this in my code:

#define malloc(x) malloc_in_heap (my_heap, x)

And then at the end, flush that heap in one swell foop, that is, I want to be able to say, "I swear that nothing references any pointer that has been allocated out of this area any more, regardless of whether all corresponding free calls have been made; unmap it all right now."

I know about NSAutoreleasePool, but that doesn't help with malloc, only NSObject.

Tags: , , ,

Robot Hand beats you at Rock-Paper-Scissors every time.

"And that's how we can go from a chess computer to the apocalypse in just four years."

Previously, previously, previously, previously, previously.

Tags: , , ,

  • Previously