tecosystems

Random Bits: Podcasts, Flickr Updates and Mirroring a Site

Share via Twitter Share via Facebook Share via Linkedin Share via Reddit

First, a podcast – yes, despite my skepticism, I do listen to them πŸ™‚ – very much worth listening to. Tech Nation sat down with John Barry, author of The Great Influenza: The Epic Story of the Deadliest Plague in Human. I just finished his book a few weeks ago – during LinuxWorld, in fact – and I highly recommend it. It’s an amazing look not only at the transformative effects of an epidemic on society (an epidemic that killed perhaps upwards of 50M people, and more in weeks than AIDS has in decades), but how the practice of medicine was transformed prior to and during the epidemic itself by really just a handful of individuals. Great read, and lessons in there for everyone. In particular, some of the freedom of the press/bloggers folks might want to read it to see the shocking degree to which the US government achieved total press censorship, and the deleterious effects that that censorship had.

Second, a couple of Flickr updates: first, a few collected shots from PartnerWorld are here. Second, my pool of poweroutlet tagged shots is still growing; to date I’ve got outlets and wifi information for Cincy, La Guardia, O’Hare, Orlando, Philly, Portland (ME), San Fran, San Jose, Vegas, and White Plains. Join in if you’re interested – the pool’s open, as they say.

Last, I wanted to – for my own reference as much as anything – include the following bits of code that allow you (on Linux or some other Unix) to mirror a static site simply and easily as I had to do for a friend this weekend, and do a global search and replace for things like non-relational URIs. First, the appropriate WGET command, which I got from here:

wget -r -l1 -k -np -nH -P local_directory http://www.busysite.com/mirror_me/

The -l operator tells how many levels to crawl down. Next, the transform shell script which I got from somewhere, but now can’t find (let me know if it’s yours):

#! /bin/sh
# Source files are saved as “filename.txt.bak” in case of error
# The ‘&&’ after cp is an additional safety feature
for file in *.html
do
cp $file $file.bak &&
sed ‘s|SEARCHTERM|REPLACETERM|g’ $file.bak >$file
done

With these two items, you can pull down a static site, do a quick global replace, then mirror it elsewhere if you need to. You never know when it might come in handy.