<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Simon Buckle&#039;s Weblog &#187; Tech Tips</title>
	<atom:link href="http://www.simonbuckle.com/category/tech-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonbuckle.com</link>
	<description>Random thoughts for random people</description>
	<lastBuildDate>Tue, 27 Dec 2011 11:39:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Tagged PDF</title>
		<link>http://www.simonbuckle.com/2007/06/16/tagged-pdf/</link>
		<comments>http://www.simonbuckle.com/2007/06/16/tagged-pdf/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 10:54:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2007/06/16/tagged-pdf/</guid>
		<description><![CDATA[Alfresco uses Open Office to convert documents to PDF but by default it doesn&#8217;t generate tagged PDF. This note describes how to configure Alfresco so that it does produce tagged PDF. So what is a tagged PDF? Well, it&#8217;s a PDF that contains structural information about the content, e.g reading order, the presence of tables [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.alfresco.com">Alfresco</a> uses Open Office to convert documents to PDF but by default it doesn&#8217;t generate tagged PDF. This note describes how to configure Alfresco so that it does produce tagged PDF.</p>
<p>So what is a <a href="http://www.planetpdf.com/enterprise/article.asp?ContentID=6067">tagged PDF</a>? Well, it&#8217;s a PDF that contains structural information about the content, e.g reading order, the presence of tables etc. This allows screen-readers to read the PDF document &#8211; it makes the PDF accessible. In order to get the most out of the conversion process, as much structural information as possible needs to be present in the original document. I came across these recently when doing some work for a local authority that is using Alfresco. </p>
<p>So how do you configure Alfresco to produce tagged PDF? Open up the file &#8216;openoffice-document-formats.xml&#8217;, which is located in &lt;tomcat_home&gt;/webapps/alfresco/WEB-INF/classes/alfresco/mimetype/, locate the Portable Document Format document format section (it should be at the top of the file) and modify it so it looks like this:</p>
<pre>
<font size="3">
&lt;document-format&gt;&lt;name&gt;Portable Document Format&lt;/name&gt;
&lt;mime-type&gt;application/pdf&lt;/mime-type&gt;
&lt;file-extension&gt;pdf&lt;/file-extension&gt;
&lt;export-filters&gt;
 &lt;entry&gt;&lt;family&gt;Presentation&lt;/family&gt;&lt;string&gt;impress_pdf_Export&lt;/string&gt;&lt;/entry&gt;
 &lt;entry&gt;&lt;family&gt;Spreadsheet&lt;/family&gt;&lt;string&gt;calc_pdf_Export&lt;/string&gt;&lt;/entry&gt;
 &lt;entry&gt;&lt;family&gt;Text&lt;/family&gt;&lt;string&gt;writer_pdf_Export&lt;/string&gt;&lt;/entry&gt;
&lt;/export-filters&gt;
<b>&lt;export-options&gt;
  &lt;entry&gt;&lt;string&gt;EnableTextAccessForAccessibilityTools&lt;/string&gt;&lt;boolean&gt;true&lt;/boolean&gt;&lt;/entry&gt;
  &lt;entry&gt;&lt;string&gt;UseTaggedPDF&lt;/string&gt;&lt;boolean&gt;true&lt;/boolean&gt;&lt;/entry&gt;
&lt;/export-options&gt;
</b>&lt;/document-format&gt;
</font>
</pre>
<p>Restart Alfresco. That&#8217;s it! The next time you convert a document to PDF it should be tagged. You can test that the conversion worked (on the Mac) by using Adobe Reader 8.0. Open up the PDF file. Go to Document -> Security -> Show Security Properties. Click on the &#8216;Description&#8217; tag. The &#8216;Tagged PDF&#8217; entry should be set to &#8216;Yes&#8217; if the conversion worked correctly. You can also check the document for accessibility by clicking on Document -> Accessibility Quick Check.</p>
<p>You can download the modified configuration file <a href="http://www.simonbuckle.com/openoffice-document-formats.xml">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2007/06/16/tagged-pdf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting to PDF with Alfresco</title>
		<link>http://www.simonbuckle.com/2007/06/06/converting-to-pdf-with-alfresco/</link>
		<comments>http://www.simonbuckle.com/2007/06/06/converting-to-pdf-with-alfresco/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 16:05:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2007/06/06/converting-to-pdf-with-alfresco/</guid>
		<description><![CDATA[Brief note that explains how to set-up Alfreso to transform various document formats to PDF. I am writing this because I didn&#8217;t find it particularly easy to track down how to do it; it involves a lot of digging around in the wiki. Hopefully, this note will make it easier to set-up. By default Alfresco [...]]]></description>
			<content:encoded><![CDATA[<p>Brief note that explains how to set-up Alfreso to transform various document formats to PDF. I am writing this because I didn&#8217;t find it particularly easy to track down how to do it; it involves a lot of digging around in the wiki. Hopefully, this note will make it easier to set-up.</p>
<p>By default Alfresco will convert PDF, Word documents etc to plain text but if you want to go the other around, e.g. transform plain text to PDF, you need to start Open Office from the command line &#8211; a version of Open Office comes bundled with Alfresco. It&#8217;s easy really: just run the <code>start_oo.sh</code> script, which you will find in the Alfresco home directory. Once you have done this you should be able to transform documents to PDF. </p>
<p>You can check that Open Office is running by executing the command <code>lsof -i | grep 8100</code>. If you start Open Office manually, note that Alfresco expects Open Office to be running on port 8100.</p>
<p>There&#8217;s a whole page on starting Open Office from the command line on the <a href="http://wiki.alfresco.com/wiki/Running_OpenOffice_From_Terminal">Alfresco wiki</a>. Not sure why the page needs to be so long. I just ran the <code>start_oo.sh</code> script and Open Office started up without any problems. Maybe I got lucky!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2007/06/06/converting-to-pdf-with-alfresco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs on Ubuntu</title>
		<link>http://www.simonbuckle.com/2006/11/05/emacs-on-ubuntu/</link>
		<comments>http://www.simonbuckle.com/2006/11/05/emacs-on-ubuntu/#comments</comments>
		<pubDate>Sun, 05 Nov 2006 15:07:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2006/11/05/emacs-on-ubuntu/</guid>
		<description><![CDATA[TRAMP is supposed to come installed with Emacs as default from version 21.4.x onwards &#8211; well, something like that. Having installed Emacs on Ubuntu using apt-get I couldn&#8217;t for the life of me figure why TRAMP wasn&#8217;t working! When I tried to open a remote file it kept trying to use FTP and always complained [...]]]></description>
			<content:encoded><![CDATA[<p>TRAMP is supposed to come installed with Emacs as default from version 21.4.x onwards &#8211; well, something like that. Having installed Emacs on Ubuntu using apt-get I couldn&#8217;t for the life of me figure why TRAMP wasn&#8217;t working! When I tried to open a remote file it kept trying to use FTP and always complained about something or other &#8211; I don&#8217;t remember exactly what it was complaining about.</p>
<p>Anyway, it turns out that TRAMP is not included with the version of Emacs that I had installed (sigh). To install it type &#8220;sudo apt-get install tramp&#8221; on the command line and restart Emacs. Viola!  </p>
<p>To set the default connection mode to ssh, edit your .emacs file and add the following line:</p>
<p>(setq tramp-default-method &#8220;ssh&#8221;) </p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2006/11/05/emacs-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wrist problems</title>
		<link>http://www.simonbuckle.com/2006/10/09/wrist-problems/</link>
		<comments>http://www.simonbuckle.com/2006/10/09/wrist-problems/#comments</comments>
		<pubDate>Mon, 09 Oct 2006 10:29:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2006/10/09/wrist-problems/</guid>
		<description><![CDATA[For the last month or so I have been having real problems with pain in my wrists and forearms. I have had days where I have had to stop typing because it has just been too painful. I have had this problem before but usually it disappears after a few days. It&#8217;s strange because I [...]]]></description>
			<content:encoded><![CDATA[<p>For the last month or so I have been having real problems with pain in my wrists and forearms. I have had days where I have had to stop typing because it has just been too painful. I have had this problem before but usually it disappears after a few days. It&#8217;s strange because I use a <a href="http://www.kinesis-ergo.com/">Kinesis</a> keyboard. They are supposed to prevent these kind of problems (although I am currently writing this on my laptop keyboard). I am even thinking about buying a <a href="http://www.safetype.com/">vertical keyboard</a>!</p>
<p>I guess it could be because I don&#8217;t take enough breaks away from the keyboard. However, yesterday I found an application for Mac OS X that reminds you every so often to take a break from typing. It&#8217;s called <a href="http://tech.inhelsinki.nl/antirsi/">AntiRSI</a>. It runs in the background and every so often up pops a window telling you to take a break. It gives you a great excuse to go and get a coffee!</p>
<p><a href="http://www.davidgoodwin.net/">David</a> has more information on his site <a href="http://www.davidgoodwin.net/archives/00000046.php">here</a>. His article also includes a link to an application for Windows that works just like AntiRSI called <a href="http://workrave.com">Workrave</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2006/10/09/wrist-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recording network traffic</title>
		<link>http://www.simonbuckle.com/2006/07/24/recording-network-traffic/</link>
		<comments>http://www.simonbuckle.com/2006/07/24/recording-network-traffic/#comments</comments>
		<pubDate>Mon, 24 Jul 2006 18:19:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2006/07/24/recording-network-traffic/</guid>
		<description><![CDATA[I am writing this primarily as a reminder for myself but maybe it will be of use to you too if you ever need to see what data is being sent/received from your computer to a remote server; I keep writing the incantation down in my trusty notebook but for some reason I never seem [...]]]></description>
			<content:encoded><![CDATA[<p>I am writing this primarily as a reminder for myself but maybe it will be of use to you too if you ever need to see what data is being sent/received from your computer to a remote server; I keep writing the incantation down in my trusty notebook but for some reason I never seem to be able to find it again! I use tcpflow to look at what is being sent over the wire. For example, to look at the network traffic between your computer and &#8216;maps.google.com&#8217;, execute the following command as root:</p>
<pre><code>
tcpflow -c -i &lt;interface&gt; host maps.google.com
</code></pre>
<p>The <code>-c</code> flag means print to the console. </p>
<p>It&#8217;s a useful tool and it means that I don&#8217;t have to figure out how to use tcpdump! You can download tcpflow <a href="http://www.circlemud.org/~jelson/software/tcpflow/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2006/07/24/recording-network-traffic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to log SQL queries (again)</title>
		<link>http://www.simonbuckle.com/2006/06/25/how-to-log-sql-queries/</link>
		<comments>http://www.simonbuckle.com/2006/06/25/how-to-log-sql-queries/#comments</comments>
		<pubDate>Sun, 25 Jun 2006 10:35:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2006/06/25/how-to-log-sql-queries/</guid>
		<description><![CDATA[Same task as before, different database. I have been doing some development over the last few days with Rails and MySQL. To cut a long story short I wanted to have a look at what queries were being sent to the database. This post describes one way of turning on logging for MySQL. I did [...]]]></description>
			<content:encoded><![CDATA[<p>Same task as <a href="http://www.simonbuckle.com/2005/12/20/logging-sql-queries/">before</a>, different database. I have been doing some development over the last few days with <a href="http://www.rubyonrails.org">Rails</a> and <a href="http://www.mysql.com">MySQL</a>. To cut a long story short I wanted to have a look at what queries were being sent to the database. This post describes one way of turning on logging for MySQL. I did all of this on Mac OS X so your mileage may vary.</p>
<ol>
<li>Create the log file
<pre><code>
> su
> cd /var/log
> touch mysqld.log
> chown mysql mysqld.log
</code></pre>
</li>
<li>Edit <code>/etc/my.cnf</code>
<pre>
<code>
[mysqld]
log = /var/log/mysqld.log
</code>
</pre>
</li>
<li>Restart the database</li>
</ol>
<p>If you installed the MySQL Startup Item then you can restart the server simply by running:</p>
<pre><code>sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart</code></pre>
<p>Job done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2006/06/25/how-to-log-sql-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being news reader friendly</title>
		<link>http://www.simonbuckle.com/2006/05/24/on-being-news-reader-friendly/</link>
		<comments>http://www.simonbuckle.com/2006/05/24/on-being-news-reader-friendly/#comments</comments>
		<pubDate>Wed, 24 May 2006 22:55:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2006/05/24/on-being-news-reader-friendly/</guid>
		<description><![CDATA[Andrew Grumet makes an interesting point about using CSS in blog posts. I often find myself make style declarations inline when I want to position images etc in my blog posts. I like his idea. On a related theme, I often see broken images when viewing RSS feeds in news readers &#8212; once upon a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.grumet.net">Andrew Grumet</a> makes an interesting point about using <a href="http://blog.grumet.net/2006/05/21/css-in-blog-posts">CSS in blog posts</a>. I often find myself make style declarations inline when I want to position images etc in my blog posts. I like his idea.</p>
<p>On a related theme, I often see broken images when viewing RSS feeds in news readers &#8212; once upon a time I had the very same problem in my feed. The reason: relative URLs. </p>
<p>For example, let&#8217;s take the image of myself. If you looked at the HTML for this particular image you would see something like this: &lt;img src=&#8221;/images/me.jpg&#8221;/&gt;. Works fine in a browser but try it in a news reader and &#8230; broken image. To view the image in a news reader the link should be: &lt;img src=&#8221;http://simonbuckle.com/images/me.jpg&#8221;/&gt;; notice the inclusion of the (full) domain name. Perhaps that&#8217;s another idea for a WordPress plugin: for each blog post add the domain name to any relative URLs to avoid things like broken image links.</p>
<p>In summary: check how your feed looks in a news reader! Your readers will thank you or, at the very least, you won&#8217;t look like a dumbass.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2006/05/24/on-being-news-reader-friendly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Preventing email spoofing</title>
		<link>http://www.simonbuckle.com/2006/01/19/preventing-email-spoofing/</link>
		<comments>http://www.simonbuckle.com/2006/01/19/preventing-email-spoofing/#comments</comments>
		<pubDate>Thu, 19 Jan 2006 22:36:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2006/01/19/preventing-email-spoofing/</guid>
		<description><![CDATA[What&#8217;s the best way of determining if an email address has been spoofed? Here&#8217;s a solution I came up with: use the IP address of the originating server the mail came from and do a reverse DNS lookup to get the domain name. Compare the domain name from the lookup with the domain the email [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the best way of determining if an email address has been spoofed? </p>
<p>Here&#8217;s a solution I came up with: use the IP address of the originating server the mail came from and do a reverse DNS lookup to get the domain name. Compare the domain name from the lookup with the domain the email claims to have been sent from and if there is no corresponding A record discard the email. How reliable is this method? I have come across several references on the Internet that say that looking up the PTR record for a domain is not reliable because the PTR record(s) are often not well maintained or are even absent.</p>
<p>Another way using a similar approach but not relying on PTR entries, would be to look up the IP address of the domain the email claims to have come from and compare that with the IP address of the originating server. Have I missed something? Are there better ways of checking for spoofed emails?</p>
<p>Your comments are appreciated. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2006/01/19/preventing-email-spoofing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Full screen mode for Safari</title>
		<link>http://www.simonbuckle.com/2006/01/13/full-screen-mode-for-safari/</link>
		<comments>http://www.simonbuckle.com/2006/01/13/full-screen-mode-for-safari/#comments</comments>
		<pubDate>Fri, 13 Jan 2006 16:37:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2006/01/13/full-screen-mode-for-safari/</guid>
		<description><![CDATA[Here&#8217;s a useful tip for making Safari take up the whole of the screen. I found it in a comment somebody had posted on this article about Saft, a plugin that adds a lot of funky features to Safari. Add the following Javascript in the URL field at the top of the browser and then [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a useful tip for making Safari take up the whole of the screen. I found it in a comment somebody had posted on this <a href="http://www.themacobserver.com/columns/macgadget/2004/20041122.shtml">article about Saft</a>, a plugin that adds a lot of funky features to Safari.</p>
<p>Add the following Javascript in the URL field at the top of the browser and then bookmark it:</p>
<p><code>javascript:self.moveTo(0,0); self.resizeTo(screen.availWidth, screen.availHeight);</code></p>
<p>Add the bookmark to the bookmark bar, click on it and voila &#8230;. Safari occupies the whole of the screen. Opera has a better full screen mode, it even covers the menu bar at the top of the screen, but until Apple add such a mode to Safari this will have to do. </p>
<p>Here is snapshot of my toolbar:</p>
<div>
<img src="http://www.simonbuckle.com/images/Bookmark.jpg"/>
</div>
<p>As I mentioned previously there is a plugin available called Saft that adds, among other things, a full screen mode to Safari. According to the <a href="http://haoli.dnsalias.com/Saft/">authors of Saft</a> it was used for check-in at Macworld San Francisco in 2005. Kind of makes you wonder why Apple doesn&#8217;t just clone the functionality, or buy Saft, and add it to Safari!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2006/01/13/full-screen-mode-for-safari/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Logging SQL queries</title>
		<link>http://www.simonbuckle.com/2005/12/20/logging-sql-queries/</link>
		<comments>http://www.simonbuckle.com/2005/12/20/logging-sql-queries/#comments</comments>
		<pubDate>Tue, 20 Dec 2005 14:20:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://www.simonbuckle.com/2005/12/20/logging-sql-queries/</guid>
		<description><![CDATA[A note to myself about how to log SQL queries when using PostgreSQL. In postgresql.conf set the following parameters: log_statement = true syslog = 2 syslog_facility = 'LOCAL0' syslog_ident = 'postgres' The database will need to be restarted in order for the changes to have any effect. To view the SQL queries that are being [...]]]></description>
			<content:encoded><![CDATA[<p>A note to myself about how to log SQL queries when using PostgreSQL. In <code>postgresql.conf</code> set the following parameters:</p>
<pre>log_statement = true
syslog = 2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
</pre>
<p>The database will need to be restarted in order for the changes to have any effect. To view the SQL queries that are being executed, log in as root and issue the following command:</p>
<pre>&#91;root@localhost &#93; tail -f /var/log/messages</pre>
<p>Once you have finished the analysis don&#8217;t forget to turn off the SQL logging.</p>
<p>The reason I needed to do this was that Postfix was rejecting email for a virtual domain set up on my server. The mapping tables were in the database so I needed to see what SQL query Postfix was sending to PostgreSQL to try and figure out why the lookup was failing. As it happens I figured out the problem, but that&#8217;s a post for another day. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonbuckle.com/2005/12/20/logging-sql-queries/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

