<?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"
	>

<channel>
	<title>The G String</title>
	<atom:link href="http://www.dangarland.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dangarland.co.uk</link>
	<description>Sentiments from the world of web development</description>
	<pubDate>Sun, 04 Jan 2009 00:37:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Developing X3D with X3DEdit on Mac OSX</title>
		<link>http://www.dangarland.co.uk/2009/01/04/developing-x3d-with-x3dedit-on-mac-osx/</link>
		<comments>http://www.dangarland.co.uk/2009/01/04/developing-x3d-with-x3dedit-on-mac-osx/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 00:32:02 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Thoughts]]></category>

		<category><![CDATA[graphics]]></category>

		<category><![CDATA[x3d]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=51</guid>
		<description><![CDATA[A long-standing interest of mine in the field of computer graphics is the progress of the X3D standard for virtual reality, established as an ISO standard in 2004. I was first taken in as a student, working on a project to develop my own network protocol for X3D environments, impressed by the intuitive XML-syntax and [...]]]></description>
			<content:encoded><![CDATA[<p>A long-standing interest of mine in the field of computer graphics is the progress of the <a href="http://www.web3d.org/about/overview/">X3D</a> standard for virtual reality, <a href="http://en.wikipedia.org/wiki/X3D">established as an ISO standard in 2004</a>. I was first taken in as a student, working on a project to develop my own <a href="http://www.dangarland.co.uk/cv/project.html#thesis">network protocol for X3D environments</a>, impressed by the intuitive XML-syntax and standards-driven approach. An <a href="http://www.xj3d.org/">open-source Java-implementation</a> exists, although sadly their documentation / user-guide page hasn&#8217;t moved on at all since I was at University. Ultimately, I found working with a draft specification, no documentation and a severe lack of tools too much for X3D to remain compelling, although when I was recently approached to develop an on-line model of a musical instrument that has recently been invented, my first inclination was to catch up with X3D and see if it had become any more mature or easier to work with.</p>
<p>My first stop was checking out what tools were available. The Web3D consoritum keep a <a href="http://www.web3d.org/x3d/content/examples/X3dResources.html#Applications">list of players and editors</a> that is currently more useful than a Google search, mainly because so many tools are propreitary and only run on Windows. I was running on Mac OSX, and it took a while to find any editors that were helpful at all. But before I nearly gave in to running parallels and WinXP, I found that X3D-Edit has become much more useful and featured. A Java-based Netbeans mod, it comprises a built-in Xj3D browser for easy preview (just hit right-mouse and its the first option) as well as tight integration with any other players; I was checking my scene in the excellent <a href="http://freewrl.sourceforge.net/">FreeWRL</a>. I found that the navigation tree and code-snapping features took a great deal of complexity out of the complex model I was supplied with, and the import from VRML 2.0 worked like a charm. Despite the more powerful features, I found that the packaging of X3DEdit is rather awkward and un-mac like; the executable is a shell command to kick-start the Java VM, and the memory-hungry app forced me to quit and restart the editor many, many times.</p>
<p>However, to suddenly have found a tool that I could put up with for X3D development renewed those questions buzzing around in my head since discovering virtual reality: could we all easily develop 3D-environments, as easy as we&#8217;re writing blogs today? Will we all be wondering around with HUDs and building social networks in 3D-psychedelic tripped-out universes?</p>
<p>And then I get amongst the code, and I see that X3D is still very much back in the 90s. While 3D has come from<em> Wolfenstein3D</em> to <em>Ice Age</em> in the last ten or so years, its hard to see how I could sit in front of this computer for more than that long and achieve nothing more than a cone with X3D; and even a cone would be a bit 99 (pardon the pun). Thankfully, for this job I was supplied with a model; but even the user-interface of the browsers with their unusual viewing paradigms seem designed for little more than tracking a spherical object in a scene. My little brother uses Wii-motes to make music in a little 3D world; and yet even with a degree in computer science I don&#8217;t feel confident that I could take this technology anywhere near that, as cool as would be.</p>
<p>Nonetheless the ideals of the standard and the potential applications are too vital to ignore. Perhaps hope will come in the form of more open-source technology. I haven&#8217;t had the chance to check out <a href="http://www.blender.org/">blender</a>, but it seems to be a fully-fledged graphics package like Maya, without the several thousand pound price tag. The flux player has found an application and become <a href="http://www.vivaty.com/">Vivaty</a>, which looks promising as a standards-based second-life styled network. So for now, I&#8217;ll continue the trial-and-error with X3D.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2009/01/04/developing-x3d-with-x3dedit-on-mac-osx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>London Indymedia Web Development Goes Hyperactive!</title>
		<link>http://www.dangarland.co.uk/2008/12/20/london-indymedia-web-development-goes-hyperactive/</link>
		<comments>http://www.dangarland.co.uk/2008/12/20/london-indymedia-web-development-goes-hyperactive/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 15:04:35 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[CMS]]></category>

		<category><![CDATA[Debian]]></category>

		<category><![CDATA[Indymedia]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=48</guid>
		<description><![CDATA[Two months ago, Indymedia London launched a new version of an alternative London-centered news website using Ruby on Rails and Debian/GNU Linux. After several months of indecision about what system to use for content management; whether to continue development of an existing Java-servlet application, to use Drupal or to develop something new, the London-based collective [...]]]></description>
			<content:encoded><![CDATA[<p>Two months ago, Indymedia London launched a new version of an <a title="London IMC" href="http://london.indymedia.org.uk">alternative London-centered news website</a> using Ruby on Rails and Debian/GNU Linux. After several months of indecision about what system to use for content management; whether to continue development of an existing Java-servlet application, to use Drupal or to develop something new, the London-based collective have arrived at a topical activist news website that has successfully been adopted by the activist community, and is fresher and richer in content than ever before.</p>
<p>The system, called Hyperactive, is a rails application that embodies the strongest recent trends in web development. It make extensive use of RSS to syndicate content, including videos and comments a la YouTube and is soon to include mapping from OpenStreetMap on its events section. It has also been adopted by a Danish IMC, and looks set to become more established in the wider network.</p>
<p>It is a triumph of the <a title="Open Source" href="http://en.wikipedia.org/wiki/Open_source">open-source software development model</a>, based entirely on free-software, and developed without traditional planning constraints or limitations. It is particularly pleasing that Indymedia bring their own non-hierarchical ideals to the process; a group of individuals from different backgrounds and countries are contributing to the codebase, although the group have never all been together in the same space, nor is there an appointed manager or team leader.</p>
<p>I&#8217;m glad to say I have been making my first commits to the codebase recently, contributing a &#8216;featured groups&#8217; section to the bottom of the homepage. Starting from an idea over beers in a South-London pub, the feature was coded on the spot and turned around in less than a couple of weeks. In essence, the available open-source technology, from operating systems to IDEs to version control make it possible for part-time energy to result in professional and fresh websites.</p>
<p>The project demonstrates quite clearly what is possible, when a small number of unpaid developers achieve functionality not far behind huge corporate websites. Behind them are even more volunteers contributing to moderation, testing and promotion.</p>
<p>Yet the problems of under-capitalisation and lack of resources are still present. The huge corporations, with their advertising revenue and share capital have the advantage of huge bandwidth and hardware redundancy, while many of the alternative websites rely on donations and a dedicated following. The <a href="http://london.indymedia.org.uk/articles/203">dilemma as developers</a> is how continue innovating with open-source software whenever it falls behind the latest products from the software giants; for the open-source developer, nurturing new projects by utilising and contributing to them can sometimes mean offering an uncompetitive product, and in the field of news and politics there are huge resources available to the mainstream media.</p>
<p>But for the sake of a few hours work here and there, when you can see the difference made by your efforts; when it is <em>fun</em> to work on an open-source project, its hard to see the open-source and voluntary sources of energy ever drying up.</p>
<p>If you are interested in contributing to the development of the project, have a look at <a title="Hyperactive" href="http://projects.escapegoat.org/projects/show/hyperactive">escapegoats project website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/12/20/london-indymedia-web-development-goes-hyperactive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Titan unleashed!</title>
		<link>http://www.dangarland.co.uk/2008/12/06/titan-unleashed/</link>
		<comments>http://www.dangarland.co.uk/2008/12/06/titan-unleashed/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 23:48:07 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Servers and Configuration]]></category>

		<category><![CDATA[tyan transport gt24 debian]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=39</guid>
		<description><![CDATA[I have invested some time and money into acquiring my own web platform which I will be using to host my upcoming websites for myself and for my clients. I have called my new system Titan, after the people who bought it, and because a Titan is a powerful deity; Titan is both powerful and [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_40" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.dangarland.co.uk/wp-content/uploads/2008/12/img00136.jpg"><img class="size-medium wp-image-40" title="Tyan Mainboard" src="http://www.dangarland.co.uk/wp-content/uploads/2008/12/img00136.jpg" alt="Tyan Mainboard" width="300" height="225" /></a><p class="wp-caption-text">Tyan Mainboard</p></div>
<div class="mceTemp">I have invested some time and money into acquiring my own web platform which I will be using to host my upcoming websites for myself and for my clients. I have called my new system Titan, after the people who bought it, and because a Titan is a powerful deity; Titan is both powerful and omnipresent (provided you have a web connection).</div>
<div class="mceTemp">I&#8217;ve spent the day assembling my components and installing Debian Etch 4.0. The system is a dual-core, dual-CPU AMD 64-bit Tyan Transport GT24, with 16GB RAM and 1TB RAID. So far, I&#8217;m happy with how the system is holding out, although I had a bit of bother deciding on how to handle the RAID functionality. It turns out that the RAID capacity of the controller is what linux geeks refer to as &#8216;Fake RAID&#8217;, because it is not a true hardware RAID controller that presents the seperate disks to the OS as one array; so I was confused when Debain was showing all four disks. In the end, I used a software RAID 5 setup, which is working rather well.</div>
<div class="mceTemp">Ultimately, Titan will be handling all of the traffic for my band&#8217;s upcoming music website&#8230;. more on that soon. However now that I have the capacity to host some extra sites I will be able to take on some hosting arrangements, and I plan to host the websites I will be developing in future.</div>
<div class="mceTemp">
<div id="attachment_41" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.dangarland.co.uk/wp-content/uploads/2008/12/img00137.jpg"><img class="size-medium wp-image-41" title="More Tyan Mainboard" src="http://www.dangarland.co.uk/wp-content/uploads/2008/12/img00137.jpg" alt="Another shot of innards" width="300" height="225" /></a><p class="wp-caption-text">Another shot of innards</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/12/06/titan-unleashed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reckon you can design a website?</title>
		<link>http://www.dangarland.co.uk/2008/11/26/reckon-you-can-design-a-website/</link>
		<comments>http://www.dangarland.co.uk/2008/11/26/reckon-you-can-design-a-website/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 22:58:01 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Thoughts]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[music]]></category>

		<category><![CDATA[radiohead]]></category>

		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=37</guid>
		<description><![CDATA[You might have heard about the on-line marketing antics of Radiohead in recent months. They&#8217;ve already done an honesty-bar-style website to flog their latest album, and now they&#8217;re selling bits and pieces of their tracks on iTunes on their remix website. According to WASTE, their previous experiment with Nude surpassed all expectations, with some impressive [...]]]></description>
			<content:encoded><![CDATA[<p>You might have heard about the on-line marketing antics of Radiohead in recent months. They&#8217;ve already done an honesty-bar-style website to flog their latest album, and now they&#8217;re selling bits and pieces of their tracks on iTunes on their <a href="http://www.radioheadremix.com">remix website</a>. According to WASTE, their previous experiment with <em>Nude</em> surpassed all expectations, with some impressive statistics: over six million visitors, 10 terabytes transfer and over two thousand submitted mixes.</p>
<p>So I was one of the 1800 or so to try my hand at a <a href="http://www.dangarland.me.uk">Reckoner remix</a>. As it goes, I don&#8217;t think much of the original, and I had to re-listen to the album to remind myself how it went. I suppose a few people agree with me, since there were fewer submissions than the <em>Nude</em> competition. To be totally honest, there is nothing in the top twenty worth listening to twice, IMO. However, this is supposed to be a web development blog so I will move on.</p>
<p>The website, for those who haven&#8217;t seen it, presents the uploaded tracks in a straight list, ten to a page, so a couple of hundred pages with MORE / PREVIOUS links. At the top, you can choose to scroll through the list by most popular, most recent or you can view a randomly-selected list. Each track is displayed with its name, and a flash player and vote button. The voting is tracked seemingly by IP (making my home static address a disadvantage).</p>
<p>Perhaps not surprisingly, there is a huge disparity between the amount of attention received for the top twenty and for the rest, and unless a mix is in the top two hundred it seems improbable that anyone would ever chance on it at all.</p>
<p>To combat this, Radiohead provide widgets that can be posted on external websites. Like blogs, widgets are another buzz-word for something that has been around for some time; a bunch of HTML code that displays an object, but the use of widgets is certainly a winning strategy for getting your website noticed. In essence, facilitating and encouraging the use of widgets turns your visitors into a massive, distributed marketing machine. After all, here I am, writing about the project on my blog, posting a link back to Radiohead, effectively doing part of their marketing for them.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://radioheadremix.com/widget/remix_widget_reckoner.swf?remix_id=1289" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://radioheadremix.com/widget/remix_widget_reckoner.swf?remix_id=1289"></embed></object></p>
<p>I posted this widget on my own homepage, my blog (obviously), my myspace and the myspaces of anyone who&#8217;d approve the comment, and yet I still have only a handful of votes. I refuse to believe the quality of the music was a factor, its just only a few people would have seen this. On the other hand, the use of widgets presumably helped Contract Jack; who is at the time of writing both in first and second place.</p>
<p>However much I am impressed by Radiohead&#8217;s innovation in such a new area, I reckon that they could have done much more in their main website design to help promote the mixes that didn&#8217;t get uploaded in the first few days (and hence would never make the top twenty pages). One simple enhancement would be to display a page of the most rising mixes; that is, rather than ranking mixes by their overall number of votes, display the mixes in order of how many positions they have jumped that week. That way, the &#8216;popular&#8217; mixes at the top wouldn&#8217;t feature, but interesting mixes uploaded after the first few weeks would have a chance to get a similar amount of attention as the top twenty. Once the mixes move towards the top of the charts, the number of votes required to move up the charts increases, forcing these mixes off the &#8216;most risen&#8217; list.</p>
<p>But anyway, vote on my remix if you like it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/11/26/reckon-you-can-design-a-website/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Does anyone sell CPUs anymore?</title>
		<link>http://www.dangarland.co.uk/2008/11/13/does-anyone-sell-cpus-anymore/</link>
		<comments>http://www.dangarland.co.uk/2008/11/13/does-anyone-sell-cpus-anymore/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 13:34:21 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Servers and Configuration]]></category>

		<category><![CDATA[AMD]]></category>

		<category><![CDATA[Barebones]]></category>

		<category><![CDATA[Intel]]></category>

		<category><![CDATA[Servers]]></category>

		<category><![CDATA[Tyan]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=34</guid>
		<description><![CDATA[I thought I used to know some good places on the web to get hold of affordable components, but I have been totally frustrated in my search for AMD and Intel CPUs today.
I&#8217;m putting together a server that will be used to support my endeavours as a freelance web developer. Very soon I will have [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I used to know some good places on the web to get hold of affordable components, but I have been totally frustrated in my search for AMD and Intel CPUs today.</p>
<p>I&#8217;m putting together a server that will be used to support my endeavours as a freelance web developer. Very soon I will have a server that is hosted in a data centre (rather than my living room), that I can use to host the web projects that I&#8217;m working on.</p>
<p>I am considering the Tyan barebone systems for starters, and these seem to be readily available. But after spending a couple of hours on scan, ebuyer and ebay, as well as google shopping and other sites I&#8217;ve never visited before, it would seem that I can&#8217;t buy any CPUs to put in the damn thing. Have AMD and Intel gone bust without telling me?</p>
<p>Scan don&#8217;t even stock 1000 series or 2000 series opterons, although they sell a Tyan barebones that takes dual-core opterons. I&#8217;ve had some experience using sun servers and HP servers at <a href="http://www.dangarland.co.uk/cv/experience.html">my time with Titan Entertainment</a>, but I was hoping to save a few quid building my own. Anyone know any good e-tailers or know why AMD CPUs are so scarce?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/11/13/does-anyone-sell-cpus-anymore/feed/</wfw:commentRss>
		</item>
		<item>
		<title>htpasswd or htdigest ?</title>
		<link>http://www.dangarland.co.uk/2008/11/07/htpasswd-or-htdigest/</link>
		<comments>http://www.dangarland.co.uk/2008/11/07/htpasswd-or-htdigest/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 11:45:56 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Servers and Configuration]]></category>

		<category><![CDATA[apache2]]></category>

		<category><![CDATA[configuration]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=32</guid>
		<description><![CDATA[Gotcha! Don&#8217;t make the mistake I just made when setting up digest authentication in apache2. Depending on whether you&#8217;re using basic or digest authentication, you need to use a different command line tool to generate your passwords. After fifteen minutes of confusion, I realised that I needed htdigest to generate my passwords rather than htpasswd, [...]]]></description>
			<content:encoded><![CDATA[<p>Gotcha! Don&#8217;t make the mistake I just made when setting up digest authentication in apache2. Depending on whether you&#8217;re using basic or digest authentication, you need to use a different command line tool to generate your passwords. After fifteen minutes of confusion, I realised that I needed htdigest to generate my passwords rather than htpasswd, although this crucial fact is not obvious from a glance at the documenation.</p>
<p>A typical setup for digest authentication is:</p>
<pre>&lt;Location /some/url&gt;
      AuthType Digest
      AuthName "realm"
      AuthDigestDomain /some/url
      AuthUserFile /path/to/.htpasswd
      Require valid-user</pre>
<pre>&lt;/Location&gt;</pre>
<p>Then use htdigest&#8230;</p>
<pre>htdigest -c /path/to/.htpasswd realm username</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/11/07/htpasswd-or-htdigest/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Arranging a list as a grid using CSS</title>
		<link>http://www.dangarland.co.uk/2008/09/27/arranging-a-list-as-a-grid-using-css/</link>
		<comments>http://www.dangarland.co.uk/2008/09/27/arranging-a-list-as-a-grid-using-css/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 20:05:44 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=26</guid>
		<description><![CDATA[One of the things that I found that CSS doesn&#8217;t handle adequately is arranging a layout as a grid.  Back in the day, when you&#8217;d have tables nested in tables nested in tables, it was a horiffic mess, but at least I always knew where I was with layout; and the table element seemed to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that I found that CSS doesn&#8217;t handle adequately is arranging a layout as a grid.  Back in the day, when you&#8217;d have tables nested in tables nested in tables, it was a horiffic mess, but at least I always knew where I was with layout; and the table element seemed to handle different browsers more reliably too. Now we have a situation where the standard &#8216;correct&#8217; approach will not work in IE, leaving the developer the choice of a hacky-workaround or providing for IE seperately.</p>
<p>Anyway, these days its bad form to use tables for layout, so I went about making a list of tracks on my web application into a grid using the CSS approach.</p>
<p>CSS supports table-like layouts using the display:table, display:table-row, display:table-cell styles. Whereas before you&#8217;d have</p>
<pre>&lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;Hello&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;</pre>
<p>Now you can use any element to form your table.</p>
<pre>&lt;div style="display:table"&gt;
  &lt;div style="display:table-row"&gt;
    &lt;div style="display:table-cell"&gt;Hello&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
<p>What I wanted was to display my list of track objects on the screen using a grid, to make the best use of the horizontal space. But, when styles were turned off, I wanted to keep the list structure. I ended up using</p>
<pre>&lt;div class="trackgrid"&gt;
  &lt;ul&gt;
    &lt;li&gt;Track one&lt;li&gt;
    &lt;li&gt;Track two...&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

div .trackgrid
{
  display: table;
}

div .trackgrid ul
{
 display : table-row;
}

.trackgrid ul li
{
  display : table-cell;
  list-display : none;
}</pre>
<p>Which gives the desired effect of arranging the list elements horizontally and without the bullet marks. I used the same technique to create a horizonal menubar, and there are several other uses for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/09/27/arranging-a-list-as-a-grid-using-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Exporting mySQL data into sqlite3</title>
		<link>http://www.dangarland.co.uk/2008/09/27/exporting-mysql-data-into-sqlite3/</link>
		<comments>http://www.dangarland.co.uk/2008/09/27/exporting-mysql-data-into-sqlite3/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 18:53:56 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[mySQL]]></category>

		<category><![CDATA[sqlite3]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=23</guid>
		<description><![CDATA[When working in ruby on rails 2.0.2 I keep my development database in the default sqlite3 but use mysql for the production database on a seperate test server. I found that after a while of use from my alpha-testers, the test server database for my web app had been filling up with useful, real-life data, [...]]]></description>
			<content:encoded><![CDATA[<p>When working in ruby on rails 2.0.2 I keep my development database in the default sqlite3 but use mysql for the production database on a seperate test server. I found that after a while of use from my alpha-testers, the test server database for my web app had been filling up with useful, real-life data, that I wanted to use on my development environment. So I needed a way to transfer the data from mySQL (5.0.32) into sqlite3.</p>
<p>I exported the data from mySQL using the mysqldump utility. The mysqldump tool is normally used for backing up mySQL databases, but with a but of cunning can be used to export data into other formats. Firstly, since my sqlite3 development database already exists and can be recreated from the rake migration scripts, I didn&#8217;t need any of the SQL statements that modify or create the schema. You can tell mysqldump that with the &#8211;no-create-db and &#8211;no-create-info arguements to mysqldump:</p>
<pre>mysqldump --no-create-db --no-create-info yourdatabase</pre>
<p>Secondly, mysqldump uses its comma-seperated INSERT feature for brevity. However, sqlite doesn&#8217;t like this, so I wanted it to use a sepereate INSERT statement for each row. This is done with the &#8211;extended-insert=0 option</p>
<pre>mysqldump --no-create-db --no-create-info --extended-insert=0 yourdatabase</pre>
<p>Lastly, I wanted to ignore any of the comments or locking statements and output only those INSERT statements into a file. I did this using grep and piping the output:</p>
<pre>mysqldump --no-create-db --no-create-info --extended-insert=0 yourdatabase | grep 'INSERT'</pre>
<p>you can then redirect this output into a file</p>
<pre>mysqldump --no-create-db --no-create-info --extended-insert=0 yourdatabase | grep 'INSERT' &gt; yourdatabase.sql</pre>
<p>The one problem that I found with this output was that sqlite3 handles escape characters differently from mySQL, so I had to manually replace any instances of \&#8217; with &#8221; using my text editor.</p>
<p>This yourdatabase.sql file then contains a load of INSERT statements. Since I didn&#8217;t need the data in my development database anymore, I decided that the easiest thing to do would be to just delete the db/development.sqlite3 database and use rake to rebuild the schema, to leave me a clean, empty database. This avoids problems such as clashing primary key entries.</p>
<pre>rm db/development.sqlite3
rake db:create
rake db:migrate</pre>
<p>Finally, to import my data into sqlite3 I used the .read command in the interactive command-line tool</p>
<pre>.read yourdatabase.sql</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/09/27/exporting-mysql-data-into-sqlite3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;m back&#8230;</title>
		<link>http://www.dangarland.co.uk/2008/09/26/im-back/</link>
		<comments>http://www.dangarland.co.uk/2008/09/26/im-back/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 16:15:23 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Search Engines]]></category>

		<category><![CDATA[dan garland]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=21</guid>
		<description><![CDATA[I suppose that its a bit egotistical to search one&#8217;s own name in Google, but I&#8217;m pleased to say that I&#8217;m back to the #1 spot for the UK google listings, beating off some stiff competition from the Dan Garland construction company, Oklahoma. Admittedly, I have been a bit reclusive recently, but I hope that [...]]]></description>
			<content:encoded><![CDATA[<p>I suppose that its a bit egotistical to search one&#8217;s own name in Google, but I&#8217;m pleased to say that I&#8217;m back to the #1 spot for the UK google listings, beating off some stiff competition from the Dan Garland construction company, Oklahoma. Admittedly, I have been a bit reclusive recently, but I hope that this puts to bed the argument of which is the most relevant Dan Garland website on the Internet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/09/26/im-back/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using name based virtual hosting with apache2 and SSL</title>
		<link>http://www.dangarland.co.uk/2008/09/24/using-name-based-virtual-hosting-with-apache2-and-ssl/</link>
		<comments>http://www.dangarland.co.uk/2008/09/24/using-name-based-virtual-hosting-with-apache2-and-ssl/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 17:00:58 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Servers and Configuration]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[apache2]]></category>

		<category><![CDATA[configuration]]></category>

		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://www.dangarland.co.uk/?p=16</guid>
		<description><![CDATA[One of the things I found when getting my Wordpress installation going was that I wanted to run a seperate subdomain for it, whilst keeping my secure server that I use for developing websites running SSL on port 443.
Normally, to set up virtual hosting, I would add something like this in my site&#8217;s config file:
&#60;VirtualHost [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I found when getting my Wordpress installation going was that I wanted to run a seperate subdomain for it, whilst keeping my secure server that I use for developing websites running SSL on port 443.</p>
<p>Normally, to set up virtual hosting, I would add something like this in my site&#8217;s config file:</p>
<p>&lt;VirtualHost *&gt;</p>
<p>But to keep the hosts listening on the right ports, you need to add the port number to the wildcard:</p>
<p>&lt;VirtualHost *:80&gt;</p>
<p>Trouble was, when you use the NameVirtualHost directive in apache2, you can&#8217;t mix the port numbers.</p>
<p>The solution was found on Friend&#8217;s of Bart http://fob.po8.org/comment/reply/289</p>
<p>Simply use</p>
<p>NameVirtualHost *:80</p>
<p>NameVirtualHost *:443</p>
<p>Both in your apache2.conf file. Then in each of your site&#8217;s config file, use the explicit port number on the VirtualHost directive:</p>
<p>&lt;VirtualHost *:80&gt;</p>
<p>&lt;VirtualHost *:443&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dangarland.co.uk/2008/09/24/using-name-based-virtual-hosting-with-apache2-and-ssl/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
