convert a multi page pdf to a single image
rene — Mon, 07/12/2010 - 15:08
Task at hand was to convert a 110 page PDF to an image format. JPEG or PNG would do. Solution was to use the powerful convert command from the imagemagick suite of tools. Here is how.
First install imagemagick
Next convert your PDF to JPEG (1 PDF page per JPEG image) using %04d with the destination filename which will force convert to create filenames that contain 4 decimals with leading 0's counting upwards from 0 (eg; document_0000,jpg, document_0001.jpg, document_0002.jpg)
Finally use convert to append all JPEG images into a single image.
If you get an error with the amount of pixels the final JPEG image contains, you will need to use another image format. JPEG only allows a maximum of 65500 pixels for width or height.
convert: Maximum supported image dimension is 65500 pixels `document.jpg' @ jpeg.c/EmitMessage/232.
Try using GIF or PNG if you do get this error though do keep in mind these are
lossless image formats so the filesize of the final image can be quite large.
Red Hat Enterprise Linux 6 beta 2 released
rene — Thu, 07/01/2010 - 10:27
Fortune 500 company Red Hat, are working towards a production release of RHEL6 and have released beta 2.
The formal announcement can be found on the rhelv6-announce list with the release notes found here.
The unfortunate folk who chose to deploy Xen as their hypervisor with RHEL5 will be burnt with RHEL6. RHEL6 will not support the Xen hypervisor though is supported as a Xen guest.
Amongst the Technology Previews we have pacemaker, TPM tools, remote auditd support and btrfs.
first steps into building a sustainable food source
rene — Tue, 06/29/2010 - 23:49
Last weekend was certainly out of the ordinary for me. I spent most of it away from the keyboard, walking the Royal Botanic Gardens of Melbourne and doing some gardening for the first time in my life. Yes, I'm building my first vegetable garden.
It was an alien feeling for me and after the first several minutes I felt a slight sense of accomplishment albeit spending only 3 minutes in the garden. I suppose it was a combination of my first steps into building a sustainable food source, building something with my hands (instead of my fingertips hacking away at a keyboard) and being outdoors in the dirt.
A few days after my foray into building my first sustainable food source I watched Jamie Olivers TED talk on the inspiring grassroots movement of changing the way people eat. Jamie is tackling the obesity epidemic head on by educating children about the fundamentals on nutritional foods and practical cooking skills whilst challenging Corporate America to change the culture of junk food.
The talk lives at http://www.ted.com/talks/jamie_oliver.html. Find more information on the movement here and here
"I wish for your help to create a strong, sustainable movement to educate every child about food, inspire families to cook again and empower people everywhere to fight obesity.” - Jamie Oliver
yum repo and package dependencies with puppet
rene — Mon, 06/28/2010 - 19:11
Over the last couple of months I've been using puppet to help scale out sysadmin tasks. As puppet manifests are based on a declarative programming language I've discovered you can not rely on flow control such as 'drop in a RPM GPG key, then configure repo foo. Once both of those tasks are done install package bar from repo foo' unless you add some smarts.
This is how I install a package on a RHEL5/CentOS/Fedora type system which depends on a yum repo first which in turn depends on a GPG key.
Within the puppet manifest first define a file resource for the GPG key that RPM needs to install packages from the EPEL repository
owner => root,
group => root,
mode => 0444,
source => "puppet:///yum/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"
}
The yum puppet module I have has RPM-GPG-KEY-EPEL in /etc/puppet/modules/yum/files/etc/pki/rpm-gpg/ on the puppetmaster server.
Next define a yumrepo resource with the repo details. Note the 'require' attribute which references the GPG key file resource.
mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch',
enabled => 1,
gpgcheck => 1,
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL",
require => File["/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"]
}
Finally the package resource which references the yumrepo resource.
"nginx",
"rtpproxy"
]:
ensure => latest,
require => Yumrepo[ "epel" ],
}


































