tag:blogger.com,1999:blog-84410870784770035682024-03-12T18:54:18.046-07:00I'd Rather HackBeing the technical blog of Colum Paget, rather than his 'ranting into the void' one.Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.comBlogger42125tag:blogger.com,1999:blog-8441087078477003568.post-43629768227005437772013-03-10T13:55:00.001-07:002013-03-10T13:55:19.274-07:00New project 'Crayonizer' on Freecode
I just posted a new project, 'Crayonizer' onto Freecode. Crayonizer is a simple program that 'colors in' the output of other programs. You either use bash aliases or symbolic links so that crayonizer gets called when you run, say, gcc. It then runs gcc for real, and colors in the output. You can get it <a href='http://sites.google.com/site/columscode/files/Crayonizer-0.1.tgz'>here</a>. Here's a gratuitous screenshot: <br/> <br/><img src='http://sites.google.com/site/columscode/files/crayonize-ifconfig.jpg'/> <br/> <br/>With this project I've discovered that freecode will censor your release descriptions. For instance, I wrote: <br/> <br/>"Will probably compile under OSX if the wind's blowing in the right direction" <br/> <br/>but this appears on freecode as: <br/> <br/>"May compile under OSX" <br/> <br/>And the slogan: <br/> <br/>"Console purtyfication for the people!" <br/> <br/>is reduced to: <br/> <br/>"Console purtyfication." <br/> <br/>So I guess that brevity is still the soul of wit. <br/> <br/> <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com2tag:blogger.com,1999:blog-8441087078477003568.post-54760898825830855622013-02-21T04:51:00.001-08:002013-02-21T04:51:00.512-08:00Installing Another Operating System on Lenovo Think Centers
If you've recently bought a Lenovo Think Center, or any other PC that's "Windows 8 Enabled", you've likely discovered that you can't install your own choice of operating system (i.e. Linux) on it, it just keeps coming up "operating system not found". <br/> <br/>This is because of a 'feature' called <a href='http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface'>UEFI</a>, which is basically a new form of bootloader that only very recent (as of Feb 2013) operating systems support. In order to boot from CD on recent PC's, you need to find the BIOS settings for this and turn it off. <br/> <br/>On the Lenovo Think Center this setting is in 'Startup' and is called 'CSM'. Given that this is a vitally important setting to configure your PC, you'd think that a three-letter-acronym might not be the best choice for naming it. Better to name it something like "Enable Loading Legacy Operating systems" or "Disable Lenovo Useless Brick Mode". But no, it's just 'CSM' for 'Compatiblity Support Module'. You need to enable this in order to load your choice of operating system. <br/> <br/>Another setting that might be relevant is under the 'Security' tab. This setting is 'Secure Boot'. You might need to disable this, or set it to 'setup mode' to allow installing of a new operating system. <br/> <br/>Well, this is what worked for me. Hopefully this post will help others. <br/> <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com34tag:blogger.com,1999:blog-8441087078477003568.post-32445118137913446332012-12-27T10:05:00.001-08:002012-12-27T10:05:40.117-08:00I'm at Chaos Communications in Hamburg
<img height='' width='200' src='http://events.ccc.de/wp-content/uploads/2012/12/blinkenwall.jpg'/> <br/> <br/>I'm at the <a href='http://events.ccc.de'>Chaos Communications Congress</a> in Hamburg. There's not much to recognize me by, I'm just the guy dressed all in black (like that really narrows it down) who is using an ancient compaq laptop with bits missing off it, and who speaks no German. <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-6608213328754911532012-12-07T05:53:00.001-08:002012-12-07T05:53:04.619-08:00Movgrab Popularity now 600
This week saw the release of version 1.1.14 of Movgrab, resulting in its 'Freecode/Freshmeat' popularity rating rising to over 600! Like all measures of popularity the freecode rating is... a number, that means... something. Maybe. Still, whether it's a meaningless figure of not, I still get a thrill out of watching it go higher. <br/> <br/>This release adds support for files > 2GB on Gnu systems, adds support for downloading from Animehere, and fixes a problem with downloading 3gp files from youtube. All these changes/bugs were suggested or reported by movgrab users. Thanks to Karol Blazewicz, Deeice, Matthias B, Ndracs and others for taking the time to contact me, and thanks again to Abhisek Sanyal for his lifesaving patch to get youtube working again. Feedback from users is what will keep movgrab moving forwards! <br/> <br/>My other projects languish with ratings well below 100. I've not had time to really work on them, and most of them are 'first releases' that have serious bugs. It's time for movgrab to take the back seat for a while I think, and for someone else to have some attention. <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com2tag:blogger.com,1999:blog-8441087078477003568.post-45543330210618789512012-11-14T01:24:00.001-08:002012-12-03T13:01:47.608-08:00Movgrab Popularity Passes 500I don't quite know what the 'Popularity' ratings on freshmeat/freecode really mean, but movgrab has passed a new level, reaching a score of 541. I think this means it's really quite popular. It's now included in a number of linux distros, and one 'extra programs pack' for the mac.<br />
<br />
My other programs aren't getting anything like the same degree of love. I guess people don't need another FTP server, and Alaya, my dav aware webserver apparently still has too many bugs when run on other people's systems (hoping to solve those in a future release). Perhaps their time will come when they are more mature.Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com4tag:blogger.com,1999:blog-8441087078477003568.post-9646074602672678922012-07-10T09:12:00.001-07:002012-07-10T09:12:31.086-07:00Got a Question? Just ask.
I'm seeing someone coming to this blog from the google queries: <br/> <br/> movgrab commands size of file <br/> movgrab record time <br/> <br/> <br/>I get the impression that someone has some questions to ask about my 'movgrab' program. So, you can just ask me in the comments to this post, if you have! <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com20tag:blogger.com,1999:blog-8441087078477003568.post-29074407891466494792012-03-26T13:27:00.001-07:002012-03-26T13:27:42.907-07:00Ready for my close up, Mr DeMille
I've been quiet on this blog recently, busy, you know how it is. But I've got to boast about this, someone has made a youtube video about my movie downloader program 'movgrab'. <br/> <br/>It's at youtube: <a href='http://www.youtube.com/watch?v=R9YhoYay_Q4'>http://www.youtube.com/watch?v=R9YhoYay_Q4</a> <br/> <br/>Movgrab has been getting a lot of love recently, with people blogging about it all over the place. I've also had one or two feature requests that I'm going to try to implement sometime. But I must admit, I like the youtube vid best of all. <br/> <br/> <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-88254107421421898442011-12-21T02:53:00.001-08:002011-12-21T02:57:25.384-08:00Movgrab Popularity at 400Movgrab's <a href='http://freecode.com/projects/movgrab'>freshmeat</a> (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. <br /> <br />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). <br /> <br />One person has even written a nice-looking frontend to movgrab, I think this frontend comes as part of puppy linux. <br /> <br /><img src='http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=49832'/> <br /> <br />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. <br /> <br />Now it's time to get some other projects finished and uploaded!Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com6tag:blogger.com,1999:blog-8441087078477003568.post-9483279116913654592011-11-10T09:43:00.001-08:002011-11-10T09:43:25.931-08:00Using unix consolefonts in your programs
If you're running linux or another unix-style system, then you probably have a little-known directory in '/usr/share/consolefonts'. <br/> <br/>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: <br/> <br/> setfont drdos8x16 <br/> setfont cybercafe <br/> <br/>where the 'name' of the font is it's filename without path or extensions (setfont knows to look in /usr/share/consolefonts). <br/> <br/>This post is about how to decode these font-files for use in your own graphics programs. <br/> <br/>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. <br/> <br/>There's 3 types of font in the console font directory. <br/> <br/><b>1: Raw Fonts</b> <br/> <br/>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 '<ascii value> * 16'. <br/> <br/>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. <br/> <br/><b>2: PSF Fonts</b> <br/> <br/>These are very similar to 'Raw' fonts, except they have a header. This header starts: <br/> <br/> Byte 0: 0x36 <br/> Byte 1: 0x04 <br/> Byte 2: 'Mode' (256 characters or 512 characters) <br/> Byte 3: Character Height <br/> <br/>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. <br/> <br/>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. <br/> <br/><b>3: PSF2 Fonts</b> <br/> <br/>The most advanced type of console font, it seems, are an extended version of 'PSF' fonts, called 'PSF2' fonts. These have an enhanced header: <br/> <br/> Byte0: 0x72 <br/> Byte1: 0xb5 <br/> Byte2: 0x4a <br/> Byte3: 0x86 <br/> unsigned int version; <br/> unsigned int headersize; /* offset of bitmaps in file */ <br/> unsigned int flags; <br/> unsigned int length; /* number of glyphs */ <br/> unsigned int charsize; /* number of bytes for each character */ <br/> unsigned int charheight; <br/> unsigned int charwidth; <br/> <br/>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 + <ascii value> * 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. <br/> <br/>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'. <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-29214366069284179862011-11-09T03:26:00.001-08:002011-11-09T03:26:51.078-08:00Howto use Picasa API with Blogger API
<img src='http://lh5.ggpht.com/-VfOztfKNAxI/TrpjeNfuFfI/AAAAAAAAARk/LejZoKvcAaA/picasa.jpg'/> <br/><img src='http://lh3.ggpht.com/-LAud3JGXkew/TrpjepJ2ZkI/AAAAAAAAARo/Z19imud1A5U/blogger.jpg'/> <br/> <br/>When you use the blogger api, the pages you get back contain a type of tag called 'gd:extendedProperty'. These contain some useful data. <br/> <br/>Just do an http get to: <blogurl>/feeds/posts/default <br/> <br/>So, for this blog you are reading: http://idratherhack.blogspot.com/feeds/posts/default <br/> <br/>This will return a big mess o' xml, including the tags: <br/> <br/><gd:extendedProperty name='IS_PUBLIC_BLOG' value='true'/> <br/><gd:extendedProperty name='PICASAWEB_ALBUM_ID' value='5570923802870618657'/> <br/> <br/>It turns out that one of these (PICASAWEB_ALBUM_ID) is a link to the Picasa album that is used by your blog. <br/> <br/>You can use this link to upload pictures using the picasa api documented here <a href='http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html'>http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html</a>. <br/> <br/>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. <br/> <br/> <br/> <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-74023438753762385532011-10-18T02:35:00.001-07:002011-10-18T02:35:56.789-07:00Can you do Rocket Science?
<img height='' width='200' src='http://www.mutationpress.com/web_intro_html_44c21662.png'/> <br/> <br/>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. <br/> <br/>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? <br/> <br/>Ian Sales' <a href='http://rocketsciencenews.wordpress.com'>Rocket Science</a> anthology coming out from <a href='http://www.mutationpress.com'>Mutation Press</a> (that's the award-winning Mutation Press) hasn't had enough non-fiction submissions, he says he's "Desperate" for them. <br/> <br/>He's also had nothing like as many submissions from women as he'd like, either of fiction or non-fiction. <br/> <br/>'Call for Submissions' is <a href='http://www.mutationpress.com/rocketscience.html'>here</a> <br/> <br/>Know something about rockets/space/hard sf? Want to tell the world about it? This is your chance. <br/> <br/> <br/> <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-9152320340126923572011-10-07T01:50:00.001-07:002011-10-07T01:50:39.402-07:00New release of my 'getlock' program
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. <br/> <br/>'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. <br/> <br/>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. <br/> <br/>Get it here: <br/> <br/><a href='http://sites.google.com/site/columscode/files/getlock-0.2.tar.gz?attredirects=0'>http://sites.google.com/site/columscode/files/getlock-0.2.tar.gz?attredirects=0</a> <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com1tag:blogger.com,1999:blog-8441087078477003568.post-15066030301117849762011-09-05T01:38:00.001-07:002011-09-05T01:38:24.523-07:00Disable Screen Blanking in Linux: How hard can it be?
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. <br/> <br/>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. <br/> <br/>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). <br/> <br/>Once upon a time, this would have been sufficient to turn off screen blanking at the console: <br/> <br/>setterm -blank 0 <br/> <br/>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 <br/> <br/>setterm -powerdown 0 <br/> <br/>But there is also 'powersave'. I don't know how this differs from powerdown, but you should also do <br/> <br/>setterm -powersave 0 <br/> <br/>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. <br/> <br/>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. <br/> <br/>Now, we start the dreaded 'X', and enter his (yes, 'X' is definitely male) dark cabinet of madness. <br/> <br/>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: <br/> <br/>xset -q <br/> <br/>This will print out the status of the various things that 'xset' can mess with. One of them will be: <br/> <br/>Screen Saver: <br/> prefer blanking: yes allow exposures: yes <br/> timeout: 1200 cycle: 600 <br/> <br/>If timeout is non-zero, then the screen saver will kick in after that many seconds. Turn it off with: <br/> <br/>xset s off <br/> <br/>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: <br/> <br/>DPMS (Energy Star): <br/> Standby: 1200 Suspend: 1800 Off: 2400 <br/> DPMS is Enabled <br/> <br/>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: <br/> <br/>xset -dpms <br/> <br/>And now, with luck, you should find that your screen doesn't blank. Maybe. <br/> <br/> <br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com6tag:blogger.com,1999:blog-8441087078477003568.post-7937065244510174632011-07-02T07:17:00.001-07:002011-07-02T07:17:29.841-07:00Stuff that Works Under Linux: Wifi
<img src='http://www.machackpc.com/wp-content/uploads/2009/11/NoWiFi.jpg'/><br/><br/>Finding hardware that works with linux can <font color='red'>STILL</font> 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 <b>NO ONE</b> 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.<br/><br/>I used to complain 'More people use linux than macs, so why do manufacturers keep supporting this dying platform, and ignoring linux?'<br/><br/>To which people would say: "Oh no, lots of people use macs"<br/><br/>To which I would respond, "Oh yeah? Anyone you know?"<br/><br/>People: "Well yes, sure."<br/><br/>Me: "Who?"<br/><br/>People: "Oh lots of people we know use macs. Lots."<br/><br/>Me: "Name one."<br/><br/>People: "Uh, well, there's... um... Jim?"<br/><br/>Me: "Jim? That's funny, you've never spoken of him before, he mustn't get out much. Does graphic design, does he?"<br/><br/>People: "Well yes, that's why he needs a mac. Uh-huh. Yes. Honest."<br/><br/>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).<br/><br/>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 <font color='magenta'>BECAUSE IT WASN'T SELLING ANYTHING</font>, 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.<br/><br/>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 "<font color='red'>SATAN IS LORD!!</font>"?). But still, I continue to wonder why linux is so badly supported.<br/><br/>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'.<br/><br/>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:<br/><br/><code><br/>int SendPacket(char *Destination, char *Data, int Length);<br/>int RecvPacket(char *Source, char *Data, int Length);<br/></code><br/><br/>Sorry, but that's not world-changing technology that anyone's going to steal! WE ALREADY HAVE THAT!<br/><br/>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 <a href='http://en.wikipedia.org/wiki/H.P. Lovecraft'>H.P. Lovecraft</a> story.<br/><br/>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.<br/><br/>Indeed so bad is the support for wifi cards in linux that someone's come up with something called <a href='http://en.wikipedia.org/wiki/ndiswrapper'>ndiswrapper</a> 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 <a href='http://en.wikipedia.org/wiki/perl'>perl</a>. I don't want to install perl just to use a piece of hardware/<font color='red'>COMPILE A KERNEL</font>/send an email/etc/etc/etc any more than I want to install Python to be able to compile X, gnome or KDE to <a href='http://rbelmont.mameworld.info'>play old arcade games</a> 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.<br/><br/>Meaning it <font color='red'>DIDN'T F****ING WORK!</font><br/><br/>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.<br/><br/>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 <strike>surplus sheeple</strike> everyday folks cast aside.<br/><br/><img src='http://www.bbc.co.uk/bradford/content/images/2006/07/20/a_womble_465x370.jpg'/><br/><br/>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.<br/><br/>Right, onto the devices.<br/><br/><img src='http://www.aria.co.uk/static/images/products/NET-SC-SWMULZ54.jpg'/><br/><br/><b>SAFECOM SWMULZ-5400</b><br/><br/>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 <a href='http://zydas.rapla.net/'>page listing devices that have this chipset</a>. 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.<br/><br/><br/><img height='300' width='300' src='http://i00.i.aliimg.com/photo/v3/308509660/WiFiSKY_10G_High_Power_USB_Wireless_Adapter.jpg'/><br/><br/><b>WIFI-SKY IDU-2850UG-10G</b><br/><br/>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.<br/><br/><br/><img src='http://ecx.images-amazon.com/images/I/31qFfrdsNuL._SL500_AA300_.jpg'/><br/><br/><b>TP-LINK TL-WN610G</b><br/><br/>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.<br/><br/><img src='http://ecx.images-amazon.com/images/I/414MNVMDJQL._SL500_AA300_.jpg'/><br/><br/><b>NETGEAR MA401</b><br/><br/>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.<br/><br/>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.<br/><br/><img src='http://www.shinyhardware.co.uk/includes/showimage.asp?path=747/WP-RT2561T.gif&width=300'/><br/><br/><b>PLUSCOM WP-RT2561T</b><br/><br/>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.<br/><br/><br/>Okay, that's the <font color='green'>good</font>, now for the <font color='red'>bad</font> and the <font color='purple'>ugly</font>.<br/><br/><br/><img src='http://www.belkin.com/images/product/F5D7050_v2/STD1_F5D7050_v2.jpg'/><br/><br/><b>Belkin products</b><br/><br/><font color='magenta'>YOU PAYS YOUR MONEY; YOU TAKES YOUR CHANCE</font> 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.<br/><br/>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.<br/><br/><br/><b>Linksys products:</b><br/><br/><font color='red'>AVOID</font> My experience is that they flat-out don't work under vanilla linux kernels.<br/><br/><b>D-Link "Air Plus G" and other products using the Texas Instruments 'Acx100' chipset</b><br/><br/><font color='red'>AVOID</font> 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.<br/><br/><br/>And that's all I've got.<br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com1tag:blogger.com,1999:blog-8441087078477003568.post-54746376711133824992011-06-22T00:47:00.001-07:002011-06-22T00:47:08.337-07:00Movgrab Status
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.<br/><br/>Checking youtube okay<br/>Checking metacafe BROKEN<br/>Checking dailymotion okay<br/>Checking break okay<br/>Checking ehow okay<br/>Checking vimeo BROKEN<br/>Checking almostkilled okay<br/>Checking 5min okay<br/>Checking vbox7 BROKEN<br/>Checking blip.tv okay<br/>Checking ted okay<br/>Checking myvideo okay<br/>Checking clipshack okay<br/>Checking mytopclip okay<br/>Checking redbalcony okay<br/>Checking mobango okay<br/>Checking berkeley okay<br/>Checking yale okay<br/>Checking sdnhm okay<br/>Checking uchannel BROKEN<br/>Checking princeton okay<br/>Checking uctv.tv okay<br/>Checking reuters okay<br/>Checking clipfish.de okay<br/>Checking liveleak okay<br/>Checking academicearth okay<br/>Checking photobucket okay<br/>Checking videoemo okay<br/>Checking videosfacebook okay<br/>Checking aljazeera okay<br/>Checking mefeedia okay<br/>Checking myvido1 okay<br/>Checking iviewtube okay<br/>Checking washingtonpost okay<br/>Checking cbsnews okay<br/>Checking france24 okay<br/>Checking euronews okay<br/>Checking metatube okay<br/>Checking motionfeeds okay<br/>Checking izlese BROKEN
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com1tag:blogger.com,1999:blog-8441087078477003568.post-42837311210125695042011-06-21T22:25:00.001-07:002011-06-21T22:25:08.380-07:00Movgrab at 300 popularity level on freshmeat
Hurrah!!<br/><br/>My video-downloader program <a href='http://freshmeat.net/search?q=movgrab&submit=Search'>'movgrab'</a> passes the meaningless but psychologically important level of 300 in its popularity score on freshmeat.<br/><br/>That makes it nearly as popular as <a href='http://freshmeat.net/projects/bitcoin'>Bitcoin</a><br/><br/>It's the most popular I've ever been!
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-30630359505009110452011-06-19T16:51:00.001-07:002011-06-19T16:51:50.509-07:00Three URL Shorteners that don't need authentication, XML or JSON
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.<br/><br/>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.<br/><br/>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 <url goes here> with an http-encoded url.<br/><br/>Cli.gs http://cli.gs/api/v1/cligs/create?appid=autoblog-0.1&url=<url goes here><br/><br/>Linkee http://api.linkee.com/1.0/shorten?format=text&input=<url goes here><br/><br/>Is.gd http://is.gd/create.php?format=simple&url=<url goes here><br/><br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-52586888403798004742011-06-18T08:11:00.001-07:002011-06-18T08:16:47.167-07:00Howto Change Blogger Settings with the GData APII'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.<br /><br />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. <a name='more'></a> That was a url of the form:<br /><br />http://idratherhack.blogspot.com/feeds/posts/default<br /><br /><br />But apparently I should have been looking up a special url of the form:<br /><br />http://www.blogger.com/feeds/8441087078477003568/posts/default<br /><br />Where the long number is a unique ID for my blog.<br /><br />To get this special url, you have to first authenticate, and then do a GET to:<br /><br />http://www.blogger.com/feeds/default/blogs<br /><br />This will return a big ol' mess o' XML:<br /><br /><code><br /><?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/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;A04NRno-fip7ImA9WhZbE0Q.&quot;'><id>tag:blogger.com,1999:user-04780753778872137937.blogs</id><updated>2011-06-18T12:26:37.456Z</updated><title>Colum's Blogs</title><br /><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs'/><br /><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs'/><br /><link rel='alternate' type='text/html' href='http://www.blogger.com/profile/04780753778872137937'/><br /><author><br /><name>Colum</name><br /><uri>http://www.blogger.com/profile/04780753778872137937</uri><br /><email>noreply@blogger.com</email><br /></author><br /><generator version='7.00' uri='http://www.blogger.com'> Blogger</generator><br /><openSearch:totalResults>2</openSearch:totalResults><br /><openSearch:startIndex>1</openSearch:startIndex><br /><openSearch:itemsPerPage>25</openSearch:itemsPerPage><br /><entry gd:etag='W/&quot;DUICSH49cSp7ImA9WhZbE0Q.&quot;'><br /> <id>tag:blogger.com,1999:user-04780753778872137937.blog-8441087078477003568</id><br /> <published>2009-11-29T11:35:11.006-08:00</published><br /> <updated>2011-06-18T04:46:09.069-07:00</updated><br /> <title>I'd Rather Hack</title><br /> <summary type='html'>Being the technical blog of Colum Paget, rather than his 'ranting into the void' one.</summary><br /> <link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs/8441087078477003568'/><br /> <link rel='alternate' type='text/html' href='http://idratherhack.blogspot.com/'/><br /> <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://idratherhack.blogspot.com/feeds/posts/default'/><br /> <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/posts/default'/><br /> <link rel='http://schemas.google.com/blogger/2008#template' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/template'/><br /> <link rel='http://schemas.google.com/blogger/2008#settings' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/settings'/><br /> <author><br /> <name>Colum</name><br /> <uri>http://www.blogger.com/profile/04780753778872137937</uri><br /> <email>noreply@blogger.com</email><br /> </author><br /> <gd:extendedProperty name='IS_PUBLIC_BLOG' value='true'/><br /> <gd:extendedProperty name='PICASAWEB_ALBUM_ID' value='5570923802870618657'/><br /></entry><br /><entry gd:etag='W/&quot;C08NR3oyeyp7ImA9WhZUGEQ.&quot;'><br /> <id>tag:blogger.com,1999:user-04780753778872137937.blog-8531648592648053901</id><br /> <published>2009-10-19T18:36:24.631+01:00</published><br /> <updated>2011-06-12T16:18:16.493+01:00</updated><br /> <title>The Singularity Sucks</title><br /> <summary type='html'> 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.</summary><br /> <link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/04780753778872137937/blogs/8531648592648053901'/><br /> <link rel='alternate' type='text/html' href='http://thesingularitysucks.blogspot.com/'/><br /> <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thesingularitysucks.blogspot.com/feeds/posts/default'/><br /> <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.blogger.com/feeds/8531648592648053901/posts/default'/><br /> <link rel='http://schemas.google.com/blogger/2008#template' type='application/atom+xml' href='http://www.blogger.com/feeds/8531648592648053901/template'/><br /> <link rel='http://schemas.google.com/blogger/2008#settings' type='application/atom+xml' href='http://www.blogger.com/feeds/8531648592648053901/settings'/><br /> <author><br /> <name>Colum</name><br /> <uri>http://www.blogger.com/profile/04780753778872137937</uri><br /> <email>noreply@blogger.com</email><br /> </author><br /> <gd:extendedProperty name='IS_PUBLIC_BLOG' value='true'/><br /> <gd:extendedProperty name='PICASAWEB_ALBUM_ID' value='5397308624374094369'/><br /></entry><br /></feed><br /></code><br /><br />Pretty gnarly, huh? It's even worse than this, I've cut a lot of stuff out.<br /><br />Notice that in all that guff, there are two <entry> 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.<br /><br />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')<br /><br />Howerver, there's two others that are mysterious to me, but interesting looking. These are the ones marked<br /><br /> rel='http://schemas.google.com/blogger/2008#template'<br /> rel='http://schemas.google.com/blogger/2008#settings'<br /><br />What can they be for?<br /><br />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:<br /><br /><code><br /><entry gd:etag='W/&quot;C0QDSHo4eCp7ImA9WhZbE0U.&quot;'><br /><id>tag:blogger.com,1999:blog-8441087078477003568.settings.BLOG_ADMIN_PERMISSION</id><br /><published>2009-11-29T11:35:11.006-08:00</published><br /><updated>2011-06-18T00:16:19.430-07:00</updated><br /><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-06-18T00:16:19.430-07:00</app:edited><br /><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#settings'/><br /><title>The list of administrators' emails for the blog.</title><br /><content>admin@googlemail.com</content><br /><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/settings/BLOG_ADMIN_PERMISSION'/><br /><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8441087078477003568/settings/BLOG_ADMIN_PERMISSION'/><br /></entry><br /></code><br /><br />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.<br /><br />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?<br /><br />Turns out that yes, they can.<br /><br />Doing an HTTP PUT to the 'edit' url of the setting thusly:<br /><br /><code><br />PUT /feeds/8441087078477003568/settings/BLOG_BACKLINKS_ALLOWED HTTP/1.1<br />Host: www.blogger.com<br />Content-Type: application/atom+xml<br />Content-Length: 342<br />Connection: Close<br />GData-Version: 2.0<br />Authorization: GoogleLogin auth=<Your auth token goes here><br /><br /><?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#settings'/><id>tag:blogger.com,1999:blog.settings.BLOG_BACKLINKS_ALLOWED</id><content>true</content></entry><br /></code><br /><br /><br />Allows you to change a setting. You should get a 200 OK response if it worked.<br /><br />Notice that you need to have this an id tag like this:<br /><br /><id>tag:blogger.com,1999:blog.settings.BLOG_BACKLINKS_ALLOWED</id><br /><br />Basically change 'BLOG_BACKLINKS_ALLOWED' for the name of whatever setting you're changing.<br /><br />And that's it. Have fun.Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com11tag:blogger.com,1999:blog-8441087078477003568.post-58463869301092134022011-06-18T08:10:00.001-07:002011-06-18T08:17:47.320-07:00Geeky Groups near Birmingham UKI'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.<br /><br />This new sociability probably started when I visited the <a href='http://en.wikipedia.org/wiki/c-base'>c-base</a> hackerspace in Berlin,<br /><br /><img height='' width='' src='http://www.pixtur.de/bsm/img/high/cbase01.jpg'/><br /><br />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, <b>literally</b> speaking I did, but someone kept filling the glass, so I feel there's shared responsiblity.<br /><br />Anyways, since then I've been to the <a href='http://nottinghack.org.uk/'>Nottinghack</a> 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).<br /><br /><a name='more'></a><br /><br />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:<br /><br /><br /><img height='' width='' src='http://ox4hs.utou.ch/dale/images/nottinghack_5700657913_784bf63cbc_z.jpg'/><br /><br /><img height='' width='' src='http://farm4.static.flickr.com/3008/5777749977_17d3433f4e_z.jpg'/><br /><br /><img height='' width='' src='http://nottinghack.org.uk/wp-content/uploads/2011/04/Moving-Hackspace-019-300x225.jpg'/><br /><br />It's <b>HUGE</b>. I should go and visit again!<br /><br />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!<br /><br /><a href='http://www.fizzpop.org.uk/'>FizzPop</a> 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.<br /><br />Once upon a time, they got to this level:<br /><br /><img height='' width='' src='http://farm3.static.flickr.com/2735/4122755025_ff1b7d7d74.jpg'/><br /><br />Let's hope they can get back there again.<br /><br />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.<br /><br />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.<br /><br />Finally I went to the <a href='http://sb.lug.org.uk/'>Birmingham Linux User Group</a>. 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.<br /><br />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.<br /><br />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.Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com3tag:blogger.com,1999:blog-8441087078477003568.post-69482141443428289462011-06-18T00:09:00.001-07:002011-06-18T08:18:54.544-07:00How to fix your broken Blogger client programFor 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.<br /><br />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.<br /><br />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.<br /><br /><a name='more'></a><br /><br />Turns out that some of us had misinterpreted the blogs 'posting endpoint' to be this<br /><br />http://idratherhack.blogspot.com/feeds/posts/default<br /><br />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.<br /><br />The endpoint we should have been using looks more like:<br /><br />http://www.blogger.com/feeds/8441087078477003568/posts/default<br /><br />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.<br /><br />1) Connect to your blog and pull it as an html page. Near the top you'll see an entry like:<br /><br /><link rel="service.post" type="application/atom+xml" title="I&#39;d Rather Hack - Atom" href="http://www.blogger.com/feeds/8441087078477003568/posts/default" /><br />The 'href' part of this gives you the url that you should use for posting to the blog.<br /><br />2) The more complex way is described in the <a href='http://code.google.com/apis/blogger/docs/2.0/developers_guide_protocol.html'>protocol document</a><br /><br /><br />1: Authenticate with google using client-login or Oauth.<br /><br />2: do an HTTP GET to http://www.blogger.com/feeds/default/blogs<br /><br />This will return a mass of XML that gives information regarding the authenticated user. Within this are entries like:<br /><br /><code><br /> <link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/profileID/blogs/blogID' /><br /> <link rel='alternate' type='text/html' href='http://blogName.blogspot.com/' /><br /> <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blogName.blogspot.com/feeds/posts/default' /><br /> <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.blogger.com/feeds/blogID/posts/default' /><br /></code><br /><br /><br />The important one is the one that has a 'rel' value of<br /><br />http://schemas.google.com/g/2005#post<br /><br />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.<br /><br />This XML also contains other interesting 'link' entries, like:<br /><br />rel=http://schemas.google.com/blogger/2008#setting<br />rel=http://schemas.google.com/blogger/2008#template<br /><br />the href of these gives endpoints that let you pull a list of settings or the template of the blog.<br /><br /><br />So basically, if you get this 'post' endpoint, and use that instead of http://<blogname>.blogspot.com/feeds/posts/default, you should find that your API program starts working again.Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com4tag:blogger.com,1999:blog-8441087078477003568.post-1195903874415263212011-05-27T14:33:00.000-07:002011-05-27T15:17:50.346-07:00Google's Blogger Service is BrokenSince 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 <a href="http://www.google.com/support/forum/p/blogger/thread?tid=4bd36d5355dbcf8c&hl=en"> here </a>. 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.<br /><br />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.<br /><br />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.<br /><br />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...<br /><br />These big companies aren't exactly covering themselves with glory these days. Would you really trust them with your business critical data?Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-34183205738239500642011-05-10T11:01:00.001-07:002011-05-10T11:01:13.704-07:00Things I wish people had told me about 1: Bind Mounts
Stuff I wish people had told me about No. 1
<br/>
<br/>Bind Mounts
<br/>
<br/>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.
<br/>
<br/>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.
<br/>
<br/>Just recently though, I discovered that you can do this:
<br/>
<br/>
<br/>mkdir /home/PublicData
<br/>mount --bind /home/PublicData /home/chroot/PublicData
<br/>
<br/>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.
<br/>
<br/>This means that you can choose which directories to make available to people who are in some kind of chroot jail. Very useful!
<br/>
<br/>I wish someone had told me about this earlier.
<br/>
<br/>
Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0tag:blogger.com,1999:blog-8441087078477003568.post-64695014830001964322011-04-12T03:38:00.001-07:002011-04-12T03:40:33.424-07:00Root's bash profile not working when suA 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!<br /><br /><br />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.<br /><br />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'.<br /><br />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.<br /><br />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.Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com2tag:blogger.com,1999:blog-8441087078477003568.post-84772612873960447692011-04-04T06:48:00.001-07:002011-04-04T06:52:28.476-07:00Nvidia drivers fail without 'smp_lock.h'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.<br /><br />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!Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com1tag:blogger.com,1999:blog-8441087078477003568.post-16327847165942898222011-02-07T04:28:00.000-08:002011-02-07T04:33:57.634-08:00I'm up on "Daily Science Fiction"<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://dailysciencefiction.com/images/buttons/logo.gif"><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="" /></a><br /><br />Well, on Friday my story "Imaginary Enemies" went out on the <a href="www.dailysciencefiction.com">Daily Science Fiction</a> 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.<br /><br />Actually, I was kinda hoping it would change me, but no signs yet.<br /><br />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!!Columhttp://www.blogger.com/profile/04780753778872137937noreply@blogger.com0