Printable PDF Handouts from OpenOffice Impress
Monday, August 30. 2010
Last week I was preparing a training course for a client, and I wanted to print the slides nicely for the attendees to refer to and make notes on etc. The slides were done, I'd talked to my friendly printers (Mailboxes etc in Leeds) and all I needed to do was generate the handouts. Which was fine until I googled for help with doing that from OpenOffice, only to find that although it has this awesome "Export to PDF" functionality for documents, slides, etc, it wasn't going to do it for handouts.
I'm an ubuntu user, and it turns out that there's a clever package called cups-pdf which installs a pretend printer, and anything you could print, you can turn into a PDF. Brilliant. I installed it with aptitude and instantly I had a printer named "PDF" which printed to a /home/lorna/PDF directory.
I also wanted to add a cover page to my document, before I sent the whole thing to the printers in a PDF file for them to print and bind. For this I simply created an OpenOffice document and used the usual export to PDF. By the magic of twitter, I got some great advice from EmmaJane and installed the package PDFShuffler which enabled me to combine the two documents and save the result as a PDF.

By the magic of open source, I have beautiful handouts :) Printing in Linux really has come a long way, I can't thank the developers and maintainers of all those libraries enough - all I did was install two packages!
I'm an ubuntu user, and it turns out that there's a clever package called cups-pdf which installs a pretend printer, and anything you could print, you can turn into a PDF. Brilliant. I installed it with aptitude and instantly I had a printer named "PDF" which printed to a /home/lorna/PDF directory.
Did I mention I love ubuntu?
I also wanted to add a cover page to my document, before I sent the whole thing to the printers in a PDF file for them to print and bind. For this I simply created an OpenOffice document and used the usual export to PDF. By the magic of twitter, I got some great advice from EmmaJane and installed the package PDFShuffler which enabled me to combine the two documents and save the result as a PDF.

By the magic of open source, I have beautiful handouts :) Printing in Linux really has come a long way, I can't thank the developers and maintainers of all those libraries enough - all I did was install two packages!
One-Step Symlink Switch
Thursday, August 19. 2010
This is a trick I use when deploying websites so I thought I'd post it here for posterity. Actually, technically I stole it from someone else but for now let's pretend it's mine (thanks @__kb!)
When I deploy an application, which is almost invariably a PHP application, I like to put a whole new version of the code alongside the existing one that is in use, and when everything is in place, simply switch between the two. As an added bonus, if the sky falls in when the new version goes live, the previous version is uploaded and ready to be put back into service. In order to be able to do this, I have my document root pointing at a symlink, let's say it is called "current". (disclaimer: I have no knowledge of non-linux operating systems, this post is linux-specific)
When it is time to deploy, I place the new code onto the server, and create two new symlinks, one called "previous" which points to the same location as the "current" symlink does (bear with me) and one called "next" which points to the location of the new code. To deploy, all I need is this:
mv -fT next current
The f forces mv to overwrite the target if needs be, and the T directs mv to consider the second argument as a normal file, rather than as a directory to copy in to. The neat thing about doing it this way is that it happens in a single move, no weird results for people who manage to hit your site while you are typing the new symlink command or during the code updating. It is also just as simple to roll back from this, since you have a symlink pointing to the previously used code version.
I thought I'd share this snippet as it is a handy inclusion in deployment scripts/strategies. What are your tips for managing code deployment?
When I deploy an application, which is almost invariably a PHP application, I like to put a whole new version of the code alongside the existing one that is in use, and when everything is in place, simply switch between the two. As an added bonus, if the sky falls in when the new version goes live, the previous version is uploaded and ready to be put back into service. In order to be able to do this, I have my document root pointing at a symlink, let's say it is called "current". (disclaimer: I have no knowledge of non-linux operating systems, this post is linux-specific)
When it is time to deploy, I place the new code onto the server, and create two new symlinks, one called "previous" which points to the same location as the "current" symlink does (bear with me) and one called "next" which points to the location of the new code. To deploy, all I need is this:
mv -fT next current
The f forces mv to overwrite the target if needs be, and the T directs mv to consider the second argument as a normal file, rather than as a directory to copy in to. The neat thing about doing it this way is that it happens in a single move, no weird results for people who manage to hit your site while you are typing the new symlink command or during the code updating. It is also just as simple to roll back from this, since you have a symlink pointing to the previously used code version.
I thought I'd share this snippet as it is a handy inclusion in deployment scripts/strategies. What are your tips for managing code deployment?
A "new" Netbook for Conferences
Wednesday, May 12. 2010
A couple of years ago, I attended ZendCon for the first time. At that time, the only laptop I had was a work machine weighing 5kg, and I was staying in a different hotel from the main conference - so I hastily bought pretty much the first non-ee netbook on the market (which was released about a week before my trip) and took that with me to the event. There were lots of limitations of it but I didn't have a whole lot of choice ... since then I've improved it significantly!
I've now had the machine more than 18 months and I've been using it for events and keeping it by the bed pretty much ever since. However this year I'm speaking at TEK-X in Chicago and found myself wondering if I should get a new little machine to take with me. A few months back I upgraded the RAM in the machine (it had 512 MB originally!), and I came to the conclusion that actually, I didn't need to splash out for a new netbook since with a bit more memory, its pretty usable.
Instead of replacing the machine, I bought the extended battery for the aspireone, taking me from about 2 hours to about 6 (I think, haven't tried this battery life in anger yet). Its chunky, but not offensive:

It is quite a bit heavier than the old one - my original post about getting the aspireone weighed it with its original battery at 971g and with the extended battery, its 1274g, which is still only half the weight of my current work laptop.

Reading back to that original post about the netbook it was pretty obvious that I was hating that operating system. A couple of years ago, the support for aspireone in Ubuntu Netbook Remix became usable, and I installed that. Its been fabulous and I had no intention to do anything more than upgrade ... until someone at OggCamp showed me they had the Kubuntu Netbook edition on their netbook.

It is shiny and blue, and since I use KDE on my laptop I couldn't resist and I upgraded it with a week to go before I take it as my only machine as a speaker at a conference!
I haven't spent a lot of money on the upgrades, the battery was about 50 GBP and the RAM came out of something else. I did have a large capacity SD card in the expansion slot since I only have 8GB hard drive. Then there was a problem with the machine suspending with the expansion slot in use and at around the same time I got a camera that takes SD ... so I put my big card into there instead :) I don't keep data on the netbook so its not an issue for me. I'll be flying to Chicago for Tek in a few days, and presenting off my netbook as usual. For a budget machine with a little bit of love and attention added in, "Merry" (short for Merope) the netbook has been quite a fabulous investment!
More than 512 MB RAM
I've now had the machine more than 18 months and I've been using it for events and keeping it by the bed pretty much ever since. However this year I'm speaking at TEK-X in Chicago and found myself wondering if I should get a new little machine to take with me. A few months back I upgraded the RAM in the machine (it had 512 MB originally!), and I came to the conclusion that actually, I didn't need to splash out for a new netbook since with a bit more memory, its pretty usable.
Bigger Battery Life
Instead of replacing the machine, I bought the extended battery for the aspireone, taking me from about 2 hours to about 6 (I think, haven't tried this battery life in anger yet). Its chunky, but not offensive:

It is quite a bit heavier than the old one - my original post about getting the aspireone weighed it with its original battery at 971g and with the extended battery, its 1274g, which is still only half the weight of my current work laptop.

Kubuntu Netbook Edition
Reading back to that original post about the netbook it was pretty obvious that I was hating that operating system. A couple of years ago, the support for aspireone in Ubuntu Netbook Remix became usable, and I installed that. Its been fabulous and I had no intention to do anything more than upgrade ... until someone at OggCamp showed me they had the Kubuntu Netbook edition on their netbook.

It is shiny and blue, and since I use KDE on my laptop I couldn't resist and I upgraded it with a week to go before I take it as my only machine as a speaker at a conference!
In Summary
I haven't spent a lot of money on the upgrades, the battery was about 50 GBP and the RAM came out of something else. I did have a large capacity SD card in the expansion slot since I only have 8GB hard drive. Then there was a problem with the machine suspending with the expansion slot in use and at around the same time I got a camera that takes SD ... so I put my big card into there instead :) I don't keep data on the netbook so its not an issue for me. I'll be flying to Chicago for Tek in a few days, and presenting off my netbook as usual. For a budget machine with a little bit of love and attention added in, "Merry" (short for Merope) the netbook has been quite a fabulous investment!
svn+ssh with specific identity file
Thursday, April 22. 2010
Here is a quick howto on using a config file to associate an SSH connection with a particular identity file. When I ssh directly from the command line, I can specify the port, identity file to use, and a whole raft of other options. However these options aren't available when checking out from subversion using svn+ssh, and I needed to specify a particular private key to use. These instructions are for my kubuntu 9.10 installation but should work on every flavour of *nix as far as I know.
I was trying to check out using something like this:
To do this, I created this file: ~/.ssh/config and in it I put the following:
host lornajane
HostName svn.example.com
IdentifyFile /path/to/private_key
Now I update my checkout syntax to make use of my alias rather than specifying the host directly, like this:
SSH realises that it should pull the host information from your local config file, and uses your HostName, IdentityFile and any other settings you specify (there are many options, see this reference for more information. For example I often use this for port numbers if I'm tunnelling my SSH between places, the possibilities are endless.
Hope this helps, if you've got anything to add then I'd be delighted to see a comment from you.
I was trying to check out using something like this:
svn co svn+ssh://lorna@svn.example.com/desired/pathTo do this, I created this file: ~/.ssh/config and in it I put the following:
host lornajane
HostName svn.example.com
IdentifyFile /path/to/private_key
Now I update my checkout syntax to make use of my alias rather than specifying the host directly, like this:
svn co svn+ssh://lorna@lornajane/desired/pathSSH realises that it should pull the host information from your local config file, and uses your HostName, IdentityFile and any other settings you specify (there are many options, see this reference for more information. For example I often use this for port numbers if I'm tunnelling my SSH between places, the possibilities are endless.
Hope this helps, if you've got anything to add then I'd be delighted to see a comment from you.
Open Office Presenter Console
Friday, February 19. 2010
I've been having issues with the presenter console on both my ubuntu machines since upgrading to Karmic (9.10). One is a Thinkpad T400 running kubuntu and the other is an aspireone netbook running ubuntu netbook remix. Neither wanted had a working installation after upgrade and I couldn't get the plugin installed using the open office plugin manager.
I discovered that this plugin is now available through apitude - simply install the package openoffice.org-presenter-console and it should all work splendidly! I use the presenter console when I am speaking (which is quite often) to show the time and the upcoming slide, its a great tool.
I discovered that this plugin is now available through apitude - simply install the package openoffice.org-presenter-console and it should all work splendidly! I use the presenter console when I am speaking (which is quite often) to show the time and the upcoming slide, its a great tool.
Word Count
Monday, February 8. 2010
There's a little command line utility on *nix which I use a lot - it's wc or "word count". This is especially useful to because I live in a world where everything is plain text right up until I have to send it to someone else (and sometimes not even then). Despite its name, word count can count more than just words - it can do characters, words, lines and can tell you the length of the longest line while its at it.
The biggest problem with counting lines is remembering the name of the utility, since its called "word count" and not "line count". I tend to use this for doing things like piping grep to wc and counting the lines to give me an idea of how many occurrences of something there are. I also use it to count errors in weblogs or really anything else that I could do with summarising. The syntax is something like:
grep -R TODO * | wc -l
Using a count like this is especially good for things like auditing code, where I need to know how prevalent something is - or refactoring, where I'm looking for how many of a particular pattern are outstanding. Counting lines is also very compatible with my habit of making lists in text files.
This is the feature that the utility was originally designed for, and as you can imagine, its pretty good at that. As with most things, this blog post started life as a text file and when I got to this point I saved it and ran:
wc -w wc_article.txt
It outputs the number of words (272) and the name of the file, which is useful if you're giving it a pattern to match.
Its a really convenient and versatile little program; I use it often and I hope others will find it useful too.
Counting Lines
The biggest problem with counting lines is remembering the name of the utility, since its called "word count" and not "line count". I tend to use this for doing things like piping grep to wc and counting the lines to give me an idea of how many occurrences of something there are. I also use it to count errors in weblogs or really anything else that I could do with summarising. The syntax is something like:
grep -R TODO * | wc -l
Using a count like this is especially good for things like auditing code, where I need to know how prevalent something is - or refactoring, where I'm looking for how many of a particular pattern are outstanding. Counting lines is also very compatible with my habit of making lists in text files.
Counting Words
This is the feature that the utility was originally designed for, and as you can imagine, its pretty good at that. As with most things, this blog post started life as a text file and when I got to this point I saved it and ran:
wc -w wc_article.txt
It outputs the number of words (272) and the name of the file, which is useful if you're giving it a pattern to match.
Word Count
Its a really convenient and versatile little program; I use it often and I hope others will find it useful too.
(Page 1 of 4, totaling 24 entries)
» next page



Comments