Wednesday, December 21, 2011

Resuming truncated 'cp's

I'm sure this isn't too hard to do w/ dd, but let's say you've got some slow network disk mounted under /mnt/crappy_SMB_share and were 100 gigs into a 101G file when the Windows server went down, and now you want to finish off that last gig.

  cd /mnt/crappy_SMB_share
  curl -C - -O file:///original/file/location

from here.

Tuesday, September 27, 2011

AirPlay: streaming from iTunes and your iPhone to a Linux box

So I've got a Debian machine as a WiFi access-point / file-server, and I decided to plug some speakers in and stream music from my iPhone.

I tried Erica Sadun's AirPlayer, a Python script that, as it turns out, implements version 2 of the AirPlay protocol -- the one that supports video and images.  What it DOESN'T support is sound, at least not without the appropriate crypto key.

Which led me to Shairport, vessel of the secret sound-support sauce.  Shairport only implements AirPlay v1, which can't handle images of any kind.  Which means that the video portion of YouTube can be streamed from my iPhone to AirPlayer, and the audio portion to Shairport, but I have to choose one.  Huzaah.



This worked well enough for iTunes, but iOS, ie, my iPhone, didn't work until I disabled IPv6 on my Linux box.

Friday, June 3, 2011

Yet more Crescent City


Those giant game-of-jacks pieces are called dolos.

Wednesday, May 4, 2011

Another in a series of brief tests of Wolfram Alpha

If you've spent the last couple of years behind a few inches of lead, protecting you from the nerd-radiation of the Wolfram|alpha launch,well, you should read up on it.  It claims to be, not a search engine, but something smarter, a compendium of systematic data (temperature records, physical constants, business data, you name it), and the algorithms necessary to process that info.

I've been disappointed thus far.  I tried another reasonable-seeming query today: "kinetic energy of a ring with mass 1 kg and radius 1m rotating at 100 rpm"

(If you're wondering, I was hanging out by a centrifuge, which just begged the question, ya know?)

And what did Alpha have to say? "and (English word)"

It recognized the word "and" as English. That's it.

The answer didn't show up until the 8th hit in google's results, but there it was,

   E = 0.5 * I * ω
   I = m r2

etc etc.  Granted, I still have to do the math, but at least it's something.

Friday, January 28, 2011

The lively faces of poverty

At the risk of sounding like Tom Friedman, the most striking thing about Saigon was the bustling, crowded buzz of the place -- the way every square inch of public space was somehow occupied by a person, streets completely filled with Vespas and every sidewalk a public market.

The average Vietnamese lives on about $3,100 per annum, less than half what her counterpart in China makes, so we're talking about a very poor country.  But that poverty doesn't manifest itself as obvious misery--not where we visited, at least.  Instead, you see this:
This Hanoi street is lined by key-cutting carts, as could be found on every other street corner in Saigon.  These are industrious, hard-working people, but in the US, copying keys must occupy 30 minutes out of the day of a Home Depot employee; the rest of the time, he's off stocking shelves while the machine rests in the corner.  American labor is simply too expensive to waste waiting for customers; instead, each worker has a whole stock of capital goods (the key-cutting machine, a forklift, etc) at his command, keeping him occupied each and every minute.

In Saigon, you can find any food or service you need, right there on the sidewalk, because in Saigon, you can make a living cutting keys for one blocks-worth of people.  It's actually kinda nice if you don't mind crowds ...