<?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>blog.johnjcamilleri.com</title>
	<atom:link href="http://blog.johnjcamilleri.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.johnjcamilleri.com</link>
	<description></description>
	<lastBuildDate>Sat, 14 Apr 2012 09:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Emacs</title>
		<link>http://blog.johnjcamilleri.com/2012/03/emacs/</link>
		<comments>http://blog.johnjcamilleri.com/2012/03/emacs/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 09:01:46 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Random Tech]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[text editor]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=336</guid>
		<description><![CDATA[Emacs:  the computer science equivalent of cutting your wrists just to feel alive.]]></description>
			<content:encoded><![CDATA[<p>Ever since switching to Ubuntu from Windows, I&#8217;d never really found a text editor I was truly satisfied with. I spent most of my time using either Geany or GEdit, and while both are quite fine, somehow neither ever felt complete.</p>
<p>So a few weeks ago, after meeting probably the most hardcore power user I&#8217;ve ever known (he types in Dvorak with a blank keyboard), I decided that I would embark on the long voyage towards teach becoming proficient with the legendary text editor, Emacs.</p>
<p>At first it felt incredibly masochistic, like the computer science equivalent of cutting your wrists just to feel alive. Yet after two weeks, the benefits are slowly beginning to become apparent. I&#8217;m still not sure if have become a convert yet. The pain is still there of course, but somehow that almost serves to convince me that I am in fact doing the right thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2012/03/emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The sorry state of LaTeX editors: a manifesto</title>
		<link>http://blog.johnjcamilleri.com/2012/02/latex-editor-manifesto/</link>
		<comments>http://blog.johnjcamilleri.com/2012/02/latex-editor-manifesto/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 15:58:52 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[distraction-free editors]]></category>
		<category><![CDATA[IDE]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=322</guid>
		<description><![CDATA[Not being to able to focus on what you're writing because you're bogged down by all the LaTeX markup is a bad thing. TeX editors should focus on content, not code. I am determined to hack together a web-based "Zen" LaTeX editing environment.]]></description>
			<content:encoded><![CDATA[<p>Firstly, I love LaTeX, I love coding, and I generally love feeling like a geek. Being able to produce beautifully typeset documents is hugely satisfying to me. But if you use LaTeX, you probably spend a good deal of your time actually writing markup rather than writing, well, words. Perhaps this is why LaTeX tends to be most popular in the computer science and engineering disciplines; you more or less need to have the skills and will of a coder to produce anything useful with it. But just because you <em>can</em> code, it doesn&#8217;t mean that you <em>should</em> always code.</p>
<p>Putting effort into your typesetting is a good thing. Producing elegant documents requires discipline and attention to detail, and LaTeX certainly gives you the right tools for exercising this discipline as far as you care to. But when you&#8217;ve set up your document layout just the way you want, defined your custom commands and prepared your reference and labels, it&#8217;s time to actually <em>write</em>.</p>
<p>Writing code and writing prose and two entirely different things. Even though LaTeX is a markup language, putting more emphasis on your actual text content that other paradigms, the truth is that its commands can quickly become unwieldy and dominate over the rest of your copy. And not being able to focus on what you are actually writing because of all the markup in the way is definitely a bad thing.</p>
<p>Writing with LaTeX requires two separate skillsets: markup-language programming and prose writing &#8212; but also one meta-skill: the ability to repeatedly switch back and forth between these two modes. Almost every tool or resource you&#8217;ll find in the LaTeX universe is focused only on the first of these skills, but never on the others. Nobody ever seems to bother promoting a <em>writer-friendly</em> environment for using LaTeX .</p>
<p>Every LaTeX editor I&#8217;ve tried has the same programmer-centric approach: split screen between editor/preview, syntax highlighting (which always breaks), brain-dead auto-completions, and the worst possible environment for writing you could ever imagine. LaTeX is capable of producing such beautiful output, why is it that writing LaTeX should be so painful and counter-aesthetic?</p>
<p>My first ever TeX IDE was <a href="http://www.texniccenter.org/">TeXnic Centre</a>, which I first used in 2009. Back then, it looked like Microsoft Office 1997. It doesn&#8217;t seem to have changed since. I floated between various basic text editors, <a href="http://www.tug.org/texworks/">TeXworks</a>, <a href="http://www.xm1math.net/texmaker/">Texmaker</a> and <a href="http://kile.sourceforge.net/">Kile</a>, each one pretty much as disappointing as the others. The first thing that annoys me is that in every single IDE, the auto-suggest is entirely dumb. Since they don&#8217;t do the dirty work of looking into your imported packages and determining what commands and environments they provide, your auto-suggestions are really only a list of default LaTeX commands. I understand that scoping into LaTeX packages is probably an absolute nightmare, but not doing so makes the auto-completions entirely useless. They also do some kind of reference processing to, so that when you type <code>\cite{</code> you get a list of the things defined in your BibTeX file. Stop the presses. Quick-building and previewing is obviously nice, and some editors even do their best to jump to the newest addition in your freshly-compiled document. It&#8217;s never perfect, but it&#8217;s barely useful enough to prevent you giving up on life altogether.</p>
<p>There are now also a bunch of web-based TeX editors floating around, the most notable being <a href="http://www.scribtex.com/">ScribTeX</a>. The advantages of not having to install LaTeX and deal with all those ridiculous intermediate files are clear. But guess what? They&#8217;re just clones of the desktop versions. Syntax highlighting, compilation/preview, and auto-completions that are only useful if you are not importing any other LaTeX package (read: useless). Their implementations may be elegant from a technical point of view, but they are not innovative in any way which I can see. But the biggest disappointment of all these LaTeX editors it that every last one of them completely disregards the notion that productive writing thrives in an environment that specifically promotes it; free from distractions and free from complicated markup.</p>
<p>What I&#8217;m basically talking about is the need for a distraction-free &#8220;Zen&#8221; editor. This is not a new idea, and many apps already exist for this — both OS-native (<a href="http://gottcode.org/focuswriter/">FocusWriter</a>, <a href="http://writemonkey.com/">WriteMonkey</a>, <a href="http://www.baara.com/q10/">Q10</a>, <a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a>, <a href="http://www.ommwriter.com/">Ommwriter</a>, <a href="http://www.iawriter.com/">iA Writer</a>) and web-based (<a href="http://www.quietwrite.com/">QuietWrite</a>, <a href="http://bergie.github.com/hallo/">Hallo</a>, <a href="http://darkcopy.com/">DarkCopy</a>, <a href="http://pen.io/zen/">PenZen</a>, <a href="http://www.koi-writer.com/">Koi</a>). They all pretty much do the same thing, some with support for Markdown or RTF, but none of them seem to do anything about LaTeX. Full LaTeX support is understandably daunting &#8211; not even the so-called LaTeX Editors even support it fully. But just knowing when to show you code and when to show you content, just being able to succesfully handle the constant context-switching which LaTeX writers know all to well, for me is paramount. There is of course <a href="http://www.lyx.org/">LyX</a>, which does try to give you a WYSIWYG-like editing environment on top of LaTeX, although LyX itself is not simply an editor but a full-blown preprocessor. Truthfully, I have never tried it, although there are plenty of reasons why I don&#8217;t want to go down that road primarily the problems with collaborative writing and varying dependencies.</p>
<p>So, I am basically determined to build such an editor. Web-based by far the makes most sense, for compatibility. No cloud services or any other junk though; with HTML5 I&#8217;m hoping it shouldn&#8217;t be too hard to edit files right on your computer. Just a nice clean distraction-free TeX editor which knows when to show your syntax-highlighted TeX commands, and when to switch into &#8220;Zen&#8221; writing mode. As I thrash a proper prototype together I will launch a proper project somewhere and invite people to contribute. But you can consider this my manifesto.</p>
<p><span style="color: #666;"><strong><em>Disclaimer</em></strong></span></p>
<p><span style="color: #666;">Firstly if I am wrong about any of the above, please call me on it. Particularly if some existing IDE is actually better than I have given it credit for, of if I failed to mention something significant altogether. Secondly, I want to know if things rings true with anyone else, or if I&#8217;m the one who is deeply disappointed by the LaTeX editors out there. It would be nice if this actually led to something half-decent one day. Finally, this post will change over time as things get pointed out to me and the ideas mature a bit.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2012/02/latex-editor-manifesto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Clear-on-Focus Plugin</title>
		<link>http://blog.johnjcamilleri.com/2011/07/jquery-clear-on-focus-plugin/</link>
		<comments>http://blog.johnjcamilleri.com/2011/07/jquery-clear-on-focus-plugin/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 08:29:28 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[jQuery Plugins]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[auto-clear]]></category>
		<category><![CDATA[form fields]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=310</guid>
		<description><![CDATA[A small jQuery plugin I wrote which I thought I would make public. Instead of using &#60;label&#62; elements for each of your form&#8217;s fields, use the input&#8217;s value attribute to set the label. Clear-on-focus will then take care of clearing the value when a user clicks or focuses the field. If they leave the field [...]]]></description>
			<content:encoded><![CDATA[<p>A small jQuery plugin I wrote which I thought I would make public. Instead of using <code>&lt;label&gt;</code> elements for each of your form&#8217;s fields, use the input&#8217;s value attribute to set the label. Clear-on-focus will then take care of clearing the value when a user clicks or focuses the field. If they leave the field blank, the original message is reset back. Also works correctly for password fields. Example usage:</p>
<pre>&lt;input type="text" name="username" value="Enter username" class="clear-on-focus" /&gt;
&lt;input type="text" name="password" value="Enter password" class="clear-on-focus password" /&gt;</pre>
<p>Link: <a title="jQuery Clear-on-Focus Plugin github repository" href="https://github.com/johnjcamilleri/jquery-clear-on-focus">github repository</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2011/07/jquery-clear-on-focus-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gedit syntax highlighting for Grammatical Framework source code</title>
		<link>http://blog.johnjcamilleri.com/2011/07/gedit-syntax-highlighting-for-grammatical-framework-source-code/</link>
		<comments>http://blog.johnjcamilleri.com/2011/07/gedit-syntax-highlighting-for-grammatical-framework-source-code/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 16:16:52 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Grammatical Framework]]></category>
		<category><![CDATA[Useful]]></category>
		<category><![CDATA[custom filetypes]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[grammatical framework]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[text editor]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=298</guid>
		<description><![CDATA[There is now an official page on the Grammatical Framework website about GF Editor Modes. For correct syntax highlighting in Ubuntu&#8217;s default text editor (gedit) for anyone editing Grammatical Framework source code, put the code below into the file ~/.local/share/gtksourceview-2.0/language-specs/gf.lang (under Ubuntu). Some helpful notes/links: The code is based heavily on the haskell.lang file which [...]]]></description>
			<content:encoded><![CDATA[<p style="padding: 5px; background: #FFFFE0; border: 1px solid #E6DB55; margin: 1em;">There is now an <a title="Editor modes for GF" href="http://www.grammaticalframework.org/doc/gf-editor-modes.html">official page on the Grammatical Framework website</a> about GF Editor Modes.</p>
<p>For correct syntax highlighting in <a title="gedit Text Editor" href="http://www.gedit.org/">Ubuntu&#8217;s default text editor (gedit)</a> for anyone editing <a title="Grammatical Framework" href="http://www.grammaticalframework.org/">Grammatical Framework</a> source code, put the code below into the file <code>~/.local/share/gtksourceview-2.0/language-specs/gf.lang</code> (under Ubuntu).</p>
<p>Some helpful notes/links:</p>
<ul>
<li>The code is based heavily on the <code>haskell.lang</code> file which I found in <code>/usr/share/gtksourceview-2.0/language-specs/haskell.lang</code>.</li>
<li>Ruslan Osmanov <a href="http://osmanov-dev-notes.blogspot.com/2011/04/how-to-add-new-highlight-mode-in-gedit.html">recommends registering your file extension as its own MIME type</a> (see also <a title="Adding MIME types in Ubuntu" href="https://help.ubuntu.com/community/AddingMimeTypes">here</a>), however on my system the <code>.gf</code> extension was already registered as a generic font (<code>application/x-tex-gf</code>) and I didn&#8217;t want to risk messing any of that up.</li>
<li>This is a quick 5-minute job and might require some tweaking. The <a href="http://developer.gnome.org/gtksourceview/stable/lang-tutorial.html">GtkSourceView language definition tutorial</a> is the place to start looking.</li>
<li>Contributions are welcome!</li>
</ul>
<p><iframe style="border: none; width: 100%;" src="http://pastebin.com/embed_iframe.php?i=j5Ug0D6P" width="320" height="500"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2011/07/gedit-syntax-highlighting-for-grammatical-framework-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I revived my disappearing Seagate GoFlex Home DLNA/UPnP server</title>
		<link>http://blog.johnjcamilleri.com/2011/07/disappearing-seagate-goflex-home-minidlna-dlna-upnp-server/</link>
		<comments>http://blog.johnjcamilleri.com/2011/07/disappearing-seagate-goflex-home-minidlna-dlna-upnp-server/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 10:00:08 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Home Entertainment]]></category>
		<category><![CDATA[Random Tech]]></category>
		<category><![CDATA[DLNA]]></category>
		<category><![CDATA[GoFlex Home]]></category>
		<category><![CDATA[MiniDLNA]]></category>
		<category><![CDATA[Samsung TV]]></category>
		<category><![CDATA[Seagate]]></category>
		<category><![CDATA[UPnP]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=293</guid>
		<description><![CDATA[My Seagate GoFlex Home worked fine until one day the DLNA/UPnP server disappeared and couldn't be accessed via my Samsung TV. A lot of searching and hacking later, turns out the MiniDLNA server database was corrupted. Here's how I got mine working again.]]></description>
			<content:encoded><![CDATA[<p>My family bought a <strong>Seagate GoFlex Home</strong> 2TB network-attached drive for streaming videos directly to our Samsung TV via DLNA/UPnP. Everything worked fine for a while, until suddenly one day it just refused to show up on the TV anymore. After eliminating all the home networking factors (cables, IPs, DHCP etc.), I noticed that when restarting the device it actually showed up briefly on the TV, but with no files on it &#8211; only to disappear after a few seconds.<br />
Note that the device still behaved normally as a network device, i.e. when browsing using Windows Networking/SAMBA we could still access all our files normally. It was only the DLNA service that did not seem to be functioning.</p>
<p>Combing through the Seagate forums (and the web in general) I found that others have had similar issues but no real solutions seem to have emerged. So a little more investigation had to be done. The GoFlex Home web interface did not report anything untoward, and fiddling with all the settings in the preferences did not seem to have any effect.</p>
<p>So, like all good hackers I got my hands dirty and gained SSH access to the device.</p>
<h2>Getting SSH access to the device</h2>
<p>As described <a href="http://oeone.com/support/forums/viewtopic.php?p=1137&amp;sid=77e956e9bd4d2041cd0eec46a0b5e37b">here</a> and <a href="http://forums.seagate.com/t5/GoFlex-Net-GoFlex-Home/Goflex-Home-MKV-support/td-p/75365">here</a>, to gain access to your GoFlex Home via SSH you will need:</p>
<ol>
<li>An SSH client (obviously)</li>
<li>The IP address of your GoFlex Home</li>
<li>The administrator username &amp; password</li>
<li>Your device&#8217;s product key, which you can find by clicking <em>About GoFlex Home</em> in the bottom left of the web interface</li>
<li>Confidence using the Linux command line</li>
</ol>
<p>So, you open an SSH connection to your device with this specially-formed username:</p>
<p><code>USERNAME_hipserv2_seagateplug_XXXX-XXXX-XXXX-XXXX</code></p>
<p>Where <code>USERNAME</code> is your username and <code>XXXX-XXXX-XXXX-XXXX</code> is your product key.</p>
<p>Once you&#8217;re in, go straight into root — as you will need to do so anyway before long — with:</p>
<p><code>sudo -s</code></p>
<p>Of course poking around as root is dangerous and could irreversibly mess up your device, but if you&#8217;re still reading then you probably already knew that.</p>
<h2>Restarting the DLNA service</h2>
<p>At this point I tried poking around, trying to find some logs or anything which could give me an idea what the problem was. The name of the service which actually provides the DLNA server is minidlna, for which a totally invaluable reference can be found <a title="MiniDLNA How-To (with guide to updating)" href="http://www.openstora.com/wiki/index.php?title=MiniDLNA_How-To_(with_guide_to_updating)">here</a>. I tried to access the MiniDLNA log with</p>
<p><code>tail /tmp/minidlna/minidlna.log</code></p>
<p>but was told that the log was unavailable. Curiously, running <code>ls -l</code> in the directory reported that the file had no size, permissions, or modification date; so that wasn&#8217;t much help. I then tried to find the status of the MiniDLNA service with</p>
<p><code>/etc/init.d/minidlna.init status</code></p>
<p>which told me that the PID in <code>/mnt/tmpfs/var/run/minidlna.pid</code> did not match that of any running process, implying that the daemon had crashed. Made sense so far, but when I tried to restart the service with</p>
<p><code>/etc/init.d/minidlna.init restart</code></p>
<p>the service would attempt to restart, but instantly crash again as described above. Same thing with manually stopping and starting the service. Some trial and error later, I discovered that what needs to be done is is that MiniDLNA&#8217;s temporary folder needs to be forcibly unmounted, like so:</p>
<p><code>umount /tmp/minidlna</code></p>
<p>Restarting the service again after doing this finally did the trick; Checking the service&#8217;s status again as above now reports that <em>MiniDLNA is running</em>, and everything shows up normally on my TV etc.</p>
<h2>Rebuilding the database</h2>
<p>If the steps above still don&#8217;t fix your problem, you likely need to get MiniDLNA to rebuild its media database, with the command</p>
<p><code>/usr/sbin/minidlna -f /etc/miniupnpd/minidlna.conf -R -d</code></p>
<p>This time, I was given an error message about being unable to open sqlite database file, <code>/tmp/minidlna/files.db</code>. Attempts to force-delete the file manually also failed, and I finally had to resort to manually unmounting the minidlna directory with</p>
<p><code>umount /tmp/minidlna</code></p>
<p>This happily worked, and I was then finally allowed to rebuild the database with the command given above. This will scan your media folders and rebuild the database for you in MiniDLNA&#8217;s debug mode, which means it will spit out lots and lots<br />
of output message to the console. After maybe 5 minutes or so, it finally told me the media library scanning was complete, and lo and behold I could once again access my GoFlex Home via my DLNA-enabled TV.</p>
<p>Now, I am still unclear as to what happens when I restart my device. The first time I tried this (after rebuilding the media database) my device went into the exact same problem as before! This time I logged in via SSH again, and run the MiniDLNA daemon in debug mode but without rebuilding the library:</p>
<p><code>/usr/sbin/minidlna -f /etc/miniupnpd/minidlna.conf -d</code></p>
<p>This successfully started the service again, allowed me to cleanly exit my SSH connection and access the DLNA server via my TV again. However it did take many minutes until my files all showed up, so I am assuming that MiniDLNA was in fact rebuilding the media database itself.</p>
<h2>Conclusion</h2>
<p>Despite finally managing to get things working as described above, it turns out that every time my GoFlex Home is restarted the MiniDLNA daemon crashes in the same way, and I am forced to fire up an SSH connection to sort things out. I have as yet found no way of permanently fixing the issue, but since our device is basically online 24/7 it&#8217;s not too much of an issue.</p>
<p>Of course I realise the steps here are not for the computer faint hearted, but after exhausting all the &#8220;user-friendly&#8221; ways of restoring the device, this is only sure-fire way I have found.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2011/07/disappearing-seagate-goflex-home-minidlna-dlna-upnp-server/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Geany syntax highlighting for Grammatical Framework source code</title>
		<link>http://blog.johnjcamilleri.com/2011/07/geany-syntax-highlighting-for-grammatical-framework-source-code/</link>
		<comments>http://blog.johnjcamilleri.com/2011/07/geany-syntax-highlighting-for-grammatical-framework-source-code/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 14:45:19 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Grammatical Framework]]></category>
		<category><![CDATA[Useful]]></category>
		<category><![CDATA[custom filetypes]]></category>
		<category><![CDATA[geany]]></category>
		<category><![CDATA[grammatical framework]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[text editor]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=290</guid>
		<description><![CDATA[There is now an official page on the Grammatical Framework website about GF Editor Modes. I wrote a custom filetype config file for the Geany text editor, providing correct syntax highlighting for anyone editing Grammatical Framework source code. Put the code below into the file /usr/share/geany/filetypes.GF.conf (under Ubuntu). You will need to manually create the [...]]]></description>
			<content:encoded><![CDATA[<p style="padding: 5px; background: #FFFFE0; border: 1px solid #E6DB55; margin: 1em;">There is now an <a title="Editor modes for GF" href="http://www.grammaticalframework.org/doc/gf-editor-modes.html">official page on the Grammatical Framework website</a> about GF Editor Modes.</p>
<p>I wrote a custom filetype config file for the <a title="Geany text editor for Linux" href="http://www.geany.org/">Geany text editor</a>, providing correct syntax highlighting for anyone editing <a title="Grammatical Framework" href="http://www.grammaticalframework.org/">Grammatical Framework</a> source code. Put the code below into the file <code>/usr/share/geany/filetypes.GF.conf</code> (under Ubuntu). You will need to manually create the file:</p>
<h3>Light Version</h3>
<p><iframe style="border: none; width: 100%;" src="http://pastebin.com/embed_iframe.php?i=sGizrXAN" width="320" height="240"></iframe></p>
<h3>Dark Version</h3>
<p><iframe style="border: none; width: 100%;" src="http://pastebin.com/embed_iframe.php?i=WgAbE5XL" width="320" height="240"></iframe></p>
<p>You will also need to edit the <code>filetype_extensions.conf</code> file and add the following line somewhere:</p>
<p><code>GF=*.gf;</code></p>
<p>Hope that helps someone who doesn&#8217;t feel like reading through the Geany documentation! (which btw can be found <a title="Geany custom filetype documentation" href="http://www.geany.org/manual/dev/index.html#custom-filetypes">here</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2011/07/geany-syntax-highlighting-for-grammatical-framework-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Tiler Plugin</title>
		<link>http://blog.johnjcamilleri.com/2010/12/jquery-tiler-plugin/</link>
		<comments>http://blog.johnjcamilleri.com/2010/12/jquery-tiler-plugin/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 08:41:52 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[jQuery Plugins]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[tile]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=268</guid>
		<description><![CDATA[A new plugin I'm in the process of creating, for neatly tiling boxes of different dimensions into a grid.]]></description>
			<content:encoded><![CDATA[<p>A new plugin I&#8217;m in the process of creating, for neatly tiling boxes of different dimensions into a grid.</p>
<p>If you have ever created tiled a layout by floating a bunch of boxes together, you may have noticed that when these boxes have different dimensions ( heights/widths) you end up with a lot of space and an altogther un-neat layout (Figure A):</p>
<div id="attachment_274" class="wp-caption alignleft" style="width: 234px"><a href="http://blog.johnjcamilleri.com/wp-content/uploads/2010/11/tiler-before.png"><img class="size-full wp-image-274 " title="Tiler (before)" src="http://blog.johnjcamilleri.com/wp-content/uploads/2010/11/tiler-before.png" alt="" width="224" height="329" /></a><p class="wp-caption-text">Figure A: Floating of different-sized blocks leaves a lot of white space.</p></div>
<div id="attachment_273" class="wp-caption alignleft" style="width: 229px"><a href="http://blog.johnjcamilleri.com/wp-content/uploads/2010/11/tiler-after.png"><img class="size-full wp-image-273" title="Tiler (after)" src="http://blog.johnjcamilleri.com/wp-content/uploads/2010/11/tiler-after.png" alt="" width="219" height="260" /></a><p class="wp-caption-text">Figure B: By using the jquery-tiler plugin our boxes are now neatly stacked</p></div>
<div style="clear: both;">
<p>The tiler plugin fixes this by greedily inserting each box into the column which is &#8220;shortest&#8221;, resulting in something like that in Figure B.</p>
<p>Note how the order of the boxes has changed. To me this is acceptable, but more importantly it is somewhat unavoidable (as someone wise used to tell me, &#8220;you have to break eggs if you want to make an omelette&#8221;).</p>
<p>Note that in this scenario all boxes are forced into fixed column widths. There is also some support for varying widths (i.e. preserving the width of each box) however it is far from complete. Will implement this when I have some more time (and a few more brain waves).</p>
<p>Anyway if you want to try it out, the git repository is here: <a href="http://github.com/johnjcamilleri/jquery-tiler">http://github.com/johnjcamilleri/jquery-tiler</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2010/12/jquery-tiler-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fuzzy string matching in MySQL using Levenshtein Distance stored function</title>
		<link>http://blog.johnjcamilleri.com/2010/11/fuzzy-string-matching-in-mysql-using-levenshtein-distance-stored-function/</link>
		<comments>http://blog.johnjcamilleri.com/2010/11/fuzzy-string-matching-in-mysql-using-levenshtein-distance-stored-function/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 10:23:23 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[fuzzy matching]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[query]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=266</guid>
		<description><![CDATA[Searching for fuzzy string matching methods will return various algorithms and various implementations of them. I found this MySQL implementation of Levenshtein Distance to be adequate for my needs, and using this handy MySQL stored function makes it super as to use in queries without having to create temporary search-optimised tables or performing post-processing in [...]]]></description>
			<content:encoded><![CDATA[<p>Searching for fuzzy string matching methods will return various algorithms and various implementations of them.</p>
<p>I found <a href="http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/">this MySQL implementation of Levenshtein Distance</a> to be adequate for my needs, and using this handy MySQL stored function makes it super as to use in queries without having to create temporary search-optimised tables or performing post-processing in another language (eg PHP).</p>
<p>Just install the functions in your database, and use like so:</p>
<p><code>SELECT * FROM users ORDER BY levenshtein_distance(users.name, 'john')</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2010/11/fuzzy-string-matching-in-mysql-using-levenshtein-distance-stored-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symphony CMS Extension — Backend Language Switcher</title>
		<link>http://blog.johnjcamilleri.com/2010/10/symphony-cms-extension-backend-language-switcher/</link>
		<comments>http://blog.johnjcamilleri.com/2010/10/symphony-cms-extension-backend-language-switcher/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 08:14:42 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Symphony CMS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[symphony cms]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=253</guid>
		<description><![CDATA[Just published my first extension for Symphony CMS: Backend Language Switcher It&#8217;s basically a small backend utility to allow users to switch the language in which they view the backend. This is especially useful when used together with the Multilingual Field extension. Check out the official extension thread and the GitHub repository.]]></description>
			<content:encoded><![CDATA[<p>Just published my first extension for <a href="http://symphony-cms.com/">Symphony CMS</a>: <strong>Backend Language Switcher</strong></p>
<p>It&#8217;s basically a small backend utility to allow users to switch the language in which they view the backend. This is especially useful when used together with the <a href="http://symphony-cms.com/download/extensions/view/46066/">Multilingual Field</a> extension.</p>
<p>Check out the <a href="http://symphony-cms.com/download/extensions/view/53419/">official extension thread</a> and the <a href="http://github.com/johnjcamilleri/backend-language-switcher/">GitHub repository</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2010/10/symphony-cms-extension-backend-language-switcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Autoscale Plugin</title>
		<link>http://blog.johnjcamilleri.com/2010/09/jquery-autoscale-plugin/</link>
		<comments>http://blog.johnjcamilleri.com/2010/09/jquery-autoscale-plugin/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 06:50:00 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[jQuery Plugins]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[autofit]]></category>
		<category><![CDATA[autoscale]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[shrink]]></category>

		<guid isPermaLink="false">http://blog.johnjcamilleri.com/?p=235</guid>
		<description><![CDATA[This simple plugin basically takes a source and a target element (could be the same element) and shrinks the font-size in the target when the length of the content in the source increases. Demo Download]]></description>
			<content:encoded><![CDATA[<p>This simple plugin basically takes a source and a target element (could be the same element) and shrinks the font-size in the target when the length of the content in the source increases.</p>
<p><a title="jQuery Autoscale demo" href="http://jjc-static.info/jquery-autoscale/index.html">Demo</a></p>
<p><a title="jQuery Autoscale JS" href="http://jjc-static.info/jquery-autoscale/jquery.autoscale.js">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjcamilleri.com/2010/09/jquery-autoscale-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
