<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8441087078477003568</id><updated>2011-12-21T02:57:25.363-08:00</updated><category term='linux'/><category term='undelete'/><category term='data recovery'/><category term='Copyright'/><category term='By-voice'/><category term='Cybercrime'/><category term='speech synthesis'/><category term='Hacks'/><category term='Cory Doctorow'/><category term='Webcams'/><category term='ssh'/><category term='webbrowsers'/><category term='open source'/><category term='http'/><category term='Tips and tricks'/><category term='networking'/><category term='google chrome'/><category term='Decline of linux'/><category term='firefox'/><category term='Computer Security'/><category term='Colum&apos;s Projects'/><category term='geeky'/><category term='unix'/><category term='coding'/><category term='internet'/><category term='DRM'/><category term='vim'/><category term='Movgrab'/><category term='bloat'/><category term='lusers'/><category term='Online Services'/><title type='text'>I'd Rather Hack</title><subtitle type='html'>Being the technical blog of Colum Paget, rather than his 'ranting into the void' one.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-8825410742142189844</id><published>2011-12-21T02:53:00.001-08:00</published><updated>2011-12-21T02:57:25.384-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Movgrab'/><title type='text'>Movgrab Popularity at 400</title><content type='html'>Movgrab's &lt;a href='http://freecode.com/projects/movgrab'&gt;freshmeat&lt;/a&gt; (they're changing their name to 'freecode' but you'd know them as freshmeat if you know them at all) popularity rating has passed the '400' mark. I would like to say that it's smashed through this barrier, but as it's just managed to struggle to 400.13, and will probably drop back below 400 soon, well, I can't really say that. &lt;br /&gt; &lt;br /&gt;I've no idea what this number really means, but I think 400 means 'quite popular'. Movgrab is now included in a few linux distributions, like Puppy linux, Arch linux and maybe Debian (someone did contact me asking me to make a change to allow it to be included in the debian build process). &lt;br /&gt; &lt;br /&gt;One person has even written a nice-looking frontend to movgrab, I think this frontend comes as part of puppy linux. &lt;br /&gt; &lt;br /&gt;&lt;img src='http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&amp;amp;id=49832'/&gt; &lt;br /&gt; &lt;br /&gt;You wouldn't think it from the feedback I've had though, despite setting up an email account for people to contact me with bug reports etc, very, very few people have done so. If you're one of those who did (you know who you are) then thanks very much, some of the bug reports I got were things that I'd never have known about it people hadn't taken the time to report them. &lt;br /&gt; &lt;br /&gt;Now it's time to get some other projects finished and uploaded!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-8825410742142189844?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/8825410742142189844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/12/movgrab-popularity-at-400.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/8825410742142189844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/8825410742142189844'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/12/movgrab-popularity-at-400.html' title='Movgrab Popularity at 400'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-948327911691365459</id><published>2011-11-10T09:43:00.001-08:00</published><updated>2011-11-10T09:43:25.931-08:00</updated><title type='text'>Using unix consolefonts in your programs</title><content type='html'>If you're running linux or another unix-style system, then you probably have a little-known directory in '/usr/share/consolefonts'. &lt;br/&gt; &lt;br/&gt;This contains 'font files' that can be used with the 'setfont' command to change the default font at the linux console (not on xterm or rxvt or anything like that, at the actual 'text mode' console). If you're looking for how to do that, it's as simple as: &lt;br/&gt; &lt;br/&gt;	setfont drdos8x16 &lt;br/&gt;	setfont cybercafe &lt;br/&gt; &lt;br/&gt;where the 'name' of the font is it's filename without path or extensions (setfont knows to look in /usr/share/consolefonts). &lt;br/&gt; &lt;br/&gt;This post is about how to decode these font-files for use in your own graphics programs. &lt;br/&gt; &lt;br/&gt;These fonts have a very simple format, being little more than a collection of bitmaps (not .bmp format, but actual bitmaps, i.e. collections of bytes where every bit is a monocrhome 'pixel' that's on or off). If you're messing about with low-level graphics, they are an easy way of doing text. &lt;br/&gt; &lt;br/&gt;There's 3 types of font in the console font directory. &lt;br/&gt; &lt;br/&gt;&lt;b&gt;1: Raw Fonts&lt;/b&gt; &lt;br/&gt; &lt;br/&gt;These usually have the file extension '.fnt' (or .fnt.gz if gzipped). They contain an array of 8x16 bitmaps, or 'glyphs' of the characters in the font. The bitmaps are arranged so that they map to the ascii character set, so to find the bitmap for ascii character 'A' which has an ascii value of 65, you would just get the 65th bitmap in the array. As each character is 8x16, and so 16 lines of 8 bits, or 16 bytes, so you just calculate the position in the bitmap array as '&amp;lt;ascii value&amp;gt; * 16'. &lt;br/&gt; &lt;br/&gt;Thus, the first byte of the file is the first 'line' of 8 pixels in the first character. For each bit that is set in those eight bytes, you should set or 'color' a pixel in an image, and leave blank those pixels that match to unset bits in the byte. The second byte is the second line of the character, and so on. &lt;br/&gt; &lt;br/&gt;&lt;b&gt;2: PSF Fonts&lt;/b&gt; &lt;br/&gt; &lt;br/&gt;These are very similar to 'Raw' fonts, except they have a header. This header starts: &lt;br/&gt; &lt;br/&gt;	Byte 0:   0x36 &lt;br/&gt;  Byte 1:		0x04 &lt;br/&gt;	Byte 2:		'Mode' (256 characters or 512 characters) &lt;br/&gt;	Byte 3:		Character Height &lt;br/&gt; &lt;br/&gt;The first two bytes are just for identifiying the file type, and the 'Mode' byte says how many characters are stored in the font-file. If the first bit of this byte is set, then there are 512 characters, otherwise it's 256. The final header byte is the character height, allowing you to have glyphs that are 8x8, or 8x12 or 8x128, or whatever. Notice though, that for basic PSF fonts, the width of the character is still always 8 bits, or one byte. &lt;br/&gt; &lt;br/&gt;After this 4-byte header the font is just the same as 'raw' fonts, except you have to consider that each glyph is as many bytes long as the 'Character Height' setting says. &lt;br/&gt; &lt;br/&gt;&lt;b&gt;3: PSF2 Fonts&lt;/b&gt; &lt;br/&gt; &lt;br/&gt;The most advanced type of console font, it seems, are an extended version of 'PSF' fonts, called 'PSF2' fonts. These have an enhanced header: &lt;br/&gt; &lt;br/&gt;	Byte0:		0x72 &lt;br/&gt;  Byte1:		0xb5 &lt;br/&gt;	Byte2:		0x4a &lt;br/&gt;	Byte3:		0x86 &lt;br/&gt;	unsigned int version; &lt;br/&gt;	unsigned int headersize;    /* offset of bitmaps in file */ &lt;br/&gt;	unsigned int flags; &lt;br/&gt;	unsigned int length;        /* number of glyphs */ &lt;br/&gt;	unsigned int charsize;      /* number of bytes for each character */ &lt;br/&gt;	unsigned int charheight; &lt;br/&gt;	unsigned int charwidth; &lt;br/&gt; &lt;br/&gt;After the first 4 identifying bytes all the information is unsigned 4-byte integers. Everything does pretty much what it says. As now both the character width and character height can change, so you can no-longer calculate glyph positions in the file with 'lines * NoOfLines', but you can use the helpful 'charsize' value. Thus the glyph bitmap for a given character is found at 'headersize + &amp;lt;ascii value&amp;gt; * charsize'. 'length' tells you how many characters are in the file, and 'charwidth' now means you have to consider that each line of a character might use less than one byte, or stray across two or more bytes. However, the bitmap data is padded to a byte boundary, so if a font has a width of '12', or 'a byte and a half' it will still use 2 bytes for every line in every character. &lt;br/&gt; &lt;br/&gt;Some of the default fonts distributed with the linux 'kbd' package (arm8.fnt, cybercafe.fnt) look surprisingly good when used on charts and the like, and they're about the easiest font-type to use in your own programs without turning to libraries like 'Freetype'. &lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-948327911691365459?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/948327911691365459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/11/using-unix-consolefonts-in-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/948327911691365459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/948327911691365459'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/11/using-unix-consolefonts-in-your.html' title='Using unix consolefonts in your programs'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-2921436606928417986</id><published>2011-11-09T03:26:00.001-08:00</published><updated>2011-11-09T03:26:51.078-08:00</updated><title type='text'>Howto use Picasa API with Blogger API</title><content type='html'>&lt;img src='http://lh5.ggpht.com/-VfOztfKNAxI/TrpjeNfuFfI/AAAAAAAAARk/LejZoKvcAaA/picasa.jpg'/&gt; &lt;br/&gt;&lt;img src='http://lh3.ggpht.com/-LAud3JGXkew/TrpjepJ2ZkI/AAAAAAAAARo/Z19imud1A5U/blogger.jpg'/&gt; &lt;br/&gt; &lt;br/&gt;When you use the blogger api, the pages you get back contain a type of tag called 'gd:extendedProperty'. These contain some useful data. &lt;br/&gt; &lt;br/&gt;Just do an http get to:   &amp;lt;blogurl&amp;gt;/feeds/posts/default &lt;br/&gt; &lt;br/&gt;So, for this blog you are reading:  http://idratherhack.blogspot.com/feeds/posts/default &lt;br/&gt; &lt;br/&gt;This will return a big mess o' xml, including the tags: &lt;br/&gt; &lt;br/&gt;&amp;lt;gd:extendedProperty name='IS_PUBLIC_BLOG' value='true'/&amp;gt; &lt;br/&gt;&amp;lt;gd:extendedProperty name='PICASAWEB_ALBUM_ID' value='5570923802870618657'/&amp;gt; &lt;br/&gt; &lt;br/&gt;It turns out that one of these (PICASAWEB_ALBUM_ID) is a link to the Picasa album that is used by your blog. &lt;br/&gt; &lt;br/&gt;You can use this link to upload pictures using the picasa api documented here &lt;a href='http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html'&gt;http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html&lt;/a&gt;. &lt;br/&gt; &lt;br/&gt;When you do the upload you'll get back another mess-o-html which will include a tag called 'content'. This should give you the 'web visible' link for the image, which you can now use in posts to your blog. &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-2921436606928417986?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/2921436606928417986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/11/howto-use-picasa-api-with-blogger-api_09.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/2921436606928417986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/2921436606928417986'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/11/howto-use-picasa-api-with-blogger-api_09.html' title='Howto use Picasa API with Blogger API'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/-VfOztfKNAxI/TrpjeNfuFfI/AAAAAAAAARk/LejZoKvcAaA/s72-c/picasa.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-7402343875376238553</id><published>2011-10-18T02:35:00.001-07:00</published><updated>2011-10-18T02:35:56.789-07:00</updated><title type='text'>Can you do Rocket Science?</title><content type='html'>&lt;img height='' width='200' src='http://www.mutationpress.com/web_intro_html_44c21662.png'/&gt; &lt;br/&gt; &lt;br/&gt;I'm cross-posting this to my 'technical' blog, because I think that it might attract a few people who write non-fiction, and that while most of those will be a 'computery' people, a few might be rocket scientists. &lt;br/&gt; &lt;br/&gt;Can you write non-fiction on technical space-related matters, or on aspects of 'Hard SF'? Would you like to be published in an upcoming anthology? &lt;br/&gt; &lt;br/&gt;Ian Sales' &lt;a href='http://rocketsciencenews.wordpress.com'&gt;Rocket Science&lt;/a&gt; anthology coming out from &lt;a href='http://www.mutationpress.com'&gt;Mutation Press&lt;/a&gt; (that's the award-winning Mutation Press) hasn't had enough non-fiction submissions, he says he's "Desperate" for them. &lt;br/&gt; &lt;br/&gt;He's also had nothing like as many submissions from women as he'd like, either of fiction or non-fiction. &lt;br/&gt; &lt;br/&gt;'Call for Submissions' is &lt;a href='http://www.mutationpress.com/rocketscience.html'&gt;here&lt;/a&gt; &lt;br/&gt; &lt;br/&gt;Know something about rockets/space/hard sf? Want to tell the world about it? This is your chance. &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-7402343875376238553?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/7402343875376238553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/10/can-you-do-rocket-science.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7402343875376238553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7402343875376238553'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/10/can-you-do-rocket-science.html' title='Can you do Rocket Science?'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-915232034012692357</id><published>2011-10-07T01:50:00.001-07:00</published><updated>2011-10-07T01:50:39.402-07:00</updated><title type='text'>New release of my 'getlock' program</title><content type='html'>A new version of my 'getlock' locking program is out. I use this to ensure that scripts and programs running out of 'cron' don't start running multiple copies that 'fight' each other. getlock creates a lock file and locks it with fcntrl locking, and then runs the program or script, keeping the file locked for the whole time that program runs. The advantage of this scheme over other locking programs is that if the 'getlock' process is killed or otherwise stops the lock is released automatically. &lt;br/&gt; &lt;br/&gt;'getlock' has all sorts of 'timeout' features regarding how long it waits for a lock, and whether it 'steals' a lock from a program that's currently holding it, etc, etc. &lt;br/&gt; &lt;br/&gt;The new version has the added feature of an 'abandon timeout', this is a timeout that applies to the running program. If the program has 'frozen' for some reason, then the 'abandon timeout' can be used so that getlock can detect the program is taking too long, and kill it off and exit. I use this, for instance, in situations where a script or program connects to hosts or websites that might become unresponsive, leaving the program waiting for network data that will never come. This can result in a 'hung' program that's holding the lock file and preventing another instance of the process (which will reconnect and start from scratch, and may thus succeed) from starting up. &lt;br/&gt; &lt;br/&gt;Get it here: &lt;br/&gt; &lt;br/&gt;&lt;a href='http://sites.google.com/site/columscode/files/getlock-0.2.tar.gz?attredirects=0'&gt;http://sites.google.com/site/columscode/files/getlock-0.2.tar.gz?attredirects=0&lt;/a&gt; &lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-915232034012692357?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/915232034012692357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/10/new-release-of-my-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/915232034012692357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/915232034012692357'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/10/new-release-of-my-program.html' title='New release of my &amp;#39;getlock&amp;#39; program'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-1506603030111784976</id><published>2011-09-05T01:38:00.001-07:00</published><updated>2011-09-05T01:38:24.523-07:00</updated><title type='text'>Disable Screen Blanking in Linux: How hard can it be?</title><content type='html'>How hard can it be? Well, prepare to be amazed, I've spend days trying to figure out how to turn off screen blanking under linux, and the internet is full of people bewailing the same issue. &lt;br/&gt; &lt;br/&gt;I'm working on a job that has a 'management' screen that's permanently displaying information to any passing users. Unfortunately screen blanking keeps kicking in, and as the screen isn't supposed to have a keyboard or mouse, this is proving to be a problem. &lt;br/&gt; &lt;br/&gt;The main cause of difficulty is that there are several different systems that can blank the screen. Firstly, there's the linux console, this is the 'text mode' system that's operational even when you're not running a graphical display (you probably knew that). &lt;br/&gt; &lt;br/&gt;Once upon a time, this would have been sufficient to turn off screen blanking at the console: &lt;br/&gt; &lt;br/&gt;setterm -blank 0 &lt;br/&gt; &lt;br/&gt;However, modern monitors can powerdown (which old-skool CRT's generally didn't, as in those days fossil fuel resources grew on trees. But then we cut all the trees down). Powering down is different to blanking the screen, it's actually turning the screen off, so you also need to do &lt;br/&gt; &lt;br/&gt;setterm -powerdown 0 &lt;br/&gt; &lt;br/&gt;But there is also 'powersave'. I don't know how this differs from powerdown, but you should also do &lt;br/&gt; &lt;br/&gt;setterm -powersave 0 &lt;br/&gt; &lt;br/&gt;So that's three commands needed for you to be sure that you've switched off screen blanking/turning off in the console alone, before we've even started X. &lt;br/&gt; &lt;br/&gt;Incidentally, the 'setterm' command has many interesting features, including the ability to change the color of the screen text and background, take a textmode 'screen dump', turn on blink, underline, reverse, bold, linewrap, the cursor, etc, etc. This means it can be used in shell scripts to output text in different colors or bold or blink. &lt;br/&gt; &lt;br/&gt;Now, we start the dreaded 'X', and enter his (yes, 'X' is definitely male) dark cabinet of madness. &lt;br/&gt; &lt;br/&gt;X has its own screensaver, that defaults to blanking the screen if no screensaver is set up. You can check the status of this by running the command: &lt;br/&gt; &lt;br/&gt;xset -q &lt;br/&gt; &lt;br/&gt;This will print out the status of the various things that 'xset' can mess with. One of them will be: &lt;br/&gt; &lt;br/&gt;Screen Saver: &lt;br/&gt;  prefer blanking:  yes    allow exposures:  yes &lt;br/&gt;  timeout:  1200    cycle:  600 &lt;br/&gt; &lt;br/&gt;If timeout is non-zero, then the screen saver will kick in after that many seconds. Turn it off with: &lt;br/&gt; &lt;br/&gt;xset s off &lt;br/&gt; &lt;br/&gt;But this still isn't the end of it. There's one more thing that can powerdown/blank your screen. It's called 'DPMS', and I think it relates to the monitor's own ability to power itself down independent of the computer using it. If 'xset -q' shows: &lt;br/&gt; &lt;br/&gt;DPMS (Energy Star): &lt;br/&gt;  Standby: 1200    Suspend: 1800    Off: 2400 &lt;br/&gt;  DPMS is Enabled &lt;br/&gt; &lt;br/&gt;Then again, the monitor is going to go into low-power modes (including 'Off') after the time has elapsed. This final hurdle can be overcome with: &lt;br/&gt; &lt;br/&gt;xset -dpms &lt;br/&gt; &lt;br/&gt;And now, with luck, you should find that your screen doesn't blank. Maybe. &lt;br/&gt; &lt;br/&gt; &lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-1506603030111784976?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/1506603030111784976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/09/disable-screen-blanking-in-linux-how.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1506603030111784976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1506603030111784976'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/09/disable-screen-blanking-in-linux-how.html' title='Disable Screen Blanking in Linux: How hard can it be?'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-793706524451017463</id><published>2011-07-02T07:17:00.001-07:00</published><updated>2011-07-02T07:17:29.841-07:00</updated><title type='text'>Stuff that Works Under Linux: Wifi</title><content type='html'>&lt;img src='http://www.machackpc.com/wp-content/uploads/2009/11/NoWiFi.jpg'/&gt;&lt;br/&gt;&lt;br/&gt;Finding hardware that works with linux can &lt;font color='red'&gt;STILL&lt;/font&gt; be a frustrating experience even after all these years. Manufacturers persist on focusing on 'Windows and mac'. This makes some sense nowadays when apple has come back from the brink and everyone has an macbook (or whatever they call them now) but it was really weird ten years ago. Ten years ago &lt;b&gt;NO ONE&lt;/b&gt; owned apple products, as evidenced by the way that a mac in a public place would gather a crowd of wary onlookers, rather like the crowd that might surround a crashed alien starship once they'd got over the initial panic and the joy of looting had begun to pale.&lt;br/&gt;&lt;br/&gt;I used to complain 'More people use linux than macs, so why do manufacturers keep supporting this dying platform, and ignoring linux?'&lt;br/&gt;&lt;br/&gt;To which people would say: "Oh no, lots of people use macs"&lt;br/&gt;&lt;br/&gt;To which I would respond, "Oh yeah? Anyone you know?"&lt;br/&gt;&lt;br/&gt;People: "Well yes, sure."&lt;br/&gt;&lt;br/&gt;Me: "Who?"&lt;br/&gt;&lt;br/&gt;People: "Oh lots of people we know use macs. Lots."&lt;br/&gt;&lt;br/&gt;Me: "Name one."&lt;br/&gt;&lt;br/&gt;People: "Uh, well, there's... um... Jim?"&lt;br/&gt;&lt;br/&gt;Me: "Jim? That's funny, you've never spoken of him before, he mustn't get out much. Does graphic design, does he?"&lt;br/&gt;&lt;br/&gt;People: "Well yes, that's why he needs a mac. Uh-huh. Yes. Honest."&lt;br/&gt;&lt;br/&gt;These mysterious 'Jims' and 'Sams' and 'Sues' always did graphic design, leading me to claim that it was the same guy, who just got around a lot (and sometimes wore a skirt).&lt;br/&gt;&lt;br/&gt;Apple has always enjoyed some weird must-support-the-underdog loyalty from the public, evidenced by the fact that, in the days when the company was hanging by its fingernails over the abyss of chapter-11 bankruptcy &lt;font color='magenta'&gt;BECAUSE IT WASN'T SELLING ANYTHING&lt;/font&gt;, and Michael Dell was saying they should just kill it, asset-strip the corpse, and give the money to the shareholders, people were prepared to lie and invent pretend friends in order to claim they knew someone who used macs. No-one used macs. Most people had never even seen one.&lt;br/&gt;&lt;br/&gt;But times have changed and now the mac has become so ubiquitous that I recently went to a Linux User Group, and everyone had macs (Huh? Isn't that like going to a church service and finding everyone is wearing t-shirts that say "&lt;font color='red'&gt;SATAN IS LORD!!&lt;/font&gt;"?). But still, I continue to wonder why linux is so badly supported.&lt;br/&gt;&lt;br/&gt;Part of the problem, I think, is corporate attitudes to open-sourcing their driver code/protocols. Now, I've always thought this was odd. Back in the day I remember that large numbers of network cards didn't work under linux, because vendors wouldn't make information available about how to talk to the card. This stuff was all classified 'company secrets'.&lt;br/&gt;&lt;br/&gt;Which leads one to wonder what the heck was in those cards? If the cards allowed you to signal to arbitrary points in space-time, or had a secret setting that caused them to print money (erudite readers will realise these two features amount to the same thing) then I could understand this, but they didn't, they just sent messages at the industry-standard speed down a wire. This means that the big secret that couldn't be revealed must have consisted of an interface of the form:&lt;br/&gt;&lt;br/&gt;&lt;code&gt;&lt;br/&gt;int SendPacket(char *Destination, char *Data, int Length);&lt;br/&gt;int RecvPacket(char *Source, char *Data, int Length);&lt;br/&gt;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Sorry, but that's not world-changing technology that anyone's going to steal! WE ALREADY HAVE THAT!&lt;br/&gt;&lt;br/&gt;My suspicion was always that what they were hiding was BAD DESIGN. Coding practices and protocol design so horrifically deranged that they could have a walk-on part in an &lt;a href='http://en.wikipedia.org/wiki/H.P. Lovecraft'&gt;H.P. Lovecraft&lt;/a&gt; story.&lt;br/&gt;&lt;br/&gt;Hmm, I'm rambling rather badly here, let's pull things back to the point. The new equivalent of those network cards (whose vendors all went out of business, I think. Or rather, I hope) are Wifi cards. There's loads of them, and only a few of them seem to work with linux.&lt;br/&gt;&lt;br/&gt;Indeed so bad is the support for wifi cards in linux that someone's come up with something called &lt;a href='http://en.wikipedia.org/wiki/ndiswrapper'&gt;ndiswrapper&lt;/a&gt; that lets you use windows wifi drivers under linux. I tried this, but the very first sign that we weren't going to get on, was that it required me to install &lt;a href='http://en.wikipedia.org/wiki/perl'&gt;perl&lt;/a&gt;. I don't want to install perl just to use a piece of hardware/&lt;font color='red'&gt;COMPILE A KERNEL&lt;/font&gt;/send an email/etc/etc/etc any more than I want to install Python to be able to compile X, gnome or KDE to &lt;a href='http://rbelmont.mameworld.info'&gt;play old arcade games&lt;/a&gt; or browse the web, or install windows to be able to use my computer. But this is another rant. Anyways, this time I gave in, and installed the huge, bloated, misshapen camel-monster that is perl onto my (previously) small and slick system. After doing that, and installing ndiswrapper and going through the time-consuming business of extracting the windows drivers and installing them, everything functioned as expected.&lt;br/&gt;&lt;br/&gt;Meaning it &lt;font color='red'&gt;DIDN'T F****ING WORK!&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;So I ripped all that stuff back off my system (though I'm sure there's a few camel-colored tentacles left twitching around in there somewhere) and went out and bought some hardware that's supported by the vanilla linux kernel.&lt;br/&gt;&lt;br/&gt;Anyways, below is a list of some wifi stuff that I found works under linux without horrible camel-powered bodges. Many of these devices will be old technology, because I'm the kind of person who likes to find use for the things that the &lt;strike&gt;surplus sheeple&lt;/strike&gt; everyday folks cast aside.&lt;br/&gt;&lt;br/&gt;&lt;img src='http://www.bbc.co.uk/bradford/content/images/2006/07/20/a_womble_465x370.jpg'/&gt;&lt;br/&gt;&lt;br/&gt;One interesting note: If found that stuff that works under linux, also works under windows, and b(stuff that doesn't work under linux, won't work under windows next year). I have a lot of old technology come my way, and when I find a card or dongle that doesn't work under linux, I try to give it to one of the windows-using relatives who come to me asking if I've got a wifi thing they can use. They come back to me telling me that they couldn't get it to work, and promptly steal one of my linux-compatible devices, and later report delightedly that it 'just worked'. This confirms something I've long said, b(if it doesn't work under stock linux, it's junk). It might work under windows right now, but in a year the company will have folded, you won't be able to get drivers any more, or there'll be a new version of windows under which it doesn't work. Buying cheap tech often means buying cheap tech five times over, where paying double means you get something that lasts five times as long. Do the math.&lt;br/&gt;&lt;br/&gt;Right, onto the devices.&lt;br/&gt;&lt;br/&gt;&lt;img src='http://www.aria.co.uk/static/images/products/NET-SC-SWMULZ54.jpg'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;SAFECOM SWMULZ-5400&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;These are great, they're the little wifi-dongle that could. Provided you have Zydas zd-1211b chipset support compiled into your kernel, they just work. This model supports 54g wifi speeds, supports 'ad-hoc' mode as well as the usual 'managed' mode, and seems to have moderately good range. Just about any wifi dongle with the same zd-1211b chipset should work under linux without needing ndiswrapper or any special treatment. Here is a &lt;a href='http://zydas.rapla.net/'&gt;page listing devices that have this chipset&lt;/a&gt;. So good are these, that I carry one in about in a pocket, because you never know when someone's going to say "hey, my wifi's stopped working", or something like that.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;img height='300' width='300' src='http://i00.i.aliimg.com/photo/v3/308509660/WiFiSKY_10G_High_Power_USB_Wireless_Adapter.jpg'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;WIFI-SKY IDU-2850UG-10G&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;If you've got reception issues, this is the beast for you. It uses the adopts Realtek RTL8187+RTL8225-VF chipset, but unfortunately the in-kernel linux driver doesn't seem to support ad-hoc mode, nor does it support the 'high transmit power' feature of the device. However you can stick and stonking great aerial on the thing (it comes with a good one), and this improves communications considerably. It also looks cool. Supports speeds up to 56g.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;img src='http://ecx.images-amazon.com/images/I/31qFfrdsNuL._SL500_AA300_.jpg'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;TP-LINK TL-WN610G&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;If you're using PCMCIA, I've found this is a nice, basic card. My one of these seems to have started playing up recently, but that's only after many years of daily service, so I'd still recommend the card. It supports speeds of up to 108 Meg 'super-g', but I think this requires a special access point, so realistically it's 54g like everything else.&lt;br/&gt;&lt;br/&gt;&lt;img src='http://ecx.images-amazon.com/images/I/414MNVMDJQL._SL500_AA300_.jpg'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;NETGEAR MA401&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Okay, this is an old, old, old card, it's going to be hard to find these days. But it just works. It only does 11b speeds. But it works. And it keeps working. Mine's been dropped, sat on, stepped on and is now held together with large blobs of superglue, but it works. Old tech tends to work, and keep working, whereas newer stuff is cost-engineered to extract the maximum money from your pocket while providing the most substandard parts possible, and designed to mortally fail a week after you warranty runs out. Buy the old stuff, it can take a kicking and keep on ticking.&lt;br/&gt;&lt;br/&gt;Don't, however, assume that this one good card means that netgear products generally work with linux. My experience is that they're very hit-and-miss.&lt;br/&gt;&lt;br/&gt;&lt;img src='http://www.shinyhardware.co.uk/includes/showimage.asp?path=747/WP-RT2561T.gif&amp;amp;width=300'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;PLUSCOM WP-RT2561T&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;It does seem that if you see 'Ralink chipset' on a product, you're in with a good chance of having it work under linux. This pluscom card uses the Ralink 'RT2561' chipset.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Okay, that's the &lt;font color='green'&gt;good&lt;/font&gt;, now for the &lt;font color='red'&gt;bad&lt;/font&gt; and the &lt;font color='purple'&gt;ugly&lt;/font&gt;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;img src='http://www.belkin.com/images/product/F5D7050_v2/STD1_F5D7050_v2.jpg'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Belkin products&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color='magenta'&gt;YOU PAYS YOUR MONEY; YOU TAKES YOUR CHANCE&lt;/font&gt; I have a number of Belkin F5D7050uk USB dongles, and they work very well under linux. But this is another of those devices where you have to be very sure you've got the right version of the device. My units are 'Version 3' (I think), and use the Ralink chipset, so they work under linux. However, other versions use a zydas, intersil or realtek chipset. These all look the same, and unless you're buying from ebay with a vendor who states the chipset, you're taking a gamble as to which version you get. I think all these versions have chipsets that should work under linux, but I don't know it for sure, so I can't really recommend them.&lt;br/&gt;&lt;br/&gt;I've gotten other belkin hardware, like PCI wifi cards, to work under linux, but I've often found it's a real battle. I'd put belkin stuff under the 'ugly' category.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Linksys products:&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color='red'&gt;AVOID&lt;/font&gt; My experience is that they flat-out don't work under vanilla linux kernels.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;D-Link "Air Plus G" and other products using the Texas Instruments 'Acx100' chipset&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color='red'&gt;AVOID&lt;/font&gt; I used a D-Link DWL-640G+ for some years, but the driver never got into the mainline kernel, and further development appears to have now been abandoned. The drivers probably won't even work with recent kernels, so these cards are scrap.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;And that's all I've got.&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-793706524451017463?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/793706524451017463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/07/stuff-that-works-under-linux-wifi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/793706524451017463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/793706524451017463'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/07/stuff-that-works-under-linux-wifi.html' title='Stuff that Works Under Linux: Wifi'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-5474637671113382499</id><published>2011-06-22T00:47:00.001-07:00</published><updated>2011-06-22T00:47:08.337-07:00</updated><title type='text'>Movgrab Status</title><content type='html'>Current status output of movgrab ('movgrab -test-sites'). This shows which downloader sites are broken, and which I can't figure out, or which seem to have shut down. Long-term broken sites will eventually get removed from the list.&lt;br/&gt;&lt;br/&gt;Checking youtube               okay&lt;br/&gt;Checking metacafe              BROKEN&lt;br/&gt;Checking dailymotion           okay&lt;br/&gt;Checking break                 okay&lt;br/&gt;Checking ehow                  okay&lt;br/&gt;Checking vimeo                 BROKEN&lt;br/&gt;Checking almostkilled          okay&lt;br/&gt;Checking 5min                  okay&lt;br/&gt;Checking vbox7                 BROKEN&lt;br/&gt;Checking blip.tv               okay&lt;br/&gt;Checking ted                   okay&lt;br/&gt;Checking myvideo               okay&lt;br/&gt;Checking clipshack             okay&lt;br/&gt;Checking mytopclip             okay&lt;br/&gt;Checking redbalcony            okay&lt;br/&gt;Checking mobango               okay&lt;br/&gt;Checking berkeley              okay&lt;br/&gt;Checking yale                  okay&lt;br/&gt;Checking sdnhm                 okay&lt;br/&gt;Checking uchannel              BROKEN&lt;br/&gt;Checking princeton             okay&lt;br/&gt;Checking uctv.tv               okay&lt;br/&gt;Checking reuters               okay&lt;br/&gt;Checking clipfish.de           okay&lt;br/&gt;Checking liveleak              okay&lt;br/&gt;Checking academicearth         okay&lt;br/&gt;Checking photobucket           okay&lt;br/&gt;Checking videoemo              okay&lt;br/&gt;Checking videosfacebook        okay&lt;br/&gt;Checking aljazeera             okay&lt;br/&gt;Checking mefeedia              okay&lt;br/&gt;Checking myvido1               okay&lt;br/&gt;Checking iviewtube             okay&lt;br/&gt;Checking washingtonpost        okay&lt;br/&gt;Checking cbsnews               okay&lt;br/&gt;Checking france24              okay&lt;br/&gt;Checking euronews              okay&lt;br/&gt;Checking metatube              okay&lt;br/&gt;Checking motionfeeds           okay&lt;br/&gt;Checking izlese                BROKEN&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-5474637671113382499?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/5474637671113382499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/06/movgrab-status.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5474637671113382499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5474637671113382499'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/06/movgrab-status.html' title='Movgrab Status'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-4283731121012569504</id><published>2011-06-21T22:25:00.001-07:00</published><updated>2011-06-21T22:25:08.380-07:00</updated><title type='text'>Movgrab at 300 popularity level on freshmeat</title><content type='html'>Hurrah!!&lt;br/&gt;&lt;br/&gt;My video-downloader program &lt;a href='http://freshmeat.net/search?q=movgrab&amp;amp;submit=Search'&gt;'movgrab'&lt;/a&gt; passes the meaningless but psychologically important level of 300 in its popularity score on freshmeat.&lt;br/&gt;&lt;br/&gt;That makes it nearly as popular as &lt;a href='http://freshmeat.net/projects/bitcoin'&gt;Bitcoin&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;It's the most popular I've ever been!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-4283731121012569504?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/4283731121012569504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/06/movgrab-at-300-popularity-level-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/4283731121012569504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/4283731121012569504'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/06/movgrab-at-300-popularity-level-on.html' title='Movgrab at 300 popularity level on freshmeat'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-3063035950500911045</id><published>2011-06-19T16:51:00.001-07:00</published><updated>2011-06-19T16:51:50.509-07:00</updated><title type='text'>Three URL Shorteners that don't need authentication, XML or JSON</title><content type='html'>Here's three URL shorteners that will allow you to get a shortened link without needing authentication, and with very simple APIs. These are useful if you're writing blogging or microblogging (twitter-style) applications.&lt;br/&gt;&lt;br/&gt;All three take a simple HTTP GET request. As you have to include the URL you want shortened in the request, you have to HTTP encode it (you know, all that %20 stuff). All of them return one line of text, which is the shortened version of the URL.&lt;br/&gt;&lt;br/&gt;You should be able to test them by simply using a webbrowser and going to the link. Don't forget to replace the line phrase &amp;lt;url goes here&amp;gt; with an http-encoded url.&lt;br/&gt;&lt;br/&gt;Cli.gs  http://cli.gs/api/v1/cligs/create?appid=autoblog-0.1&amp;amp;url=&amp;lt;url goes here&amp;gt;&lt;br/&gt;&lt;br/&gt;Linkee  http://api.linkee.com/1.0/shorten?format=text&amp;amp;input=&amp;lt;url goes here&amp;gt;&lt;br/&gt;&lt;br/&gt;Is.gd   http://is.gd/create.php?format=simple&amp;amp;url=&amp;lt;url goes here&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-3063035950500911045?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/3063035950500911045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/06/three-url-shorteners-that-don-need.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3063035950500911045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3063035950500911045'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/06/three-url-shorteners-that-don-need.html' title='Three URL Shorteners that don&amp;#39;t need authentication, XML or JSON'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-5258688840379800474</id><published>2011-06-18T08:11:00.001-07:00</published><updated>2011-06-18T08:16:47.167-07:00</updated><title type='text'>Howto Change Blogger Settings with the GData API</title><content type='html'>I've just discovered an undocumented (or I couldn't find any docs for it anyways) way to change the settings of your Blogger/Blogspot blog via the GoogleData API.&lt;br /&gt;&lt;br /&gt;I discovered this as a result of the recent 'breakage' of my API client. I was using a blog-posting 'endpoint' URL that wasn't supposed to work, but had been working until recenty. &lt;a name='more'&gt;&lt;/a&gt; That was a url of the form:&lt;br /&gt;&lt;br /&gt;http://idratherhack.blogspot.com/feeds/posts/default&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But apparently I should have been looking up a special url of the form:&lt;br /&gt;&lt;br /&gt;http://www.blogger.com/feeds/8441087078477003568/posts/default&lt;br /&gt;&lt;br /&gt;Where the long number is a unique ID for my blog.&lt;br /&gt;&lt;br /&gt;To get this special url, you have to first authenticate, and then do a GET to:&lt;br /&gt;&lt;br /&gt;http://www.blogger.com/feeds/default/blogs&lt;br /&gt;&lt;br /&gt;This will return a big ol' mess o' XML:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?&amp;gt;&amp;lt;feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&amp;amp;quot;A04NRno-fip7ImA9WhZbE0Q.&amp;amp;quot;'&amp;gt;&amp;lt;id&amp;gt;tag:blogger.com,1999:user-04780753778872137937.blogs&amp;lt;/id&amp;gt;&amp;lt;updated&amp;gt;2011-06-18T12:26:37.456Z&amp;lt;/updated&amp;gt;&amp;lt;title&amp;gt;Colum's Blogs&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs'/&amp;gt;&lt;br /&gt;&amp;lt;link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs'/&amp;gt;&lt;br /&gt;&amp;lt;link rel='alternate' type='text/html' href='http://www.blogger.com/profile/04780753778872137937'/&amp;gt;&lt;br /&gt;&amp;lt;author&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Colum&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;uri&amp;gt;http://www.blogger.com/profile/04780753778872137937&amp;lt;/uri&amp;gt;&lt;br /&gt;&amp;lt;email&amp;gt;noreply@blogger.com&amp;lt;/email&amp;gt;&lt;br /&gt;&amp;lt;/author&amp;gt;&lt;br /&gt;&amp;lt;generator version='7.00' uri='http://www.blogger.com'&amp;gt; Blogger&amp;lt;/generator&amp;gt;&lt;br /&gt;&amp;lt;openSearch:totalResults&amp;gt;2&amp;lt;/openSearch:totalResults&amp;gt;&lt;br /&gt;&amp;lt;openSearch:startIndex&amp;gt;1&amp;lt;/openSearch:startIndex&amp;gt;&lt;br /&gt;&amp;lt;openSearch:itemsPerPage&amp;gt;25&amp;lt;/openSearch:itemsPerPage&amp;gt;&lt;br /&gt;&amp;lt;entry gd:etag='W/&amp;amp;quot;DUICSH49cSp7ImA9WhZbE0Q.&amp;amp;quot;'&amp;gt;&lt;br /&gt;   &amp;lt;id&amp;gt;tag:blogger.com,1999:user-04780753778872137937.blog-8441087078477003568&amp;lt;/id&amp;gt;&lt;br /&gt;   &amp;lt;published&amp;gt;2009-11-29T11:35:11.006-08:00&amp;lt;/published&amp;gt;&lt;br /&gt;   &amp;lt;updated&amp;gt;2011-06-18T04:46:09.069-07:00&amp;lt;/updated&amp;gt;&lt;br /&gt;   &amp;lt;title&amp;gt;I'd Rather Hack&amp;lt;/title&amp;gt;&lt;br /&gt;   &amp;lt;summary type='html'&amp;gt;Being the technical blog of Colum Paget, rather than his 'ranting into the void' one.&amp;lt;/summary&amp;gt;&lt;br /&gt;   &amp;lt;link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs/8441087078477003568'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/posts/default'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/blogger/2008#template' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/template'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/blogger/2008#settings' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/settings'/&amp;gt;&lt;br /&gt;   &amp;lt;author&amp;gt;&lt;br /&gt;   &amp;lt;name&amp;gt;Colum&amp;lt;/name&amp;gt;&lt;br /&gt;   &amp;lt;uri&amp;gt;http://www.blogger.com/profile/04780753778872137937&amp;lt;/uri&amp;gt;&lt;br /&gt;   &amp;lt;email&amp;gt;noreply@blogger.com&amp;lt;/email&amp;gt;&lt;br /&gt;   &amp;lt;/author&amp;gt;&lt;br /&gt;   &amp;lt;gd:extendedProperty name='IS_PUBLIC_BLOG' value='true'/&amp;gt;&lt;br /&gt;   &amp;lt;gd:extendedProperty name='PICASAWEB_ALBUM_ID' value='5570923802870618657'/&amp;gt;&lt;br /&gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;&amp;lt;entry gd:etag='W/&amp;amp;quot;C08NR3oyeyp7ImA9WhZUGEQ.&amp;amp;quot;'&amp;gt;&lt;br /&gt;   &amp;lt;id&amp;gt;tag:blogger.com,1999:user-04780753778872137937.blog-8531648592648053901&amp;lt;/id&amp;gt;&lt;br /&gt;   &amp;lt;published&amp;gt;2009-10-19T18:36:24.631+01:00&amp;lt;/published&amp;gt;&lt;br /&gt;   &amp;lt;updated&amp;gt;2011-06-12T16:18:16.493+01:00&amp;lt;/updated&amp;gt;&lt;br /&gt;   &amp;lt;title&amp;gt;The Singularity Sucks&amp;lt;/title&amp;gt;&lt;br /&gt;   &amp;lt;summary type='html'&amp;gt; The 21st century doesn't live up to the promises made when I sold my soul to SF back in the 70's, and I want my money back.&amp;lt;/summary&amp;gt;&lt;br /&gt;   &amp;lt;link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs/8531648592648053901'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='alternate' type='text/html' href='http://thesingularitysucks.blogspot.com/'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thesingularitysucks.blogspot.com/feeds/posts/default'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.blogger.com/feeds/8531648592648053901/posts/default'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/blogger/2008#template' type='application/atom+xml' href='http://www.blogger.com/feeds/8531648592648053901/template'/&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/blogger/2008#settings' type='application/atom+xml' href='http://www.blogger.com/feeds/8531648592648053901/settings'/&amp;gt;&lt;br /&gt;   &amp;lt;author&amp;gt;&lt;br /&gt;   &amp;lt;name&amp;gt;Colum&amp;lt;/name&amp;gt;&lt;br /&gt;   &amp;lt;uri&amp;gt;http://www.blogger.com/profile/04780753778872137937&amp;lt;/uri&amp;gt;&lt;br /&gt;   &amp;lt;email&amp;gt;noreply@blogger.com&amp;lt;/email&amp;gt;&lt;br /&gt;   &amp;lt;/author&amp;gt;&lt;br /&gt;   &amp;lt;gd:extendedProperty name='IS_PUBLIC_BLOG' value='true'/&amp;gt;&lt;br /&gt;   &amp;lt;gd:extendedProperty name='PICASAWEB_ALBUM_ID' value='5397308624374094369'/&amp;gt;&lt;br /&gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;&amp;lt;/feed&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Pretty gnarly, huh? It's even worse than this, I've cut a lot of stuff out.&lt;br /&gt;&lt;br /&gt;Notice that in all that guff, there are two &amp;lt;entry&amp;gt; um... entries, that contain the information for my two blogs. Some of that information is a bunch of 'link' entries, that tell you the URLs (or 'endpoints') to use for certain REST operations (like posting a blog entry). Each has a 'rel' parameter that specifies what the url is for.&lt;br /&gt;&lt;br /&gt;For posting blog entries, you should be using the one marked 'rel=http://schemas.google.com/g/2005#post', (which in this example is 'http://www.blogger.com/feeds/8531648592648053901/posts/default')&lt;br /&gt;&lt;br /&gt;Howerver, there's two others that are mysterious to me, but interesting looking. These are the ones marked&lt;br /&gt;&lt;br /&gt;   rel='http://schemas.google.com/blogger/2008#template'&lt;br /&gt;   rel='http://schemas.google.com/blogger/2008#settings'&lt;br /&gt;&lt;br /&gt;What can they be for?&lt;br /&gt;&lt;br /&gt;Well, doing a GET to http://www.blogger.com/feeds/8531648592648053901/settings produces a vertiable deluge of XML. There's far too much of it to post here, but it's made up of entries like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;entry gd:etag='W/&amp;amp;quot;C0QDSHo4eCp7ImA9WhZbE0U.&amp;amp;quot;'&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;tag:blogger.com,1999:blog-8441087078477003568.settings.BLOG_ADMIN_PERMISSION&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;published&amp;gt;2009-11-29T11:35:11.006-08:00&amp;lt;/published&amp;gt;&lt;br /&gt;&amp;lt;updated&amp;gt;2011-06-18T00:16:19.430-07:00&amp;lt;/updated&amp;gt;&lt;br /&gt;&amp;lt;app:edited xmlns:app='http://www.w3.org/2007/app'&amp;gt;2011-06-18T00:16:19.430-07:00&amp;lt;/app:edited&amp;gt;&lt;br /&gt;&amp;lt;category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#settings'/&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;The list of administrators' emails for the blog.&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;content&amp;gt;admin@googlemail.com&amp;lt;/content&amp;gt;&lt;br /&gt;&amp;lt;link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/settings/BLOG_ADMIN_PERMISSION'/&amp;gt;&lt;br /&gt;&amp;lt;link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/settings/BLOG_ADMIN_PERMISSION'/&amp;gt;&lt;br /&gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Each entry refers to one setting related to your blog. The 'title' tags enclose a description of what the setting is, and the 'content' tags enclose the value of the setting.&lt;br /&gt;&lt;br /&gt;Notice that there's a 'link' tag with a parameter of 'rel=edit'. Normally these 'edit' links can be used to send data to a google service. I wondered if this link could be used to change the settings related to my blog?&lt;br /&gt;&lt;br /&gt;Turns out that yes, they can.&lt;br /&gt;&lt;br /&gt;Doing an HTTP PUT to the 'edit' url of the setting thusly:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;PUT /feeds/8441087078477003568/settings/BLOG_BACKLINKS_ALLOWED HTTP/1.1&lt;br /&gt;Host: www.blogger.com&lt;br /&gt;Content-Type: application/atom+xml&lt;br /&gt;Content-Length: 342&lt;br /&gt;Connection: Close&lt;br /&gt;GData-Version: 2.0&lt;br /&gt;Authorization: GoogleLogin auth=&amp;lt;Your auth token goes here&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'&amp;gt;&amp;lt;category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#settings'/&amp;gt;&amp;lt;id&amp;gt;tag:blogger.com,1999:blog.settings.BLOG_BACKLINKS_ALLOWED&amp;lt;/id&amp;gt;&amp;lt;content&amp;gt;true&amp;lt;/content&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Allows you to change a setting. You should get a 200 OK response if it worked.&lt;br /&gt;&lt;br /&gt;Notice that you need to have this an id tag like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;id&amp;gt;tag:blogger.com,1999:blog.settings.BLOG_BACKLINKS_ALLOWED&amp;lt;/id&amp;gt;&lt;br /&gt;&lt;br /&gt;Basically change 'BLOG_BACKLINKS_ALLOWED' for the name of whatever setting you're changing.&lt;br /&gt;&lt;br /&gt;And that's it. Have fun.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-5258688840379800474?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/5258688840379800474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/06/howto-change-blogger-settings-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5258688840379800474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5258688840379800474'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/06/howto-change-blogger-settings-with.html' title='Howto Change Blogger Settings with the GData API'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-5846386930109213402</id><published>2011-06-18T08:10:00.001-07:00</published><updated>2011-06-18T08:17:47.320-07:00</updated><title type='text'>Geeky Groups near Birmingham UK</title><content type='html'>I've recently been getting more into meeting like-minded people, which is to say 'geeks'. After years of trying to pretend that I'm not one (in the same way that I tried to pretend my eyesight wasn't failing when I was a kid) I've finally decided to come out.&lt;br /&gt;&lt;br /&gt;This new sociability probably started when I visited the &lt;a href='http://en.wikipedia.org/wiki/c-base'&gt;c-base&lt;/a&gt; hackerspace in Berlin,&lt;br /&gt;&lt;br /&gt;&lt;img height='' width='' src='http://www.pixtur.de/bsm/img/high/cbase01.jpg'/&gt;&lt;br /&gt;&lt;br /&gt;where I got horribly drunk and threw up in their loos. It wasn't all my fault though, I didn't pour all that Jager down my own throat. Well, okay, &lt;b&gt;literally&lt;/b&gt; speaking I did, but someone kept filling the glass, so I feel there's shared responsiblity.&lt;br /&gt;&lt;br /&gt;Anyways, since then I've been to the &lt;a href='http://nottinghack.org.uk/'&gt;Nottinghack&lt;/a&gt; hackerspace in Nottingham. They did a frankly wonderful lockpicking workshop, and if they ever do another of these and you can go to it, I'd urge you to do so. You'll learn a lot (most of it alarming).&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At the time I attended, they were still in the 'old' hackspace, which had two largish rooms, but was already a little crowded. They have since moved to somewhere that looks like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img height='' width='' src='http://ox4hs.utou.ch/dale/images/nottinghack_5700657913_784bf63cbc_z.jpg'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;img height='' width='' src='http://farm4.static.flickr.com/3008/5777749977_17d3433f4e_z.jpg'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;img height='' width='' src='http://nottinghack.org.uk/wp-content/uploads/2011/04/Moving-Hackspace-019-300x225.jpg'/&gt;&lt;br /&gt;&lt;br /&gt;It's &lt;b&gt;HUGE&lt;/b&gt;. I should go and visit again!&lt;br /&gt;&lt;br /&gt;Birmingham has been unlucky hackspace-wise, the hackspace there kinda folded, (Birmingham always seems to fail to do things that far smaller conurbations have no problem achieving) but now people are trying to restart it again!&lt;br /&gt;&lt;br /&gt;&lt;a href='http://www.fizzpop.org.uk/'&gt;FizzPop&lt;/a&gt; is the Birmingham hackerspace. Currently they have no permanent space and are meeting up in bars and what have you, but plans are afoot to get a permanent residence sorted.&lt;br /&gt;&lt;br /&gt;Once upon a time, they got to this level:&lt;br /&gt;&lt;br /&gt;&lt;img height='' width='' src='http://farm3.static.flickr.com/2735/4122755025_ff1b7d7d74.jpg'/&gt;&lt;br /&gt;&lt;br /&gt;Let's hope they can get back there again.&lt;br /&gt;&lt;br /&gt;If you're a maker or hacker in B'ham, then FizzPop needs your support. They need to get some paying members so they can pay for a proper space, it's one of those chicken-and-egg things.&lt;br /&gt;&lt;br /&gt;I guess I should say 'we' rather than 'they', because I'm kinda involved in this, but I live a ways out of Birmingham, so I'm not as involved as all that.&lt;br /&gt;&lt;br /&gt;Finally I went to the &lt;a href='http://sb.lug.org.uk/'&gt;Birmingham Linux User Group&lt;/a&gt;. I wasn't expecting much from this, but was very pleasantly surprised. The session I went to was just three guys standing up and doing a talk about something (one of whom was a FizzPopper that I already knew) but all three did an excellent job.&lt;br /&gt;&lt;br /&gt;They record and post these talks, so sometime in the future the one that I attended should appear among them. If they do, you can hear me, I'm the squeaky voice asking obnoxious questions like "Why does a modern database system need something like memcached to support it?" (Imagine this said in the same manner as "What does God need with a starship?"), went down like a lead balloon that one did.&lt;br /&gt;&lt;br /&gt;So, anyways, I'll be going to these groups again, and if you're a maker or hacker or geek in B'ham, so should you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-5846386930109213402?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/5846386930109213402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/06/geeky-groups-near-birmingham-uk_2249.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5846386930109213402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5846386930109213402'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/06/geeky-groups-near-birmingham-uk_2249.html' title='Geeky Groups near Birmingham UK'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3008/5777749977_17d3433f4e_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-6948214144342828946</id><published>2011-06-18T00:09:00.001-07:00</published><updated>2011-06-18T08:18:54.544-07:00</updated><title type='text'>How to fix your broken Blogger client program</title><content type='html'>For about a month now I and other people have been unable to use the blogger api to update our blogs. This is one of a raft of problems caused by a recent update of the blogger system, and some other ones (including the fact my OpenID is broken) are still outstanding. However, the OpenID thing isn't a big deal, whereas the api blog posting is something I use a lot.&lt;br /&gt;&lt;br /&gt;I can happily report that the Blogger/Google people have come through for us and found the problem. I had been losing hope, because as a linux user I'm used to having people break stuff, and then say the problem is that I'm running linux. But, though it's admittedly taken them a while, google's blogger team have dug to the bottom of the problem and found the cause. Maybe I should have more faith in future, we'll see.&lt;br /&gt;&lt;br /&gt;If you've found that your blogger API client program has stopped working in the last month, then what follows is what you need to do to get it working again.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Turns out that some of us had misinterpreted the blogs 'posting endpoint' to be this&lt;br /&gt;&lt;br /&gt;http://idratherhack.blogspot.com/feeds/posts/default&lt;br /&gt;&lt;br /&gt;which was working fine, you could send the appropriate XML to this endpoint, and post to your blog. But it was never supposed to work, and since the upgrade, it doesn't. This is a shame, because it's a nice URL that makes some sense to the user.&lt;br /&gt;&lt;br /&gt;The endpoint we should have been using looks more like:&lt;br /&gt;&lt;br /&gt;http://www.blogger.com/feeds/8441087078477003568/posts/default&lt;br /&gt;&lt;br /&gt;So the question is, how do you get from a blog name/url like 'idratherhack.blogspot.com' to this horrible blog ID? Well, there's a few ways of doing it.&lt;br /&gt;&lt;br /&gt;1) Connect to your blog and pull it as an html page. Near the top you'll see an entry like:&lt;br /&gt;&lt;br /&gt;&amp;lt;link rel="service.post" type="application/atom+xml" title="I&amp;amp;#39;d Rather Hack - Atom" href="http://www.blogger.com/feeds/8441087078477003568/posts/default" /&amp;gt;&lt;br /&gt;The 'href' part of this gives you the url that you should use for posting to the blog.&lt;br /&gt;&lt;br /&gt;2) The more complex way is described in the &lt;a href='http://code.google.com/apis/blogger/docs/2.0/developers_guide_protocol.html'&gt;protocol document&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1: Authenticate with google using client-login or Oauth.&lt;br /&gt;&lt;br /&gt;2: do an HTTP GET to http://www.blogger.com/feeds/default/blogs&lt;br /&gt;&lt;br /&gt;This will return a mass of XML that gives information regarding the authenticated user. Within this are entries like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;   &amp;lt;link rel='self' type='application/atom+xml'     href='http://www.blogger.com/feeds/profileID/blogs/blogID' /&amp;gt;&lt;br /&gt;   &amp;lt;link rel='alternate' type='text/html'     href='http://blogName.blogspot.com/' /&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/g/2005#feed'     type='application/atom+xml'     href='http://blogName.blogspot.com/feeds/posts/default' /&amp;gt;&lt;br /&gt;   &amp;lt;link rel='http://schemas.google.com/g/2005#post'     type='application/atom+xml'     href='http://www.blogger.com/feeds/blogID/posts/default' /&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The important one is the one that has a 'rel' value of&lt;br /&gt;&lt;br /&gt;http://schemas.google.com/g/2005#post&lt;br /&gt;&lt;br /&gt;the accompanying 'href' gives the endpoint you must used for posting blog entries. Here it is described as 'http://www.blogger.com/feeds/blogID/posts/default', but when you get a real feed the 'blogID' will be replaced by a big old number to produce a unique endpoint for the blog.&lt;br /&gt;&lt;br /&gt;This XML also contains other interesting 'link' entries, like:&lt;br /&gt;&lt;br /&gt;rel=http://schemas.google.com/blogger/2008#setting&lt;br /&gt;rel=http://schemas.google.com/blogger/2008#template&lt;br /&gt;&lt;br /&gt;the href of these gives endpoints that let you pull a list of settings or the template of the blog.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So basically, if you get this 'post' endpoint, and use that instead of http://&amp;lt;blogname&amp;gt;.blogspot.com/feeds/posts/default, you should find that your API program starts working again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-6948214144342828946?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/6948214144342828946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/06/how-to-fix-your-broken-blogger-client.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6948214144342828946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6948214144342828946'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/06/how-to-fix-your-broken-blogger-client.html' title='How to fix your broken Blogger client program'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-119590387441526321</id><published>2011-05-27T14:33:00.000-07:00</published><updated>2011-05-27T15:17:50.346-07:00</updated><title type='text'>Google's Blogger Service is Broken</title><content type='html'>Since about 2011/05/22 google's "Blogger" service (where this blog is hosted) has been experiencing serious problems. You can see a list of increasingly irate people &lt;a href="http://www.google.com/support/forum/p/blogger/thread?tid=4bd36d5355dbcf8c&amp;hl=en"&gt; here &lt;/a&gt;. It's a weird fault that hits different people in different ways. Some can't log in, some can't log out, some can log in but can't post.&lt;br /&gt;&lt;br /&gt;I've not been as heavily affected as some, I can still log in to the website and post to my blog. However, I can't use the 'blogger api' to post from applications. Other people using blogging applications like MacJournal or ScribeFire are having the same problem.&lt;br /&gt;&lt;br /&gt;The amazing thing is how long it's taking google to fix this, days. Also it seems to me (though I may be wrong) that this is linked to a recent decision by google to turn on 'Spam Checking' on everyone's blog comments. They didn't ask us if we wanted this turned on, they didn't suggest we turn it on, they just went and turned it on for us. They did this a while back with 'google buzz', turning it on and in the process revealing users gmail contacts to the whole world. I conclude from this (assuming I'm right about the cause) that google learns nothing from history.&lt;br /&gt;&lt;br /&gt;But there's a bigger issue there. We're told that everything is moving into 'the cloud', that big competent companies will 'look after our data' and make thing effortless for us. You know, big competent companies like BP, or Toyota, or Enron, or Sony, or Google, or any bank, or...&lt;br /&gt;&lt;br /&gt;These big companies aren't exactly covering themselves with glory these days. Would you really trust them with your business critical data?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-119590387441526321?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/119590387441526321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/05/googles-blogger-service-is-broken.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/119590387441526321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/119590387441526321'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/05/googles-blogger-service-is-broken.html' title='Google&apos;s Blogger Service is Broken'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-3418320573823950064</id><published>2011-05-10T11:01:00.001-07:00</published><updated>2011-05-10T11:01:13.704-07:00</updated><title type='text'>Things I wish people had told me about 1: Bind Mounts</title><content type='html'>Stuff I wish people had told me about No. 1&lt;br/&gt;&lt;br/&gt;Bind Mounts&lt;br/&gt;&lt;br/&gt;Quite often I find myself wanting to run processes in a chroot. This is especially true for file services being served up by ftp or http. Unfortunately I often find that files I want people to get access to are outside the directory that I want to chroot them into.&lt;br/&gt;&lt;br/&gt;Now, symbolic links won't work across chroot, and though you can use a hard-link to make files individually available within a chroot, it becomes a lot of work for a lot of files.&lt;br/&gt;&lt;br/&gt;Just recently though, I discovered that you can do this:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;mkdir /home/PublicData&lt;br/&gt;mount --bind /home/PublicData /home/chroot/PublicData&lt;br/&gt;&lt;br/&gt;These 'bind mounts' allow you to 'mount' a directory onto another directory. So, you create an empty directory with a particular name, then call the mount command to mount another directory onto your empty directory, so that when people enter the 'empty' directory, they are teleported to the other directory.&lt;br/&gt;&lt;br/&gt;This means that you can choose which directories to make available to people who are in some kind of chroot jail. Very useful!&lt;br/&gt;&lt;br/&gt;I wish someone had told me about this earlier.&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-3418320573823950064?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/3418320573823950064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/05/things-i-wish-people-had-told-me-about.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3418320573823950064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3418320573823950064'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/05/things-i-wish-people-had-told-me-about.html' title='Things I wish people had told me about 1: Bind Mounts'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-6469501483000196432</id><published>2011-04-12T03:38:00.001-07:00</published><updated>2011-04-12T03:40:33.424-07:00</updated><title type='text'>Root's bash profile not working when su</title><content type='html'>A reaccuring annoyance for me is getting root's bash_profile to work, and everytime I fix it, I promptly forget what I did, so here's a post for me to refer to  if noone else!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Things like the users PATH and other environment variables can be set up in a file in their home directory called .bash_profile. If they're using the Bourne Again Shell then this file gets read when they login, and any commands in it are run to set up their environment. But in my experience it never works for root.&lt;br /&gt;&lt;br /&gt;There's a difference between root and other users though, I almost never login as root, I login as another user and then 'su' to root. Turns out that an 'su' doesn't count as a login, and '.bash_profile' only gets read and run for login shells. If other types of shell get started up, say by being launched from a program or whatever, then another file '.bashrc' is read instead. So, if I put the same commands in /root/.bashrc that I normally would in /home/user/.profile, then they will work when I 'su'.&lt;br /&gt;&lt;br /&gt;Finally there are 'global' bashrc and profile files that can be put in /etc, and these will be run for all users before any profile or bashrc in their home directory is run. Note that these files don't have the leading '.', so instead of /home/user/.bashrc, it's /etc/bashrc. And for the profile, it's /etc/profile instead of /etc/bash_profile as you might expect! Oh, and finally, these global files don't seem to work for /root.&lt;br /&gt;&lt;br /&gt;So, to get the PATH and prompt etc set for everyone, create /etc/profile for all users but root, and then copy it to /root/.bashrc, and /root/.bash_profile and that should cover 'su' and 'login' shells for root too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-6469501483000196432?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/6469501483000196432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/04/root-bash-profile-not-working-when-su.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6469501483000196432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6469501483000196432'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/04/root-bash-profile-not-working-when-su.html' title='Root&amp;#39;s bash profile not working when su'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-8477261287396044769</id><published>2011-04-04T06:48:00.001-07:00</published><updated>2011-04-04T06:52:28.476-07:00</updated><title type='text'>Nvidia drivers fail without 'smp_lock.h'</title><content type='html'>If you install a very recent kernel from www.kernel.org, and then try to install the NVIDIA graphics drivers, you may find that the driver install fails. The NVIDIA installer actually compiles the drivers against your kernel source tree, but recent kernels seem to have dropped a file that's called 'smp_lock.h'. Unable to find this file that it expects to have, the NVIDIA driver compile process fails.&lt;br /&gt;&lt;br /&gt;A quick and dirty solution that worked for me was to simply locate 'smp_lock.h either under /usr/include/linux, or in an old kernel source tree, and drop it into the include/linux directory of your new kernel source tree. If you can't get a copy of a the file, then try making an empty file with the same name, I think even that will probably work. You should then find that the NVIDIA install process gets by that hurdle at least. It worked for me!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-8477261287396044769?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/8477261287396044769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/04/nvidia-drivers-fail-without-smplockh.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/8477261287396044769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/8477261287396044769'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/04/nvidia-drivers-fail-without-smplockh.html' title='Nvidia drivers fail without &apos;smp_lock.h&apos;'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-1632784716594289822</id><published>2011-02-07T04:28:00.000-08:00</published><updated>2011-02-07T04:33:57.634-08:00</updated><title type='text'>I'm up on "Daily Science Fiction"</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://dailysciencefiction.com/images/buttons/logo.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 138px; height: 132px;" src="http://dailysciencefiction.com/images/buttons/logo.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, on Friday my story "Imaginary Enemies" went out on the &lt;a href="www.dailysciencefiction.com"&gt;Daily Science Fiction&lt;/a&gt; mailing list. My first pro-paying publication. What feed-back I've seen from readers is good, no one hated it, many people are saying they liked it. I'd like to thank my friends and family, and Sainsbury's for doing the catering. I'm sure my sudden success won't change me.&lt;br /&gt;&lt;br /&gt;Actually, I was kinda hoping it would change me, but no signs yet.&lt;br /&gt;&lt;br /&gt;Anyways, in a week or so it's apparently going to get posted to the Daily SF website for everyone to see, even those who aren't on the mailing list, and no doubt then the bidding war for film rights will start!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-1632784716594289822?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/1632784716594289822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/02/im-up-on-daily-science-fiction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1632784716594289822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1632784716594289822'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/02/im-up-on-daily-science-fiction.html' title='I&apos;m up on &quot;Daily Science Fiction&quot;'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-3013271092416847286</id><published>2011-01-28T04:14:00.000-08:00</published><updated>2011-01-28T04:46:40.840-08:00</updated><title type='text'>Broadband speedtests that don't need flash or java</title><content type='html'>Look, I don't want to install flash or java just to find out how fast my internet connection is. I just want something that downloads a file and gives me a result. Here are some websites that do this basic thing.&lt;br /&gt;1) Tracert.org&lt;br /&gt;http://www.tracert.org/bandwidth_meter/&lt;br /&gt;&lt;br /&gt;For me the best one, almost magical in fact. You just click 'start test', and it works. Works in old versions of firefox without flash, and seems to produce results that agree with other tests.&lt;br /&gt;&lt;br /&gt;2) Ten Meg &lt;br /&gt;http://tenmeg.myby.co.uk/&lt;br /&gt;&lt;br /&gt;Yes, it requires you to watch a couple of images downloading and click a button when they're done, but it works in browsers without flash, java, activex, siverlight, perl, ruby, php, gtk, etc, etc, etc, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3) ISP GEEKS &lt;br /&gt;http://www.ispgeeks.com/wild/modules.php?name=Bandwidth_Meter_DSL&lt;br /&gt;&lt;br /&gt;Described as their 'Mobile Speed Test', doesn't seem very accurate (perhaps because they're in the USA and I'm in the UK), but it gives a rough idea and doesn't need flash etc.&lt;br /&gt;&lt;br /&gt;4) Broadband speed checker&lt;br /&gt;http://www.broadbandspeedchecker.co.uk/&lt;br /&gt;&lt;br /&gt;Seems to work in I.E. without flash, though it says it would like to have flash 8. Unfortunately seems to be broken in earlier versions of firefox.&lt;br /&gt;&lt;br /&gt;5) Toast.net&lt;br /&gt;http://performance.toast.net/&lt;br /&gt;&lt;br /&gt;Again, not massively accurate, but simple and kinda fun waiting for the picture to download!&lt;br /&gt;&lt;br /&gt;6) Mobile test&lt;br /&gt;http://i.dslr.net/iphone_speedtest.html&lt;br /&gt;&lt;br /&gt;Aimed at mobile phone browsers, but if you click the 'wifi' option, it seems to give a fairly accurate result (but that could be a co-incidence).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-3013271092416847286?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/3013271092416847286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2011/01/broadband-speedtests-that-dont-need.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3013271092416847286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3013271092416847286'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2011/01/broadband-speedtests-that-dont-need.html' title='Broadband speedtests that don&apos;t need flash or java'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-8421931058476061161</id><published>2010-08-25T02:06:00.000-07:00</published><updated>2010-08-25T02:27:33.573-07:00</updated><title type='text'>ALSA drivers not working for Cirrus Logic CS46xx soundcard</title><content type='html'>If you are using OSS emulation for ALSA on a laptop with a CS46xx card, and are getting no sound, then read on.&lt;br /&gt;&lt;br /&gt;I use a really old laptop (Ascentia M-Series dating from 1998) that I carry about in places where I think anything nicer would get stolen/drowned in spilled tea/rolled over by a forklift. One thing that has long annoyed me about this laptop though, is that the sound doesn't work. Things would appear to be working, mplayer would claim it was playing .mp3 files, but no sound would come out.&lt;br /&gt;&lt;br /&gt;The sound card is a cirrus logic CS4624B, and everyone says that these are a pig to get working, requiring lots of meddling with old-style Plug-and-Pray settings because, in these old laptops, the soundcard is on an isa bus.&lt;br /&gt;&lt;br /&gt;Funny thing is though, that back in the day when I used OSS for sound, rather than ALSA, the soundcard worked fine. Why would ALSA suddenly have irq or resource issues that require me to mess with isapnp, when OSS didn't?&lt;br /&gt;&lt;br /&gt;In the end, the problem turned out to have nothing to do with irq's, io-ports or plug-and-play. Basically there is a bug in ALSA. For these cards, ALSA sets everything to 'Mute' by default. This  doesn't mean it sets the sound level to zero, it seems to be more than that, it actually does some magic 'mute' thing to the card that you have to unlock. Unfortunately, the OSS compatibility module that makes the sound-card visible to programs that use the old OSS interface, doesn't know how to mute/unmute, so the card stays muted no matter what you do.&lt;br /&gt;Or it might not be the mute, it might be the fact that one of the volume controls 'Master' doesn't appear to be exported to the OSS emulation, under ALSA volume control programs you see the 'Master' setting, but under OSS volume controls, you don't.&lt;br /&gt;&lt;br /&gt;The only solution I've found is to install the alsa libraries, and use 'alsamixer' to initially set up the card and volume levels. Suddenly BINGO! It works! No need to meddle with irq's and isapnp.conf. &lt;br /&gt;&lt;br /&gt;However, I didn't really want to install the ALSA libraries, that's why I'm using OSS emulation. But, more and more these days Linux is becoming another O.S. of you-will-do-as-we-say. IF you want to use software X, you will install lots of libraries and now you're going to have to upgrade your computer. If I have to upgrade my computer, then why not just put windows on it or get a mac and be done with it, hmmm??&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-8421931058476061161?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/8421931058476061161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2010/08/alsa-drivers-not-working-for-cirrus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/8421931058476061161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/8421931058476061161'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2010/08/alsa-drivers-not-working-for-cirrus.html' title='ALSA drivers not working for Cirrus Logic CS46xx soundcard'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-7381194221240479753</id><published>2010-06-02T15:36:00.001-07:00</published><updated>2011-03-14T10:59:01.562-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>M. T. Urself</title><content type='html'>So, I had a server that was misbehaving in a truely weird way. I was accessing this server via and ADSL line, connecting into it using Secure Shell. Any large amount of data pulled from it caused the network connection to drop. But I could push as much data to it as I liked. Huge uploads worked fine, but downloads would get me disconnected instantly.   Logging in and typing 'ps ax' would normally only get me half the page of output before the connection froze up. Also, anything that posted information to websites, like logging into googlemail for instance, seemed to freeze as well.&lt;br /&gt;&lt;br /&gt;I tried altering the firewall, the router, the routing table on the server, recompiling the kernel, etc, etc, all to no avail. After each new attempt the problem would seem to go away, cruely making me think I'd fixed it, before returning again.&lt;br /&gt;&lt;br /&gt;Now, often in the past when there's been network problems, some old unix-hacker with open-toed sandals and a grateful-dead t-shirt has been around to say; "You know man, could it be, like, the MTU?"&lt;br /&gt;&lt;br /&gt;The MTU. That thing they had on modems, remember? No, I don't suppose you would.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The proper reply to this statement is, of course: "Get real grandad! It's the effin' nineteen-nineties, innit? 'MTU', ha! You iz well outta touch, m8."&lt;br /&gt;&lt;br /&gt;And then, sometime in the noughties, he just wasn't there any more. I miss that dude now.&lt;br /&gt;&lt;br /&gt;PARTICULARLY AS, THIS TIME, IT WAS THE ****ING MTU! TWO DAYS OF BANGING MY HEAD AGAINST A BRICK FIREWALL WITH MY BOSS RIDING MY ASS SAYING THINGS LIKE "Haven't you fixed it yet? I thought you were good at this stuff?" AND IT TURNS OUT TO BE THE GODDAMN LEFT-OVER-FROM-THE-DARK-AGES-OF-ARPANET SMALL-PRINT-OF-NETWORKING MTU!!&lt;br /&gt;&lt;br /&gt;So, being a civic-minded soul I'm posting the information here, so others don't have to suffer as I did.&lt;br /&gt;&lt;br /&gt;The MTU is the "Maximum Transmission Unit". It's a value that tells the computer what the maximum size of network packet is that can be transmitted on a given network. There's a "Maximum Receive Unit" too, but this is less often messed with. The MRU is the maximum packet size that a network device will accept. Obviously, people transmitting to you have to be using an MTU smaller than your MRU, otherwise you'll reject their packets as 'too big'.&lt;br /&gt;The reason you can't transmit packets (sometimes called 'frames') of any old size is that most networks can only actually carry one chunk of data at a time. They achieve the 'magic' of many people using the network at once by a simple method of breaking messages up into packets, and letting everyone take it in turns to send one packet. If the packets and small, and the network moves them fast, it seems like everyone is using it at the same time. But if one person could make a huge packet, I mean really humungous, the mother of all packets, then that single packet could clog up the network and everyone would have to wait for it to have finished transmitting, before they could get a slice of the action.  The slower the network, the smaller the packets have to be to provide the illusion of multi-user networking. &lt;br /&gt;Another issue with mtu size, is noisy network connections. If you have networks where there is a lot of noise, and packets are likely to get corrupted, then the bigger the packet, the more likely it is to be 'hit' by corruption. This will mean that the packet has to be re-sent, but because it's a big packet, it's quite likely to get hit by corruption again!&lt;br /&gt;&lt;br /&gt;Modems and serial links were generally noisy links, and they were slow too. As a result they generally had small MTU sizes, and much time was spent tweaking the MTU size to get the best results on a particular line. However, ADSL/Cable and Ethernet are much faster and more reliable, and generally all seem to agree on a default MTU of 1500 bytes.&lt;br /&gt;&lt;br /&gt;There's also some magic in TCP/IP called 'Path MTU discovery', which works like this: If there's a network device between you and the machine you are exchanging data with, that cannot handle your chosen MTU/packet size, it will drop your packet and send a message back to you saying 'packet too big'. This message is sent using the icmp protocol (the same protocol that powers 'ping'). Hence, most modern systems should automagically reset their MTU to whatever is needed.&lt;br /&gt;&lt;br /&gt;However, if you block icmp with your firewall, because you're thinking "I don't need ping", then this magic won't be able to happen. If you then also have an ADSL router who is using an MRU smaller than your MTU, it will drop any large packets you send it, and your system won't know because it's icmp based complaints won't get through your firewall. Hence, you'll be able to connect to your computer from outside, or connect to websites and pull data from them, but the first time you pull more than a little data from your machine, or push more than a little data to the net, everything will lock up.&lt;br /&gt;&lt;br /&gt;The Cure&lt;br /&gt;&lt;br /&gt;There's two things to do:&lt;br /&gt;&lt;br /&gt;1) Find out what MTU/MRU the device you are talking through (in my case ADSL router) is using, and use /sbin/ifconfig to set the network card to use it.&lt;br /&gt;&lt;br /&gt;/sbin/ifconfig eth0 mtu 1496&lt;br /&gt;&lt;br /&gt;2) Make sure you let 'icmp' through you firewall so your system can adjust the MTU automagically.&lt;br /&gt;&lt;br /&gt;/sbin/iptables -I INPUT -i eth0 -p icmp -j ACCEPT&lt;br /&gt;/sbin/iptables -I OUTPUT -o eth0 -p icmp -j ACCEPT&lt;br /&gt;&lt;br /&gt;Of course, doing item '2' allows people to 'ping' your machine. There are ways to prevent that with iptables, but these are left as an exercise for the reader.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-7381194221240479753?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/7381194221240479753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2010/06/m-t-urself.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7381194221240479753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7381194221240479753'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2010/06/m-t-urself.html' title='M. T. Urself'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-7090269282897902744</id><published>2010-04-16T14:22:00.001-07:00</published><updated>2010-04-16T14:22:21.887-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Webcams'/><category scheme='http://www.blogger.com/atom/ns#' term='Hacks'/><title type='text'>Quick and Dirty Webcam monitoring</title><content type='html'>Just thought I'd mention a very quick and dirty way to get 'webcam monitoring' going. I've done this with axis webcams, but it should work with any webcam that allows you to fetch a jpeg image from a url.&lt;br/&gt;&lt;br/&gt;This will, of course, be working under linux. It's only using the standard 'Borne' shell and a program called 'links' so it should work under FreeBSD and Mac OSX too.&lt;br/&gt;&lt;br/&gt;The command-line webbrowser, 'links' has an option called -'-source'. This has the effect that a webpage or item fetched using http with links is written in raw format to stdout. So&lt;br/&gt;&lt;br/&gt;	links -source http://media.libsyn.com/media/djsteveboy/the_swing_set.mp3 &amp;gt; TheSwingSet.mp3&lt;br/&gt;&lt;br/&gt;Will download the example .mp3 file.&lt;br/&gt;&lt;br/&gt;Most axis webcams allow you to download an image from http://&amp;lt;webcamip&amp;gt;/axis-cgi/jpg/image.cgi, so we can use links to Grab an image thusly:&lt;br/&gt;&lt;br/&gt;links -source http://192.168.5.4:1000/axis-cgi/jpg/image.cgi &amp;gt; snapshot.jpg&lt;br/&gt;&lt;br/&gt;Of course, what's best is to get images every couple of seconds and put them into a date/timestamped file. Here's the script I've been using, it creates directories for each hour of a day, and puts timestamped .jpg files in them.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;#! /bin/sh&lt;br/&gt;&lt;br/&gt;cd /home/Public/AxisWebcam&lt;br/&gt;&lt;br/&gt;while [ 1 = 1 ]&lt;br/&gt;do&lt;br/&gt;&lt;br/&gt;DIR=`date "+%d_%m_%Y_Hour-%H"`&lt;br/&gt;FILE=`date "+%H_%M_%S.jpg"`&lt;br/&gt;&lt;br/&gt;mkdir $DIR&lt;br/&gt;links -source http://192.168.5.4:1000/axis-cgi/jpg/image.cgi &amp;gt; $DIR/$FILE&lt;br/&gt;&lt;br/&gt;sleep 2&lt;br/&gt;&lt;br/&gt;done&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;One issue is that links doesn't have any way (that I know of) of expressing a username/password to access a website. Fortunately, Axis cameras have a setup option under 'Setup-&amp;gt;Users' called 'Enable anonymous viewer login'. This allows access to the image without having to supply a username and password.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;If you're going to leave this script running, you may want to periodically run a command like:&lt;br/&gt;&lt;br/&gt;	find -mtime +7 -exec rm -f {} \;&lt;br/&gt;&lt;br/&gt;This command will delete any files older than a week.&lt;br/&gt;&lt;br/&gt;And that's it!&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-7090269282897902744?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/7090269282897902744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2010/04/quick-and-dirty-webcam-monitoring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7090269282897902744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7090269282897902744'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2010/04/quick-and-dirty-webcam-monitoring.html' title='Quick and Dirty Webcam monitoring'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-134815719700802434</id><published>2010-03-09T14:04:00.001-08:00</published><updated>2011-03-14T11:08:08.024-07:00</updated><title type='text'>Slow boot due to libata problems with mwdma2</title><content type='html'>I use a lot of old kit. Recent linux kernels are starting to have problems with old kit. An old laptop harddrive suddenly started to 'freeze' during bootup. The kernel was trying to access it with various DMA modes, none of which seemed to work. Finally it would fall back to PIO, and work, but this was annoying, because it meant the laptop took ages to boot.&lt;br /&gt;&lt;br /&gt;I'm attaching a dump of what the kernel spewed out while it was trying to talk to the hard-drive. The main thing to look for if you have the same problem is:&lt;br /&gt;&lt;br /&gt;[   23.107017] ata2: soft resetting link&lt;br /&gt;[   23.259250] ata2.00: configured for MWDMA1&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and it will gradually work thorugh the possiblities until&lt;br /&gt;&lt;br /&gt;[   65.107128] ata2: soft resetting link&lt;br /&gt;[   65.262031] ata2.00: configured for PIO4&lt;br /&gt;&lt;br /&gt;What you want to do, of course, is tell the kernel 'just go for PIO4 straight away', and at least it will boot quickly.&lt;br /&gt;&lt;br /&gt;Turns out you can!&lt;br /&gt;&lt;br /&gt;I added 'libata.force=2:pio4' to my kernel 'append' line. I use lilo to boot my system, so it's as simple as:&lt;br /&gt;&lt;br /&gt;append="libata.force=2:pio4"&lt;br /&gt;&lt;br /&gt;added to my lilo.conf&lt;br /&gt;&lt;br /&gt;This tells the bit of the kernel that deals with harddrives (libata) to use pio4 (not sure what that is, but it works, whereas mwdma2, which I'm also unsure what it is, doesn't) on the second 'ata' interface.&lt;br /&gt;&lt;br /&gt;I gathered that it was the second ata interface from all the bootup messages about 'ata2'&lt;br /&gt;&lt;br /&gt;And it works fine, if, I suspect, rather slowly.&lt;br /&gt;&lt;br /&gt;So if you're seeing the following in your logs, you probably want to do this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[    1.671100] scsi 2:0:0:0: Direct-Access     ATA      TOSHIBA MK1403MA D3.0 PQ: 0 ANSI: 5&lt;br /&gt;[    1.677462] sd 2:0:0:0: [sda] 2818368 512-byte logical blocks: (1.44 GB/1.34 GiB)&lt;br /&gt;[    1.678301] sd 2:0:0:0: Attached scsi generic sg0 type 0&lt;br /&gt;[    1.682247] sd 2:0:0:0: [sda] Write Protect is off&lt;br /&gt;[    1.682439] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00&lt;br /&gt;[    1.684011] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br /&gt;[    1.687772]  sda: sda1 sda4&lt;br /&gt;[    1.808661] sd 2:0:0:0: [sda] Attached SCSI disk&lt;br /&gt;[   23.105610] ata2: lost interrupt (Status 0x5)&lt;br /&gt;[   23.105777] ata2: drained 4 bytes to clear DRQ.&lt;br /&gt;[   23.105848] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen&lt;br /&gt;[   23.105989] scsi 3:0:0:0: CDB: Inquiry: 12 00 00 00 60 00&lt;br /&gt;[   23.106497] ata2.00: cmd a0/01:00:00:60:00/00:00:00:00:00/a0 tag 0 dma 96 in&lt;br /&gt;[   23.106520]          res 40/00:02:00:24:00/00:00:00:00:00/a0 Emask 0x4 (timeout)&lt;br /&gt;[   23.106841] ata2.00: status: { DRDY }&lt;br /&gt;[   23.107017] ata2: soft resetting link&lt;br /&gt;[   23.259250] ata2.00: configured for MWDMA1&lt;br /&gt;[   23.259684] ata2: EH complete&lt;br /&gt;[   44.105592] ata2: lost interrupt (Status 0x5)&lt;br /&gt;[   44.105752] ata2: drained 4 bytes to clear DRQ.&lt;br /&gt;[   44.105815] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen&lt;br /&gt;[   44.105954] scsi 3:0:0:0: CDB: Inquiry: 12 00 00 00 60 00&lt;br /&gt;[   44.106456] ata2.00: cmd a0/01:00:00:60:00/00:00:00:00:00/a0 tag 0 dma 96 in&lt;br /&gt;[   44.106480]          res 40/00:02:00:24:00/00:00:00:00:00/a0 Emask 0x4 (timeout)&lt;br /&gt;[   44.106798] ata2.00: status: { DRDY }&lt;br /&gt;[   44.106970] ata2: soft resetting link&lt;br /&gt;[   44.259253] ata2.00: configured for MWDMA1&lt;br /&gt;[   44.259674] ata2: EH complete&lt;br /&gt;[   65.105597] ata2: lost interrupt (Status 0x5)&lt;br /&gt;[   65.105758] ata2: drained 4 bytes to clear DRQ.&lt;br /&gt;[   65.105819] ata2.00: limiting speed to PIO4&lt;br /&gt;[   65.105946] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen&lt;br /&gt;[   65.106086] scsi 3:0:0:0: CDB: Inquiry: 12 00 00 00 60 00&lt;br /&gt;[   65.106655] ata2.00: cmd a0/01:00:00:60:00/00:00:00:00:00/a0 tag 0 dma 96 in&lt;br /&gt;[   65.106679]          res 40/00:02:00:24:00/00:00:00:00:00/a0 Emask 0x4 (timeout)&lt;br /&gt;[   65.106954] ata2.00: status: { DRDY }&lt;br /&gt;[   65.107128] ata2: soft resetting link&lt;br /&gt;[   65.262031] ata2.00: configured for PIO4&lt;br /&gt;[   65.262467] ata2: EH complete&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-134815719700802434?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/134815719700802434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2010/03/slow-boot-due-to-libata-problems-with.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/134815719700802434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/134815719700802434'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2010/03/slow-boot-due-to-libata-problems-with.html' title='Slow boot due to libata problems with mwdma2'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-7333814421954099175</id><published>2009-12-17T08:52:00.001-08:00</published><updated>2009-12-23T02:37:10.091-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Linux Tips: Vim autoconfigure for different filetypes</title><content type='html'>Thanks to Ajay Somani, over at http://ajayfromiiit.wordpress.com/ for &lt;a href='http://ajayfromiiit.wordpress.com/2006/06/02/vim-applying-separate-settings-for-different-file-types-for-experienced-users-of-vim/#comment-7745'&gt;this post&lt;/a&gt; that finally helped me solve a long term gripe with vim.&lt;br /&gt;&lt;br /&gt;When I'm in 'programmer' mode, I use vim with syntax highlight turned on.&lt;br /&gt;When I'm in 'wannabe fiction writer' mode, I use it with spell check turned on.&lt;br /&gt;&lt;br /&gt;And these two personas keep fighting like Jekyll and Hyde. Because I have both of these turned on, vim insists on syntax highlighting my fiction, interpreting apostrophes as quotes and then coloring everything after them. Worse still, it spell-checks my C-code. It'll highlight some text in red, and then spell-check it, and decide it's mis-spelt, and thus surround it in a background colored.... red. This results in large blocks of red-on-red text that cannot be... uh... read.&lt;br /&gt;&lt;br /&gt;The solution, it turns out, is to add this magic line to my vimrc:&lt;br /&gt;&lt;br /&gt;autocmd BufEnter *.txt set spell&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically autocmd is a way of specifying a vim command...&lt;br /&gt;&lt;br /&gt; I don't believe this, vim is coloring every instance of its own name in purple as I type this. I'm pretty sure it's doing this out of pure vanity.&lt;br /&gt;&lt;br /&gt;... anyways autocmd specifies commands to be run when an event happens. the 'BufEnter' event, though it doesn't sound like it has anything to do with files (and indeed, sounds vaguely rude) gets run whenever you start editing a new document (which by and large, means a file). It takes a command which is a pattern to match a file name. Then you supply the command, in my example 'set spell', which only turns spelling on for .txt files. So:&lt;br /&gt;&lt;br /&gt; autocmd BufEnter &amp;lt;file pattern&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;&lt;br /&gt;Another useful one, I find, is:&lt;br /&gt;&lt;br /&gt;autocmd BufEnter *.xml set nosyntax&lt;br /&gt;&lt;br /&gt;Because I'm often confronted by .xml documents that have no line breaks, and are just one HUGE line. This really upsets vim if you have syntax highlighting turned on, because I think it normally does syntax hilighting a line at a time, not bothering with those lines that aren't being displayed. But when faced with an xml document that's just a single giant line, it has to highlight the whole document, and the user can go off and make a cup of tea while it does so.&lt;br /&gt;&lt;br /&gt;I'm sure there are lots of other uses for the various events that autocmd supports, and if anyone knows any, I encourage them to comment here!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-7333814421954099175?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/7333814421954099175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/12/linux-tips-vim-autoconfigure-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7333814421954099175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7333814421954099175'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/12/linux-tips-vim-autoconfigure-for.html' title='Linux Tips: Vim autoconfigure for different filetypes'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-4281991230665270020</id><published>2009-12-16T01:27:00.001-08:00</published><updated>2009-12-16T01:27:29.300-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><title type='text'>HTTPS: No one uses it</title><content type='html'>I spent a whole night battling to get secure http working in 'Movgrab', only to discover that no-one uses it. I couldn't find a single proxyserver that supported 'straight' https (some of them might support use of the 'upgrade' header, but as of right now, I don't understand that). So then I switched to using https to connect directly to video-sharing websites. Any google website (youtube, videos.google.com) bounces me straight to www.google.com if I try to use https. Many other sites let you use it for the initial connection, but insist on redirecting you to http: when you try to get video. The rest don't support https at all.&lt;br/&gt;&lt;br/&gt;I don't know, I would have thought that in these days of 'Web 2.0' secure browsing would have been the norm by now.&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-4281991230665270020?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/4281991230665270020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/12/https-no-one-uses-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/4281991230665270020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/4281991230665270020'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/12/https-no-one-uses-it.html' title='HTTPS: No one uses it'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-5236909752694430547</id><published>2009-12-15T02:19:00.001-08:00</published><updated>2009-12-15T02:19:35.282-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Colum&apos;s Projects'/><category scheme='http://www.blogger.com/atom/ns#' term='Movgrab'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Hey, movgrab people!</title><content type='html'>So, I posted movgrab to www.freshmeat.net on Sunday. Since then, I've not heard anything, but through my &lt;a href='http://statcounter.com'&gt;advanced psychic superpowers&lt;/a&gt; I happen to know that visits to my new technical blog have jumped dramatically. The only explanation for this, I believe, is that people are downloading movgrab, and seeing the mention of my blogs on the help-page (or the website they download it from).&lt;br/&gt;&lt;br/&gt;So, if you're coming here having used movgrab, leave a comment. Did it compile on your system? Does it work as advertised? Will it change your life? Did using it open a portal to the dungeon dimensions (if it did, and you're thinking of suing, you're out of luck, I included a disclaimer covering exactly this eventuality).&lt;br/&gt;&lt;br/&gt;Come on people, I needs to know!&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-5236909752694430547?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/5236909752694430547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/12/hey-movgrab-people.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5236909752694430547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5236909752694430547'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/12/hey-movgrab-people.html' title='Hey, movgrab people!'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-6664727201858036822</id><published>2009-12-13T20:52:00.000-08:00</published><updated>2009-12-13T21:03:57.667-08:00</updated><title type='text'>My first code release up on freshmeat!</title><content type='html'>Big day for me today. I've been writing software projects for simply years, maybe even decades, and every one of them has grown and grown, but it's never finished, it's never ready for release. Finally I've gotten my first project completed!&lt;br /&gt;&lt;br /&gt;Okay, it's a fairly trival app. &lt;b&gt;Movgrab&lt;/b&gt; is a command-line app for downloading flash/mp4/mp3 movies and audio from websites that offer that kind of thing. This is useful to we linux luddites who are still using machines that most people wouldn't even use for email these days (for instance, I've got a bunch of pentium-1 laptops that I use as 'holiday' or 'travel' laptops, because no one is likely to bother stealing them, and if they get smashed or something, then I've not lost very much). On weedy machines like the one I'm typing this blog-post on, web-browsers like firefox don't run well. Unfortunately light-weight webbrowsers don't support flash. The solution? Download the movies and watch them with a command line player, rather than in a web-browser.&lt;br /&gt;&lt;br /&gt;There are other downloader applications out there of course, but few of them are command-line 'C' programs like movgrab. Most of them require you to install scripting languages and libraries, which can be a headache, I find. Also, few of them support as many download types as movgrab does (including BBC iplayer, youtube, metacafe, dailymotion, crazymotion, uchannel, various university webcasts etc, etc).&lt;br /&gt;&lt;br /&gt;More important than the app is the underlying library ('libUseful') that allowed it to be written. Writing movgrab meant adding a lot of code to the library to support HTTP transfers, and this is being used in a lot of other projets too.&lt;br /&gt;&lt;br /&gt;So, there is a new website over at &lt;a href="http://sites.google.com/site/columscode"&gt;http://sites.google.com/site/columscode&lt;/a&gt;, where one can download this first of my masterpieces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-6664727201858036822?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/6664727201858036822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/12/my-first-code-release-up-on-freshmeat.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6664727201858036822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6664727201858036822'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/12/my-first-code-release-up-on-freshmeat.html' title='My first code release up on freshmeat!'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-1291587791321496198</id><published>2009-11-29T10:18:00.000-08:00</published><updated>2009-12-01T04:17:12.974-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='undelete'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='data recovery'/><title type='text'>Linux tips: Recovering lost text data from disk, or EVEN MEMORY</title><content type='html'>Okay, first new post for the new 'technical' blog. The topic is "Holy ****!!! I just had my browser/text editor crash, and I've lost all that work! What do I do now?"&lt;br /&gt;&lt;br /&gt;Well, so long as the editor you were using stores it's data in some form of plain text, and so long as you are using linux, freebsd, or some other unix, (or possibly Mac OSX), I may be able to help.&lt;br /&gt;&lt;br /&gt;&lt;font color=red&gt;&lt;br /&gt;WARNING: These techniques, like any secret powers, come with a degree of risk. I take no responsibility for any accidents where you wipe your hard-disk, explode your computer, or accidentally sell your soul to the devil. In fact I take no responsiblity for anything at all. You have been warned.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I use opera as a web-browser, and every now and then it crashes. This often happens when I'm in the middle of typing a big old 'mr angry' post onto a web-forum somewhere. Other times, I'm writing code, or SF stories (I am, like so many people, a wannabe writer) and a muscle spasm causes me to kick the power-supply of my computer, disconnecting it. Or there's a power cut. Or more often than this it's the shameful &lt;b&gt;FAIL!!&lt;/b&gt; of doing 'rm -r -f' in the wrong place.&lt;br /&gt;&lt;br /&gt;Fortunately, I've always (so far) been able to recover my work when such things happen. The tool I use for doing this is 'grep'.&lt;br /&gt;&lt;br /&gt;Now, as you probably know, 'grep', whose name stands for 'Get Regular ExPression' is a tool that prints out lines matching a certain pattern in a file. But, if you had a file, you wouldn't have lost the work, would you? Well, lets consider our old freind, the ill reckless 'rm -r -f'. You thought you were in the /tmp directory, but actually you were in the /home/MyLifesWork directory, and now you've wiped all that oh-so-important stuff. You do have backups of course, don't you?&lt;br /&gt;&lt;br /&gt;Well, if you don't, you may be able to at least recover any plain-text documents. When you 'delete' a file, what generally happens is that the chunk of hard-disk that the file was on gets marked as being free for re-use. But it doesn't get 'wiped clean', the data is still in there. So long as you can find this chunk of hard-disk and read the data out of it before it gets used again, you can recover much, maybe all, of your work.&lt;br /&gt;&lt;br /&gt;You'll need to be 'root', i.e. the superuser on the unix box you are trying to recover from. As ever, mistakes made as 'root' can be disasterous, so be sure you know what you are doing. (Me, I'm always logged in as 'root'. Yes, I know, that's really bad practice. Do as I say, not as I do).&lt;br /&gt;&lt;br /&gt;Linux has a directory called '/dev'. In this directory are 'virtual files'. These are not files in the sense we would normally understand them, but rather the input-output endpoints of device drivers. Devices like your hard-disk and computer memory appear in /dev as though they were files. You can read and write to the entire hard-disk, as though it were one giant file. I really wouldn't recommend writing anything to these files, as this is a good way to wipe your hard-disk clean!! BE VERY SURE YOU KNOW WHAT YOU ARE DOING HERE.&lt;br /&gt;&lt;br /&gt;So, depending on what kind of hard-drive you have, the device files will probably be called something like '/dev/hda' or '/dev/sda' for the first hard-drive, and '/dev/hdb' etc for the second. In addition to this, there will be device files for the partitions on those hard-drives, named like '/dev/hda1', '/dev/hda2' etc.&lt;br /&gt;&lt;br /&gt;If you know a word or phrase that occurs in your lost document, you can do &lt;br /&gt;&lt;br /&gt;&lt;code&gt;grep "My phrase" -a /dev/hda2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;to grep for it in the entirity of the 2nd partition on the 1st hard-drive. Further, you can redirect this output to a file like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;grep "My phrase" -a /dev/hda2 &gt; /tmp/MyPhrase.save&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;However, there is a danger here. The 'lost file' takes up a chunk of hard-disk that is available for re-use, so the second that you start writing to '/tmp/MyPhrase.save', you run the risk of overwriting the very data you are hoping to recover! It's better, if you have another partition you can use, to copy the data onto that partition, not the partition that you are trying to recover data from. For example, you might have a usb-disk or pendrive that you can mount on /mnt, and then redirect to '/mnt/MyPhrase.save' rather to '/tmp/MyPhrase.save'. This will mean that you aren't writing onto the same hard-disk you are trying to recover from. If it's a usb-disk, this might be slow, but better slow than overwritten!&lt;br /&gt;&lt;br /&gt;Well, this is all very well, but grep only returns lines that contain the searched for phrase. You want the whole document! Well, grep takes two command-line arguments:&lt;br /&gt;&lt;br /&gt;-A &lt;number of lines&gt;   Return &lt;number of lines&gt; after matching line&lt;br /&gt;-B &lt;number of lines&gt;   Return &lt;number of lines&gt; before matching line&lt;br /&gt;&lt;br /&gt;For instance, half the reason that I'm writing this post right now, is that I lost my 'Margaret Atwood: Bad girl, or just Misunderstood?' post that I was writing for my other 'non technical' blog in a freak accident. I was able to recover it by grepping for 'Misunderstood'. I knew that 'Misunderstood' would be at the start of the document, so I only had to use '-A', like this&lt;br /&gt;&lt;br /&gt;&lt;code&gt; grep -a Misunderstood -A 200 &gt; /tmp/MA.save &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will cause grep to print out every line it finds with 'Misunderstood' in it, and also the 200 lines that follow that one. &lt;br /&gt;&lt;br /&gt;If I'd known that 'Misunderstood' was at the end of the document, then I'd have used -B. If my search phrase is mid-way through, then I'd use -A and -B in combination to grep lines before and after the phrase.&lt;br /&gt;&lt;br /&gt;Okay, so we have our file of saved data. Unfortunately, that's only the beginning. Looking in the file with a text-editor (I recomend 'vi') you will find that, frankly, it's full of crap. Oh, your missing work is in there somewhere, but there's loads of extra stuff been pulled along with it. You'll have to go through and pluck your work from the mess. Sorry, that's how it is. &lt;br /&gt;Also, if your missing document is fairly large, it's unlikey that it will all have been stored in one place on disk. So, I grepped 'Misunderstood', and that got the the first third or so of my blog-post. To get the rest, I had to grep for other words. grepping 'Atwood' returned all kinds of chunks of the document, and in the end I was able to sew these back together into my original text. It's a messy proceedure, but in the end, it works.&lt;br /&gt;&lt;br /&gt;One tool that can help you with this is 'strings'. 'Strings' takes a file, and only prints out the text in it that uses a restricted set of human-readable characters. Most of the 'control characters' and binary stuff, it throws away. So one could either do:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt; &lt;br /&gt;grep -a Misunderstood -A 200 &gt; /tmp/MA.save&lt;br /&gt;cat /tmp/MA.save | strings &gt; /tmp/MA.strings&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;&lt;code&gt; &lt;br /&gt;grep -a Misunderstood -A 200 | strings &gt; /tmp/MA.save&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And this will eliminate some of the mess that you have to consider.&lt;br /&gt;&lt;br /&gt;But here's something else about my lost 'Margaret Atwood' post. It wasn't saved on disk at all, I was typing it into a text box in my opera browser when, for some reason best known to itself, opera went 'plink'. How can you recover something that's not even written to disk, an only existed in the memory being used by a given application?&lt;br /&gt;&lt;br /&gt;Well, it depends if your unix operating system blanks all memory down when it is freed. Some 'ultra secure' versions of unix do this (you can patch the linux kernel to do this) to ensure that someone naughty, who is logged in as root, can't use these techniques to look into memory you are using, and see all your dirty little secrets. However, if you don't have such an 'ultra secure' unix, you may be in with a chance. Indeed, about an hour ago, I managed to recover my 'Margaret Atwood' blogpost from memory.&lt;br /&gt;&lt;br /&gt;First off you should probably shut down as many programs as you can, to prevent them from grabbing the memory that your 'crashed' application has just given up. WHATEVER YOU DO, DO NOT TURN OFF OR REBOOT YOUR COMPUTER, as this will obviously blank all memory.&lt;br /&gt;Then, if you look in /dev, you'll see a file /dev/mem. This file lets you view your memory as a file, just as you can view hard-drive partitions as a file, so all the same proceedures can be used to recover something that's still hanging around in memory.&lt;br /&gt;&lt;br /&gt;The results of grepping /dev/mem tend to be even messier than grepping hard-drive partitions, but your work should be in there somewhere.  You'll have to find the chunks and join them together.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you were editing an html document, you might find that it's full of things like '%20' indicating a space. You can replace these using 'sed'&lt;br /&gt;&lt;br /&gt;cat /tmp/MA.save | sed "s/%20/ /g" &gt; /tmp/MA.cleaned&lt;br /&gt;&lt;br /&gt;similarly for any other characters that have been 'quoted' using the http quote method. Characters like '/' and '"' and '[' have special meanings to sed, so you'll have to quote them with '\' in your sed command, so that sed knows what you mean. For instace:&lt;br /&gt;&lt;br /&gt;cat /tmp/MA.save | sed "s/%2F/\//g" &gt; /tmp/MA.slashes&lt;br /&gt;&lt;br /&gt;if you wrote '/' instead of '\/', sed will get confused, because it uses '/' to divide 'thing to replace' and 'thing to replace it with'.&lt;br /&gt;&lt;br /&gt;So, that's all you need to recover text, html, and probably a few other 'text based' formats.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Good luck. You'll probably need a little luck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-1291587791321496198?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/1291587791321496198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/11/linux-tips-recovering-lost-text-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1291587791321496198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1291587791321496198'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/11/linux-tips-recovering-lost-text-data.html' title='Linux tips: Recovering lost text data from disk, or EVEN MEMORY'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-5033861082793319511</id><published>2009-11-29T09:58:00.000-08:00</published><updated>2009-11-29T11:36:09.739-08:00</updated><title type='text'>I christen this blog...</title><content type='html'>So, I'm starting up a second blog. Why? Well, my first blog was about my efforts to be a writer, my sundry opinions on the state of Science Fiction and the political issues within it, and technical linux hackery. These things did not play well together. People who knew me from my 'writerly' efforts were completely bamboozled by posts full of 'grep | cut -c 1-10 | sed "s/apple/pear/" | tr ':' ' ''&lt;br /&gt;&lt;br /&gt;And can you blame them?&lt;br /&gt;&lt;br /&gt;But, on the other hand, my rare 'technical' posts got the most satisfying feedback, when people said "Hey! This really helped me to do something!", so I'm starting up this 'Linux techy' blog to turn alongside my main blog over at &lt;a href="http://thesingularitysucks.blogspot.com"&gt;thesingularitysucks.blogspot.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First I'll be transfering over my old 'linux' posts, and then I'll come up with something new to say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-5033861082793319511?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/5033861082793319511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/11/i-christen-this-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5033861082793319511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/5033861082793319511'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/11/i-christen-this-blog.html' title='I christen this blog...'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-4522155292651047977</id><published>2009-06-20T08:48:00.000-07:00</published><updated>2009-11-29T11:39:55.113-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='By-voice'/><category scheme='http://www.blogger.com/atom/ns#' term='speech synthesis'/><category scheme='http://www.blogger.com/atom/ns#' term='geeky'/><category scheme='http://www.blogger.com/atom/ns#' term='Online Services'/><title type='text'>By-Voice: Free online text-to-speech synthesis</title><content type='html'>I stumbled across a cool little service at &lt;a href='http://api.by-voice.com/buyer/plans'&gt;by-voice.com&lt;/a&gt;. Basically, this is a simple web-service by which you can get text converted to computer-generated speech. The service works by making a HTTP request to by-voice, which means its a little awkward for everyday users, but it's wonderful for programmers, because you could, if you were to sign up to the service fully, write programs that would on-the-fly download speech and play it.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The free service gives you 200 speech-generation credits a month. But unfortunately this doesn't mean 200 downloads, as we shall see later.&lt;br/&gt;&lt;br/&gt;There are a bunch of different 'speakers':&lt;br/&gt;&lt;br/&gt; carlos - Spanish (European) Male Voice&lt;br/&gt; laura - Spanish (European) Female Voice&lt;br/&gt; amaya - Spanish (European) Female Voice&lt;br/&gt; jennifer - English (US) Female Voice&lt;br/&gt; daniel - English (UK) Male Voice&lt;br/&gt; jane - English (US) Female Voice&lt;br/&gt; celia - Spanish (Mexican) Female Voice&lt;br/&gt; oriol - Catalan Male Voice&lt;br/&gt; meritxell - Catalan Female Voice&lt;br/&gt; empar - Valencian Female Voice&lt;br/&gt; amaia - Basque Female Voice&lt;br/&gt; adriana -  Portuguese (European) Female Voice&lt;br/&gt; julia -  Portuguese (brazilian) Female Voice&lt;br/&gt; brigitte - French Female Voice&lt;br/&gt; freire - Galician  Male Voice&lt;br/&gt; javier - Spanish (Argentina)  Male Voice&lt;br/&gt; isabel - Spanish Female Voice&lt;br/&gt;&lt;br/&gt;Unfortunately they can only read text in their own languages, which is a shame because I'd quite like to have my laptop speak to me in exotic female voices.&lt;br/&gt;&lt;br/&gt;Anyways, to use the service you have to sign up and get sent a 'developer key' in your email. Then you can download voices by crafting a web-url like this:&lt;br/&gt;&lt;br/&gt;http://www.by-voice.com/ttsonline/get_speak_3scale.php?account=your3scalekey&amp;amp;voice=carlos&amp;amp;format=mp3&amp;amp;text=hola%20mundo&lt;br/&gt;&lt;br/&gt;This one will make 'Carlos' say 'Hola mundo!', which I suspect is "Hello World" in spanish. Notice that you have to change 'account=your3scalekey' to be whatever the key you got in the email was. Furthermore, note that all spaces in the speech-text have to be replaced by '%20', which is the standard HTTP quote mechanism.&lt;br/&gt;&lt;br/&gt;Obviously, you can change the speaker by changing the 'voice=' argument. So, 'voice=jane' gets you speech in a female US accent. If you send her "Hola mundo" though, she'll probably make a terrible mess of it, best to make her say "Hello World".&lt;br/&gt;&lt;br/&gt;'format=' can be changed to 'format=wav' if you want microsoft .wav files. However, they cost more credits. Yes, I'm afraid that you can't just keep downloading as many phrases as you like, the free sign-up only gets you 200 credits. 200 is a lot, right? Well, no, a credit is PER CHARACTER, so you can quickly use up all your free credits, and have to wait a month before you get another 200. For some strange reason each character spoken in .mp3 format costs only 1 credit. The same character in .wav costs 4 credits.&lt;br/&gt;&lt;br/&gt;Still, you can have lots of fun with this, and I'm even thinking of signing up to the 45 euro paying plan for a month, which gives 45000 credits. To be honest though, I think by-voice would do better to have a web-frontend where you could by just the credits you need, when you want them.&lt;br/&gt;&lt;br/&gt;Okay, here's how to use the service under Linux. There are a bunch of command-line programs one can use under linux that will copy the contents of a web-url to disk, wget, curl, etc etc. I use 'links -source', which uses the links webbrowser as a downloader rather than a browser. So:&lt;br/&gt;&lt;br/&gt;links -source  "http://www.by-voice.com/ttsonline/get_speak_3scale.php?account=your3scalekey&amp;amp;voice=carlos&amp;amp;format=mp3&amp;amp;text=hola%20mundo" &amp;gt; hola_mundo.mp3&lt;br/&gt;&lt;br/&gt;Will get the file for me. Notice that I had to put the whole url in quotes, this is because '&amp;amp;' is a special character for the shell, and will confuse things if you don't quote the string.&lt;br/&gt;&lt;br/&gt;Obviously, typing in that url all the time is a pain, so I wrote a trivial little script, 'byvoice.sh':&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;VOICE=jennifer&lt;br/&gt;KEY=&amp;lt;insert your developer key here&amp;gt;&lt;br/&gt;FORMAT=mp3&lt;br/&gt;&lt;br/&gt;TEXT=`echo $* | sed "s/ /\%20/g"`&lt;br/&gt;&lt;br/&gt;links -source "http://www.by-voice.com/ttsonline/get_speak_3scale.php?account=$KEY&amp;amp;voice=$VOICE&amp;amp;format=$FORMAT&amp;amp;text=$TEXT"&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This does all the work like replacing spaces in the text, so now I can just type&lt;br/&gt;./byvoice.sh "Battery low" &amp;gt; BatteryLow.mp3&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;And I have my .mp3. Sometimes you have to play about a little with the text to get them to say it right. For instance, wanted speech to tell me when Dan Carlin updates his 'hardcore history' podcast. I started with:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;./byvoice.sh "New hardcore history podcast available" &amp;gt; NewHardcoreHistory.mp3&lt;br/&gt;&lt;br/&gt;Unfortunately 'Jane' isn't familiar with the word 'podcast', and pronounces it 'powwdcast'. I solved this by breaking it into two words 'pod cast'. Then she gets it right.&lt;br/&gt;She does even worse with 'Hardcore', managing to pronounce it to sound like 'Hard porn', which is not something that I want to have coming out of my laptop when others are around (hence, all the 'hardporn podcast' alerts are silent!). The solution here was to replace the 'c' in 'core' with 'k'. So finally:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;./byvoice.sh "New hardkore history pod cast available" &amp;gt; NewHardcoreHistory.mp3&lt;br/&gt;&lt;br/&gt;And I have what I want. But then I'd used up all my credits.&lt;br/&gt;&lt;br/&gt;So, there it is. Go over to 'www.by-voice.com' to play with it, although start off with SHORT sentences if you want to get anywhere with your 200 credits.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-4522155292651047977?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/4522155292651047977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/06/by-voice-free-online-text-to-speech.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/4522155292651047977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/4522155292651047977'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/06/by-voice-free-online-text-to-speech.html' title='By-Voice: Free online text-to-speech synthesis'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-6145028030360323935</id><published>2009-06-07T06:13:00.000-07:00</published><updated>2009-11-29T11:40:43.780-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='geeky'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>Linux Tips: SSH</title><content type='html'>It's been a while since I posted, having gotten most of my rants off my chest in the early days of the blog. Rather than just spout my opinions again, I thought I'd do some posts about Unix/Linux tricks that I find myself using time and again.&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;First up, uses of secure shell 'SSH'. These tricks should work with any unix that has an ssh command, so they should also work with MacOSX, I think. Obviously, you need two machines for them to communicate between, or it's all pointless.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ssh is a rather wonderful tool, it's like telnet but encrypted. (If you don't know what telnet is, then it's probably not for you.)&lt;br/&gt;&lt;br/&gt;SSH isn't just able to work as a remote terminal, you can pipe the output of a command into it, and send that to a remote machine. Or you can run the command on the remote machine, and have it's output come spewing out of SSH.&lt;br/&gt;&lt;br/&gt;Run a command on a remote machine (in this case the date command), and see it's output:&lt;br/&gt;&lt;br/&gt; ssh user@remote_machine.com "date"&lt;br/&gt;&lt;br/&gt;Run a command on a remote machine and pipe it's output to a file:&lt;br/&gt;&lt;br/&gt; ssh user@remote_machine.com "cat /var/log/messages" &amp;gt; messages.remote_machine&lt;br/&gt;&lt;br/&gt;Run a command on a remote machine and pipe it's output to a local command (this should get the recent diagnostic messages from the remote machine, and pipe them into a mail command on the local machine).&lt;br/&gt;&lt;br/&gt; ssh user@remote_machine.com "dmesg" | mail colum&lt;br/&gt;&lt;br/&gt;Run a command on the local machine, and send it's output to the remote (sends the diagnostic messages from the local machine, and counts the lines in it on the remote. I know it's not very useful, but it's just an example, okay?)&lt;br/&gt;&lt;br/&gt; dmesg | ssh user@remote_machine.com "wc -l"&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;One thing I consistently use this for is shifting large numbers of files from one machine to another using the 'tar' command, like this:&lt;br/&gt;&lt;br/&gt;tar -zcO file1 file2 *.dat | ssh colum@remote_machine.com "mkdir Backups; cd Backups; tar -zxf -"&lt;br/&gt;&lt;br/&gt;if you don't know tar, it's an old-school 'zip' utility for unix. The '-zxf' is a condensed form of the command line switches '-z -x -f', as tar lets you run them together. The tar command&lt;br/&gt;&lt;br/&gt; tar -z -c -f tarfile.tar.gz file1 file2&lt;br/&gt;&lt;br/&gt;Makes a 'tarfile' called tarfile.tar.gz, and this is compressed using gzip compression:&lt;br/&gt;  -z = use gzip compression&lt;br/&gt;  -c = create tarfile&lt;br/&gt;  -f &amp;lt;filename&amp;gt;&lt;br/&gt;&lt;br/&gt;you can unpack the tarfile with -zxf tarfile.tar.gz, where 'x' means 'extract files'.&lt;br/&gt;&lt;br/&gt;To do our 'send to remote' trick though, we need to not make a tarfile, but to pump the tar output to standard out, which we can then pipe into our ssh command. The command line switch for this is '-O', which, if you don't pipe it into anything, will cause tar output to spew all over your screen. Logically, if 'send to standard output' is '-O', then 'read from standard input' should be '-I'. But it's not, to do this you type '-f -', and this gives us our full command:&lt;br/&gt;&lt;br/&gt; tar -z -c -O files | ssh user@somewhere "tar -z -x -f -"&lt;br/&gt;&lt;br/&gt;You can add extra commands to the command line at either end, provided they don't print out any output, which will confuse tar. Usually these are commands to make or change directories:&lt;br/&gt;&lt;br/&gt; cd /home/colum/mywork ; tar -zcO files | ssh user@somewhere "cd /home/colum/mywork.backup; tar -zxf -"&lt;br/&gt;&lt;br/&gt;if you want better compression during the send, and have the bzip command on your system, try replacing '-z' in the command line switches with '-j'. Obviously we have to do this at both ends.&lt;br/&gt;&lt;br/&gt;If you want to 'Pull' files from the remote machine, rather than 'Push' too it, do this:&lt;br/&gt;&lt;br/&gt; ssh user@somewhere "tar -zcO *" | tar -zxf -&lt;br/&gt;&lt;br/&gt;Obviously '*' will back up all files in the login directory on the remote machine. You knew that, right?&lt;br/&gt;&lt;br/&gt;Another thing I use this for, is synchonizing clocks between machines. The 'date' command will take the command-line-switch '-s &amp;lt;date&amp;gt;' which lets you set the date/time on a machine. So a short script like:&lt;br/&gt;&lt;br/&gt;DATE=`date`&lt;br/&gt;ssh root@remote_machine "date -s \"$DATE\""&lt;br/&gt;&lt;br/&gt;Will set the date, provided that the user has access rights to do such things (which is why the login in 'root' here). Notice the horrible quoting of the $DATE argument on the remote machine. This is because we have to stop spaces in the date being interpreted as breaks between arguments, because the date is all one argument. So we need \" in order that the local machine doesn't try to interpret quote marks intended for the remote machine.&lt;br/&gt;&lt;br/&gt;Another use, is watching for changes in files that shouldn't change on a remote machine. You can use the 'md5sum' command to get an md5 checksum for each file. An 'md5 checksum', in case you don't know, is a string of gobbledegook that is supposed to be unique to a file, i.e., no two files should have the same md5. Now, it's actually true that, as there are an infinite number of possible files and an md5 string is only so many bytes long, there *must* be an infinite number of files that have the same checksum. However, the likelyhood of your ever encountering two such files in normal use is vanishingly small. It's the same reasoning as the fact that there is a real possibility of all, or most, of the air molecules in your room choosing to move up one end of it, leaving a suffocating vacuum at the other end. However this never happens because it's tremendously unlikely, as air molecules famously can't get their shit together to be that organized. If you waited forever, you would see it happen, in fact, if you waited for an infinite amount of time, you'd see it happen infinite times. But it's utterly unlikely that you'll see it in your flickeringly brief lifetime, human.&lt;br/&gt;&lt;br/&gt;Anyways, I routinely check the /bin /sbin /usr/bin /usr/sbin directories on linux servers, as these directories contain standard programs that should never change. If they do change, then something or someone has changed them, and this may indicate foul play.&lt;br/&gt;&lt;br/&gt;ssh user@remote_machine "md5sum /bin/* /sbin/* /usr/bin/* /usr/sbin/* | sort" &amp;gt; remote-files.md5&lt;br/&gt;&lt;br/&gt;This gives me a sorted file with md5 sums of the programs in it. Once I have this, I can get a fresh version each day, and write that to a different file, say 'remote-files.latest.md5' and then use a diff command to do a compare between the two. Something like this:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;ssh user@remote_machine "md5sum /bin/* /sbin/* /usr/bin/* /usr/sbin/* | sort" &amp;gt; remote-files.latest.md5&lt;br/&gt;&lt;br/&gt;VAL=`diff remote-files.md5 remote-files.latest.md5 | grep "^&amp;lt;" | wc -l`&lt;br/&gt;&lt;br/&gt;if [ "$VAL" -gt 0 ]&lt;br/&gt;then&lt;br/&gt;&lt;br/&gt;echo "EEEK!! What's going on!?" | mail -s "Files changed on remote machine!" colum@somewhere.com&lt;br/&gt;&lt;br/&gt;fi&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Note that the 'diff' command produces complex output, containing, amongst other things, the lines from each file that differ. The lines from 'file 1' are prefixed with a '&amp;lt;' and the lines from file 2 with a '&amp;gt;'. This means you get two lines for each difference (at least). Grepping for lines starting with '&amp;lt;' means you get an accurate count of the number of differences.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Okay, getting more advanced, an easy way to do incremental backups is to use 'md5sum' to checksum files on both machines, and then use 'diff' to find differences between these. Here's the script:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;cd mywork&lt;br/&gt;&lt;br/&gt;find . -exec md5sum {} \; | sort &amp;gt; /tmp/mywork-local.md5sum&lt;br/&gt;ssh colum@remote_machine "cd mywork ; find . -exec md5sum {} \; | sort" &amp;gt; tmp/mywork-remote.md5sum&lt;br/&gt;&lt;br/&gt;diff /tmp/mywork-local.md5sum /tmp/mywork-remote.md5sum  | grep '^&amp;lt;' | cut -d ' ' -f 4- &amp;gt; /tmp/mywork.diff&lt;br/&gt;&lt;br/&gt;tar -T /tmp/mywork.diff -zcO | ssh colum@remote_machine "cd mywork; tar -zxf -"&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This will build md5 checksums of the files in the directory 'mywork' on both machines, compare them for differences, and then backup those differences from one machine to another.&lt;br/&gt;&lt;br/&gt;We have to use 'find' to run md5sum against all the files, because md5sum doesn't come with a useful 'recursive' option to say 'If there's a directory, go into that, and md5sum the files in that too'.&lt;br/&gt;&lt;br/&gt;Then we do a diff between the two lists. Diff produces output that only shows lines that differ between the two files, and prefixes them with '&amp;lt;' or '&amp;gt;' to indicate which file the line is taken from. So, if we do:&lt;br/&gt;&lt;br/&gt;diff /tmp/mywork-local.md5sum /tmp/mywork-remote.md5sum | grep '^&amp;lt;'&lt;br/&gt;&lt;br/&gt;Then we only get the lines that say 'this is different on the local machine'. The following 'cut' command then clips out the filename from the md5sum output line, so finally we have a list of filenames. We use the '-T' option to tell tar to take the list of files to archive from a file (our diff output file) and thus we are sending only those files that are different between the two machines, to the remote machine.&lt;br/&gt;&lt;br/&gt;Okay, the final thing. All the way through, if you've been trying any of these commands, you'll have found that SSH prompts you for a password. Obviously, if you are wanting to make scripts like these automated to do backups or what-have-you, then this is a problem. The solution is to use 'public key authentication', though this can be a bit of a flog to set up.&lt;br/&gt;&lt;br/&gt;SSH accepts a command line switch '-i &amp;lt;filename&amp;gt;', which tells it a file that contains a public key to use to authenticate. So far, so easy, but setting a machine up to accept this always seems a little awkward. Basically:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;1) as the user that is going to log into the system, run the command 'ssh-keygen'. It will ask you a bunch of stuff, just hit 'enter' to accept defaults every time.&lt;br/&gt;&lt;br/&gt;2) You should now have, in the directory '.ssh' in the users home directory, two files. id_rsa and id_rsa.pub. Rename id_rsa.pub to be 'authorized_keys' and set it to have read-write permissions only for the file owner (so 'ls' shows: '-rw-------' )&lt;br/&gt;&lt;br/&gt;3) you will have to make sure that the users home directory, and the .ssh home directory only have read, write and execute permissions for that user (this can be a problem with 'actual' user directories, best to create a user especially for automated processes to log in).&lt;br/&gt;&lt;br/&gt;4) Take the other file that ssh-keygen produce ('id_rsa') and put it on the machine that you want to log in from. You can then log in with:&lt;br/&gt;&lt;br/&gt;ssh user@remote_machine -i id_rsa&lt;br/&gt;&lt;br/&gt;This won't ask for a password (unless something went wrong with the setup) so it's usable for automated processes running on a 'cron job' overnight.&lt;br/&gt;&lt;br/&gt;Personally, I tend to rename the 'id_rsa' file to be 'id_rsa.name_of_remote_machine',  because that way I can store a bunch of them in the same directory together, and I can also write scripts that work through machine after machine, simply by doing something like this:&lt;br/&gt;&lt;br/&gt;for MACHINE in "machine1 machine2 machine3"&lt;br/&gt;do&lt;br/&gt;ssh user@$MACHINE -i id_rsa.$MACHINE "md5sum /bin/*" &amp;gt; $MACHINE.md5&lt;br/&gt;done&lt;br/&gt;&lt;br/&gt;Obviously, for this to work you have to rename the id_rsa files to be id_rsa.machine1 and id_rsa.machine2 etc, and you have to have something that maps 'machine1' to an ip address. I normally just put entries for them in the hosts file of the machine I'm logging in from.&lt;br/&gt;&lt;br/&gt;Okay, I think that's enough of that. If you understood it, then I hope some of it is some use to you!&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-6145028030360323935?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/6145028030360323935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/06/linux-tips-ssh.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6145028030360323935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/6145028030360323935'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/06/linux-tips-ssh.html' title='Linux Tips: SSH'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-7234332804951136554</id><published>2009-05-04T05:41:00.000-07:00</published><updated>2009-11-29T11:41:22.360-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cybercrime'/><category scheme='http://www.blogger.com/atom/ns#' term='Computer Security'/><category scheme='http://www.blogger.com/atom/ns#' term='lusers'/><title type='text'>The Hacker Will Always Get Through</title><content type='html'>&lt;br/&gt;The BBC currently has a program up on the explosion in cybercrime.&lt;br/&gt;&lt;br/&gt;http://www.bbc.co.uk/iplayer/episode/b00jyyl0/Hacked_to_Pieces/&lt;br/&gt;&lt;br/&gt;Initially this program had me shouting "No! No! No! You just don't get it!", but eventually it did a twist-in-the-tail and hit the real reason that cybercrime is so rife:&lt;br /&gt;&lt;br /&gt;Computer users are stupid.&lt;br /&gt;&lt;br /&gt;I'm sorry, I know it's not a pleasant truth, we would far rather believe that there are these fiendishly clever, evil people out there who are doing super-clever things, and that's why people get hacked. But the truth is never pleasant, is it?&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The simple fact is that a lot of people who get hacked, deserve to get hacked. And I can put my hand up here and say that I once did something stupid myself. I was in a youth hostel, and wanted to connect to my home computer and read my mail. I use Secure Shell to do this, and was surprised to see that there was a secure-shell program right there on the desktop. That's a rather surprising thing, I thought it was suspicious at the time, but I clicked on it and used it. And lo and behold, someone got into my default account on my computer (fortunately there wasn't much there that they could do, as they lacked the higher-level passwords needed to switch to other accounts). But still, I was stupid, and things followed from that. I'd been stupid, and got hacked, and deserved it.&lt;br/&gt;&lt;br/&gt;However, in most programs I see that address these issues, there is often a focus on the infrastructure that criminals use to organize themselves. Take IRC. When people here that criminals generally use IRC as their meeting place, there's often crimes of "Why isn't that taken down? *I* don't use IRC, clearly it is only used by criminals! Remove it and the criminal problem will go away." No, it won't. The criminals will just move onto another communication method. This is equivalent to living in a world in which everyone leaves their front doors open, but the popular solution to the resulting crime is that the roads are too open. The roads allow criminals to move easily from place to place, and make good their escape, and that what we need to do is put roadblocks and checkpoints everywhere, or even dig the roads up!&lt;br/&gt;&lt;br/&gt;The problem that leads to cybercrime is that most people leave their front doors open, and in fact, we've been leaving our front doors open since the dawn of consumer computing:&lt;br/&gt;&lt;br/&gt;1) Most computer users *still* don't understand the basics of computing. I've had people who claim to be 'computer literate' refuse to send me a document in plain-text because they can't figure out how to do 'advanced' stuff like that. They just use all the default options of their operating system. They've got no concept of the issues behind using one document format, or another, nor of the issues of downloading stuff randomly from the net and installing it on your computer.&lt;br/&gt;&lt;br/&gt;2) Most computer users will still run a mysterious program they get sent in the mail, or click on a link that promises to show them something 'fun'.&lt;br/&gt;&lt;br/&gt;3) We've created a monoculture of operating systems. One operating system rules the planet, allowing hackers to focus all their effort on that one system. This is equivalent to everyone on the planet using the same locks, even with each lock taking the same key.&lt;br/&gt;&lt;br/&gt;4) The operating system we've selected for dominance is, and always has been, radically insecure (though it has started getting better recently). Indeed, most computer software is radically insecure, using unencrypted network connections and storing personal data unencrypted on disk. Why? Because:&lt;br/&gt;&lt;br/&gt;   Security doesn't matter.&lt;br/&gt;&lt;br/&gt;No one cares about security. Users don't care about security. If there is a new, cool widget out there with some security issues, users will download it and install it. When you try to point out to them that it might be making them more vulnerable to attack, they will look at you, blink, and carry on with what they are doing.&lt;br/&gt;Because users don't care about security, so software writers don't care about security. Security features don't sell. Pretty graphics and animated icons and 'cool' is what sells. Until users start to care about security, *really* care about security, security won't sell.&lt;br/&gt;&lt;br/&gt;Consider Active X. There is no good reason that I can think of for web-masters to still be using active X controls, but they still do. Active X is a means of sending little programs to run on your computer, which is an inherently insecure thing. Java does the same thing, but tries to make it more secure by not allowing the program to write to disk or gain access to other system resources. Flash is another approach. Most of the time these technologies really aren't useful, they are just there to do flashy animations that the web-pages don't really need. Every sensible user should block these by default.&lt;br/&gt;But many people let them through by default, because constantly being told "Please enable flash...", "You need to download an active X.." etc etc, gets annoying. And, sooner or later, they will come across some 'cool' thing that they've just got to have access to. Maybe it will be a youtube video, maybe it will be Angelina Jolie naked, maybe it will be a little online game. People don't really *need* any of these things, but they are generally prepared to compromise their system security to get at them.&lt;br/&gt;&lt;br/&gt;Consider firewalls: People pull down their firewalls. Back when I used to frequent IRC, I frequently came across people who weren't running a firewall, because it "Got in the way." Sometimes I'd connect to their machine and tell them what I could see on their hard-drive, in order to put the fear of god into them, but most times I wouldn't bother, they weren't going to listen anyway.&lt;br/&gt;&lt;br/&gt;Consider passwords: People accept the 'Do you want me to remember your password for you?' option on web-browsers. This means that somewhere on their computer is stored the password they use for a website. Is it stored in encrypted form? No, of course it isn't! You are forgetting the rule "Security doesn't matter". If it were properly encrypted, you'd have to use a 'master password' to access it. Any encryption system that doesn't ask for a password, isn't real encryption. But people don't want to have to remember passwords, any password, so they'll always go for storing their password insecurely on their laptop.&lt;br/&gt;I've known people to store their passwords this way on publicly accessible computers, so they can always come back to the same computer and log right in.&lt;br/&gt;&lt;br/&gt;Consider email: People send each other games  and 'dancing baby videos' (are you sure it's a video, and not a program?) in email. No one ever stops to think "Hang on, can I trust this game/video/whatever?" No, they just hit send. I've seen companies in which the staff email this kind of junk to each other across the company network. Then, some weeks later, the company gets a computer virus. Everyone is SOOOOOO surprised.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I could go on, and on, and on, and on. The reason cybercrime is so prevalent, and so *easy* is the users. And this isn't just ma-and-pop who don't understand computers, this is corporate interests too.  If security gets in the way of anything that someone can claim, no matter how ridiculously, is interfering with the work of the company, security loses, and is taken down. If security requires users to remember passwords, it loses, and is removed. If security gets in the way of people seeing funny pictures, or dancing babies or having some cool new feature on their desktop, security loses, and is taken down.&lt;br/&gt;&lt;br/&gt;Security always loses.&lt;br/&gt;Hackers always win.&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-7234332804951136554?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/7234332804951136554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/05/hacker-will-always-get-through.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7234332804951136554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7234332804951136554'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/05/hacker-will-always-get-through.html' title='The Hacker Will Always Get Through'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-3232397938278775453</id><published>2009-04-18T16:31:00.000-07:00</published><updated>2009-11-29T11:42:13.283-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='webbrowsers'/><category scheme='http://www.blogger.com/atom/ns#' term='bloat'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Decline of linux'/><category scheme='http://www.blogger.com/atom/ns#' term='google chrome'/><title type='text'>Why Open Source needs another decent Webbrowser</title><content type='html'>The Open Source world needs another decent web-browser.&lt;br/&gt;&lt;br/&gt;Why?&lt;br/&gt;&lt;br/&gt;Well this ties up with a lot of issues related to how open source, and particularly linux, has been changing over the years, and how, in many ways, I believe that open source is becoming increasingly irrelevant and less open.&lt;br/&gt;&lt;br/&gt;Way back when I started using linux the arguments in its favour were hard for the windows using crowd to understand, but there were some that they could get their head around.&lt;br/&gt;&lt;br/&gt;1) Linux was fast. I'd start up applications, and they'd pop into existence on the desktop. They might be primitive looking compared to what you'd get under windows, but they did the job well enough, and people's eyebrows would raise when my PC booted in ten seconds flat once it had got through the bios stage.&lt;br/&gt;&lt;br/&gt;2) Linux was small and undemanding. You could fit it on almost any piece of hardware more powerful than a 486. Old kit that windows users were unable to use any more worked fine for linux, and to this day I use a bunch of circa 1995 AST laptops running linux, so that I can take them anywhere and if they get stolen, what have I really lost?&lt;br/&gt;&lt;br/&gt;3) Linux was reliable. It didn't lock up or crash like windows. There was no 'Blue screen of death', or if there was, it normally meant you had hardware problems, like your processor fan had stopped turning, and the CPU had thus overheated.&lt;br/&gt;&lt;br/&gt;4) Linux didn't get viruses/trojans/hacked. This had a lot to do with it being simple and primitive, meaning fewer openings for exploits, and also that it didn't try to do everything for the user (and hence be too ready to open files and run programs that really it shouldn't be messing with). If you did 'ps ax', you could look through a short list of processes, and know what each of them did, and spot any that shouldn't be there (and I once detected some naughtiness going on with just this method).&lt;br/&gt;&lt;br/&gt;There were other features that they didn't understand, but which were very important to me. I could get the code for programs, and compile it myself. If they didn't do some little thing that I wanted, or if they blew up unexpectedly, I could go in there and try to fix them, or add the thing that was lacking, or sometimes even take features out that, for one reason or another, I particularly didn't want. I could, and did, learn lots from looking at other people's code, and how they did things.&lt;br/&gt;What's more, there were generally many programs available for linux to do a given task, each with its own advantages and failings. I could pick the one that was most right for me. When once, I heard another linux user saying "You should just use program X, and no other", I looked at him aghast and said "In that case, I should just use windows and be done with it. Linux is about choice. If it's not about choice, it's not about anything."&lt;br/&gt;&lt;br/&gt;This was what open source meant for me. Oh yes, and it was free too, which was the main thing that the windows users REALLY understood. But for me the ability to choose, modify, understand and take ownership of the programs I ran, that was what was really important.&lt;br/&gt;&lt;br/&gt;And it's all gone to hell since then.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically gtk and qt and Gnome and KDE came along, and linux slowly became windows. GTK and Qt are 'widget sets', which means they are libraries of buttons, and edit boxes, and progress bars, and what have you. Unix has always offered a choice of these to developers. But gtk and qt became the two 'big boys', and big they certainly were.&lt;br/&gt;Over the years I've had cause many times to compile gtk, and every time it's gotten harder to do. Every time the results have been bigger, fatter and more bloaty, and as any self-respecting geek will tell you, the more bloaty software is, the more untrustworthy it is. Gtk now has a distressing number of sub-libraries that you have to compile to get it to compile itself, and I actually find that compiling that other monster of the UNIX world, the X-windows display system, is quicker and easier than gtk. In terms of memory demands these widget sets are monsters, so item 2 of the list of linux advantages is already gone.&lt;br/&gt;The resulting programs are slow too. When I start up opera or firefox, there's always that period of time when one gets to thinking "Is it really starting up, or has something gone wrong? Oh no, I can hear the hard-drive churning away, it's still starting up." So, advantage 1 is gone.&lt;br/&gt;&lt;br/&gt;GNOME and KDE are the 'desktop environments' that are built upon either GTK (for GNOME) or Qt (for KDE). These are collections of programs that all work together to produce the look and feel of the operating systems desktop. At work I've got a KDE desktop. I can't speak for GNOME, as I've never used it, but I can say that once I started using KDE, I started seeing crashes and lockups. Windows users would look at me, grinning and say "I thought linux didn't do that?" and all I could say was "it didn't... used to."&lt;br/&gt;&lt;br/&gt;And they'd ask me "Why are you using it?"&lt;br/&gt;And I had no answer.&lt;br/&gt;&lt;br/&gt;Oh, it's still got the edge in many things. Microsoft are always able to stay one step ahead by producing something like Vista that's ridiculously demanding in terms of memory and processing power (Two GIG? Are you sure you mean gig, and not meg? TWO GIG?) slow, broken (Webdav, anyone?) and unhelpful (What do you mean my old programs won't run anymore?). But linux is seriously catching up. Nowadays, linux demands way too much memory and processing power (the stock answer being "well memory is cheap"). I find myself having to reboot, which once I never did. Programs are slow to start, and sometimes slow to use ("Well, you need a more powerful computer"), and it's hard to find programs that do useful things, and don't require the two great monsters, gtk or qt ("Well, you should use the STANDARD programs, not something else"). What's more, gtk and qt are such monsters, that it's meaningless to look at their thousands and thousands and thousands of lines of code, and I generally wonder how many people really understand it.  When I do a "ps ax" under KDE, I see legions of mysterious programs running that are presumably part of KDE. I have to use an 'official' distribution (like RedHat, Suse, or Ubuntu) of linux if I want things like firefox, because I can no longer get them to compile on my own, so I can't make my own distribution of programs that I've selected.&lt;br/&gt;&lt;br/&gt;Linux isn't small any more.&lt;br/&gt;It's not fast.&lt;br/&gt;It's not reliable.&lt;br/&gt;It does crash sometimes.&lt;br/&gt;I can't make sense of a lot of it.&lt;br/&gt;I can't make my own linux from basic parts, as in former times.&lt;br/&gt;I think it's probably not as secure, it's so big and complex now that there must be a thousand nooks, crannies and holes for a hacker or virus to hide.&lt;br/&gt;&lt;br/&gt;So, what is the advantage, exactly?&lt;br/&gt;&lt;br/&gt;Well, I can still make my own linux from basic parts, and I do. And it's generally fast, and it generally runs on low-end hardware, and I've got far better control and if something breaks, I can generally fix it. But there's one vital thing that it lacks.&lt;br/&gt;&lt;br/&gt;A decent webbrowser.&lt;br/&gt;&lt;br/&gt;Because if you want a webbrowser, then you need either gtk for firefox, or qt for opera/konqueror, and then you're back to a windows-style linux. Why not just use windows, and I.E. and be done with it?&lt;br/&gt;&lt;br/&gt;So, when google chrome turned up in the windows world recently, I was at first infused with hope. Who knows what widget set they would use? But, google chrome for linux still hasn't turned up, and if it ever does I've come to realise that they'll almost certainly use gtk or qt, not something small and fast like fltk or even, perish the thought, one of the old motif clones. So, it will be big, fat, slow, and demanding. It'll be no use for me.&lt;br/&gt;&lt;br/&gt;The webbrowser I use most on my home-grown systems, is links. Links stopped really progressing as a browser some time ago, but it's about the only lightweight graphical browser that can handle some javascript, can kinda handle frames and iframes, etc etc etc. It's admittedly got a very clunky user interface. One is often struck how, with just a little more work, it really could have been a much better user experience. But it starts up fast, and it's fast to use, and it will run on old systems with no memory, and it works even in text mode as well as graphical, allowing me to use it over ssh links, and maybe allowing blind people to use it with braille keyboards.&lt;br/&gt;However, a while ago the links team said that, in their next release, they were going to take javascript support OUT. So, it's actually stepping backwards in terms of its important features. More and more websites require javascript (often for mysterious reasons. Click on this link, and it triggers some javascript that... takes you to another web-page. That's odd, why couldn't you have just used and old-fashioned straight-forward html link to do the same thing? What does the javascript do that I don't know about), and other than firefox, opera, and konqueror, all gtk/qt based, there is no browser that offers these.&lt;br/&gt;Don't be telling me about the 'alternative' browsers like Galeon or Skipstone. Most of these use the core engine from Mozilla/Firefox, so they are just Firefox in drag. They've got the same demands and requirements, so I can't easily build them on my systems.&lt;br/&gt;&lt;br/&gt;What I want from open source these days, is a small fast web-browser that does most things, not everything, but most. That somehow handles frames and iframes and javascript, and yet doesn't demand me to buy a new computer just to run it.&lt;br/&gt;&lt;br/&gt;Google Chrome for linux could be that browser.&lt;br/&gt;&lt;br/&gt;But it won't be, will it?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-3232397938278775453?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/3232397938278775453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/04/why-open-source-needs-another-decent.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3232397938278775453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/3232397938278775453'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/04/why-open-source-needs-another-decent.html' title='Why Open Source needs another decent Webbrowser'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-1817475440249890286</id><published>2009-02-22T03:48:00.000-08:00</published><updated>2009-11-29T11:36:09.732-08:00</updated><title type='text'>Blogger API: I'm impressed</title><content type='html'>&lt;p&gt;Well, I'm impressed.&lt;/p&gt;&lt;p&gt;I've managed to figure out the blogger A.P.I. sufficiently to write a little command-line app that lets me type up my posts in an editor (vi) and then post them to blogger. Why would I want this? Well, my laptops are weedy things that I got for free, and which date from the 1990's. Full-featured modern browsers run painfully slowly on them. I normally use 'links' as my preferred web-browser. Now, you look at links, and yes it's clunky, and yes, the pages don't render as they 'should', but it *mostly* works. It's small and fast. Then you look at firefox, opera, konqueror and co. They work on many more sites, and have more features, but to get this extra 10% of functionality, they are utterly huge and slow with masses of dependancies. Something isn't quite right with this picture, I feel. But this is a rant for another day.&lt;/p&gt;&lt;p&gt;For me, writing my posts in 'vi', and then sending them later, is the ideal solution. It's quick and easy, and 'vi' recovers it's data effectively after a power-cut or what-have-you. However, most things these days, are hideously overengineered, and if a company decides to let others 'hook into' their systems, it usually involves downloading and using libraries, and before long your system is littered with libraries that you use for one app.&lt;/p&gt;&lt;p&gt;So, finding documentation that tells you 'connect to this address, send this HTTP transaction, you have now posted to your blog', is damn impressive. This is the way it should be, open, and fairly simple. Took me about an hour to get it working. All hail google.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;Colum&lt;/p&gt;&lt;p/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-1817475440249890286?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/1817475440249890286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/02/blogger-api-i-impressed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1817475440249890286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/1817475440249890286'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/02/blogger-api-i-impressed.html' title='Blogger API: I&amp;#39;m impressed'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8441087078477003568.post-7344005105100270209</id><published>2009-02-19T08:37:00.000-08:00</published><updated>2009-11-29T11:36:09.725-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DRM'/><category scheme='http://www.blogger.com/atom/ns#' term='Cory Doctorow'/><category scheme='http://www.blogger.com/atom/ns#' term='Copyright'/><title type='text'>Cory doctorow on the history of copyright</title><content type='html'>&lt;a href="http://www.youtube.com/watch?v=maQ5YFEko8Y"&gt;Here&lt;/a&gt; (you tube) is a must-see public speech by Cory Doctorow explaining the work of the Electronic Frontier Foundation, and the politics surrounding DRM and copyright. Pity the sound quality is poor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8441087078477003568-7344005105100270209?l=idratherhack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/7344005105100270209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://idratherhack.blogspot.com/2009/02/cory-doctorow-on-history-of-copyright.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7344005105100270209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default/7344005105100270209'/><link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/2009/02/cory-doctorow-on-history-of-copyright.html' title='Cory doctorow on the history of copyright'/><author><name>Colum</name><uri>http://www.blogger.com/profile/04780753778872137937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
