December 31, 2008

The End of 2008

I don't know why I feel the need to recap, here, except maybe to convince myself that the year is actually ending. It's been a shitkicker, has 2008. I'll be glad to see the back of it. I don't know what to expect in 2009 - in some ways, such as economically, I can see the news getting worse for at least the first half of the year if not more. Everyday life hasn't yet really been slammed by the collapse of the financial pyramids. I'm guessing that here in NYC it's because businesses which are marginal have been desperately holding on until the end of the year to either try to survive via the holidays or to at least collect what takings they can before calling it a game.

Either way, I think a whole lot of businesses are going to close down in 1Q '09, with concomitant unemployment and gloom. Here in the City, where we all live in each other's pockets, that ripple happens fast and hard. I hope it doesn't happen, because i don't want to see anyone hurt, but realistically it's already happening. I'm concerned that NYC will fall back to early 1980s or 1970s status - high unemployment, low civic spending, crappy conditions. I think I'm the only person who watches early Sesame Street episodes and is depressed as fuck because I remember when what felt like the whole damn city looked like the grim-ass projects you always saw in those shows.

On a personal level - well, 2008 sucked too. Nothing really good happened, except that I finally moved back to NYC - but even that wasn't without all kinds of PITA side effects. Lots of bad crap happened that I'm still dealing with. I'm another year older (I really feel that on New Years' rather than my birthday, probably because it's easy to ignore my birthday) and still have no fucking idea what I want to do when I grow up - rather, I should say, that I realistically can do. I know what I'd like to do, but the government has pretty clearly told me I'm not going to get to do that. Another reason to find George Bush in a bar in ten years and kick his scrawny ass.

Well. Baconfest is coming up. Hopefully that will provide enough of a lift to get me through January and some of February. It usually does.

Posted by jbz at 4:55 PM | Comments (0) | TrackBack

December 25, 2008

Envy and Poverty

Good lord. Blade Runner looks unbelievable on a 65-inch HDTV in Blu-Ray. I predict I will be poorer next year, because I'm going to have to have one of these things (and this Blu-Ray disc set).
Posted by jbz at 10:14 PM | Comments (0) | TrackBack

December 19, 2008

Today

moresneaux.jpg

...more sneaux.

Posted by jbz at 7:48 PM | Comments (0) | TrackBack

December 17, 2008

Efficiency!

Um, yeah, so I remain unimpressed with our web filtering solution. (pops soda, kicks back with gootube)

Posted by jbz at 6:04 PM | Comments (0) | TrackBack

Misdirected Productivity

Well, my company decided to put a seriously draconian web filter/firewall in place which affects, for the first time, our internal IT and R&D networks. Everything (address/port) seems to be default blocked, with the exception of http/https to non-blacklisted IPs which requires authentication. Sigh. I suppose this means I need to devote some time tonight to breaking through it again.

Posted by jbz at 4:56 PM | Comments (0) | TrackBack

December 16, 2008

Today

sneux.jpg

...sneaux.

Posted by jbz at 9:14 PM | Comments (0) | TrackBack

December 15, 2008

Overengineering, underengineering

I was overengineering of course, as I discovered, there is an app in the Cydia iPhone installer named 'FileViewer' which...does just that. It doesn't suffer from the Safari patch's problem with the /var tree permissions, and it understands html well enough to render frames and navigate among docs in my ebook tree. Plus it reads .TXT docs as well. But, this solution is underengineered. Unfortunately, while it tries to render PDF, large docs seem to cause it to puke, and it doesn't allow bookmarking. This means I have to laboriously type in '/var/mobile/media/dir/index.html' (switching keyboards to hit the slashes) every time I boot it. Suck suck suck.

I JUST WANT THE SAFARI PATCH TO WORK (whimper)

Posted by jbz at 4:45 PM | Comments (0) | TrackBack

December 14, 2008

Caching eBooks for offline use on the iPhone

The esteemed fellow Ximianite Dave Camp pinged me to offer a solution to the problem I was kvetching about in my last writeup. He noted the following solution, which requires a web server to work - but if you're using a Mac, you can start up web sharing and hit it locally over your wifi. Anyway, in a folder on the web server, place an index file (let's say, index.html) with links to the various ebook files. These files need to be contained within the same folder (although they can be in subdirectories). At the top of the file, in the html tag, place the following:
<html manifest="books.offlineManifest">
  <!--- your page's html--->
</html>
Now create a file named (you guessed it) books.offlineManifest. Place this file in the same directory (at the same level) as index.html. Now the tricky part - modify your web server configuration so that files with the suffix ".offlineManifest" get served not as text/html but as text/cache-manifest. If you're using apache, the command you need to put into the configuration file looks like this:

AddType text/cache-manifest .offlineManifest

Restart the server if necessary to reload the config.

Now, inside the books.offlineManifest file, place the following:

CACHE MANIFEST
CACHE:
index.html
book-title-1.html
book-title-2.html
book-title-3.html
...

Note that the book-title-1.html and the like are, of course, the location of the files that are pointed to by links on your index.html page. These files can be in subdirectories, but be careful - the cache manifest should not contain lines describing the subdirectories, just the files. So for example, do not do the following>

CACHE MANIFEST
CACHE:
index.html
books/
books/book-1.html
books/book-2.html
...the 'books/' line will cause the caching process to puke and stop. I mention this because, of course, I did it, being lazy and using 'find .' to get my tree info. DON'T BE ME.

All right, once you've got all these files saved to your webserver, use your iPhone and navigate to the index page. Once you've loaded it, click the '+' in Safari and seelct 'Add to Home Screen.' This will create an applet on the iPhone which loads that index. Quit Safari and then click that applet. It will reload Safari and bring up your index page. It will also start traversing the file list in books.offlineManifest and caching them onto your iPhone! Once it has done that, you'll be able to navigate to them using Safari even if the iPhone is not on the network, because Safari will realize it has them cached.

The down sides:

Well, yeah, there are some. For one, it means stuffing an awful lot of things into your cache. I don't know how that will affect usability. This feature is a) intended for smallish javascript files and the like, not megabyte+ book files, so YMMV. Also, as far as I know, it's an undocumented feature in Safari, so expect that Apple can change how it works or the fact that it's there at any time.

The most annoying thing, for me, is that it picks some strange order of files in my (really long, because I use exploded-by-chapter HTML books) file list. And, it never seems to finish loading my manifest - usually, the phone sleeps, or something silly, or it just stalls - and when it restarts (because I re-navigate to the page) it... starts loading them all over again. It might be most effective to have a manifest and applet per book or per author rather than having everything stuffed into one file. I found that when I limited the manifest to around twenty files, they all loaded fine. There is, however, no real way of telling what's loaded and how far it's gotten, because it's supposed to be invisible to the user (I figured it out by tailing the logs on my webserver while it was caching).

So there you have it. Thanks Dave Camp! Until the Safari file:// patch works on the 2.2 firmware, this is what I'm going to have to do.

Posted by jbz at 12:58 AM | Comments (0) | TrackBack

December 12, 2008

iPhone and eBooks, again

I recently upgraded JohnnyJohnny (my iPhone. If you don't know the reference, tough) to the 2.2 firmware. I hadn't jailbroken him since before the 2.0 release, and I was getting really, really sick of not having my eBooks locally stored, so I downloaded QuickPwn and went to work.

QuickPwn did exactly what it advertised, and I soon had a jailbroken-but-still-perfectly-functional iPhone. The only problem, I realized, was that the 2.2 firmware upgrade had brought a new bugbear - that of the Disappearing Wi-Fi. I found that I couldn't get the phone to stay on my wifi network, despite the fact that it hadn't been changed since I had been on 2.1. I tried everything - forgetting the network, bouncing into Airplane Mode, etc. - and no matter what, the damn thing would join my wifi net for maybe 30 seconds and then drop off. Bam. Even when I was sitting 7 feet from the antenna with nothing intervening.

I nuked the phone and reloaded a fresh 2.2 firmware, no jailbreak.

Nope. Problem still there. Damn it.

So I re-jailbroke it. No change, but at least I could try to work on my primary issue. I have maybe 500MB of eBooks, and in the 1.x days I had them all available on the phone itself thanks to two things - SSH/SCP, and the Safari file:// patch. Using those two tools, I could finally read my books on the subway. So using Cydia, I installed OpenSSH, MobileTerminal, and the Safari file:// patch.

(groan)

Apparently MobileTerminal just...doesn't work. It runs fine, and give me a completely black screen, no matter what I do. It's like it just isn't running a shell. Don't know why. I could SSH into the phone with no trouble, though, so I did that and then SCP-ed my eBook directory into /var/mobile/Media/.

Nope. No worky. See, the new Safari file:// patch has a problem - No matter what you do, if you try to access a file that's in the /private/var tree (which is aliased to /var) you get a 'permission denied' error trying to look at the file. If you move the file into the / tree, it works fine - but / has only around 50 MB of space available and that's where the OS lives, so bad idea.

So I'm still screwed. I can't get MobileTerminal to work, and I can't get file:// to work in Safari properly. I know some people will just dismiss this with 'get a real eBook reader!' but phooey on them - I have books in .txt, .html and .pdf format. Some are in html directories (my favorite format, thanks Baen/Webscriptions!) so they need to be linked. I haven't found a product for the iPhone which will let me read all of these - except Safari, when the damn file:// space works.

So for the moment, I can still now only read books if I have network connectivity. Which is just completely @#&()(@# stupid.

Posted by jbz at 12:39 PM | Comments (2) | TrackBack

December 8, 2008

Thank you Internet Archive!

One of my favorite pieces of Russian writing (well, writing about Russia, at least), which I had thought lost forever in the crumbling bits of the very early world wide web, has come back to me via the Wayback machine. I cannot recommend strongly enough that everyone read this, especially the chapter entitled "A short guide to the St Petersburg hangover.'

Posted by jbz at 9:47 PM | Comments (0) | TrackBack