<?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>digitalself &#187; Code</title>
	<atom:link href="http://www.digitalself.org/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitalself.org</link>
	<description>Realization of self in a digital world</description>
	<lastBuildDate>Fri, 03 Sep 2010 10:13:04 +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>Chroots 0.2 &#8211; First Public release</title>
		<link>http://www.digitalself.org/2008/12/10/chroots-02-first-public-release/</link>
		<comments>http://www.digitalself.org/2008/12/10/chroots-02-first-public-release/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 01:33:54 +0000</pubDate>
		<dc:creator>alfmatos</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[chroots]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.digitalself.org/?p=143</guid>
		<description><![CDATA[Chroots is a collection of bash scripts to create, maintain, manage and use several chroot environments on debian based systems. It sports such features as privilege drop, multiple chroot maintenance and caching. This is the first public release, under GPLv3. The software is now in a state where I can use it every day to [...]]]></description>
			<content:encoded><![CDATA[<p><em>Chroots is a collection of bash scripts to create, maintain, manage and use several chroot environments on debian based systems. It sports such features as privilege drop, multiple chroot maintenance and caching.</em></p>
<p>This is the first public release, under GPLv3. The software is now in a state where I can use it every day to maintain chroots. To download the source code, use the link below. There is also a git repository available for cloning. Chroots is developed under Ubuntu, and can build debian and Ubuntu chroots through deboostrap.</p>
<p><span id="more-143"></span></p>
<p><strong>Source Code</strong>: <a href="http://www.digitalself.org/files/chroots-0.2.tar.gz">chroots-0.2.tar.gz</a><br />
<strong>Git Repository</strong>: <a title="Chroots git repository" href="http://git.digitalself.org/?p=chroots.git">http://git.digitalself.org/?p=chroots.git</a></p>
<p>If anyone finds this useful, don&#8217;t hesitate to drop a comment with suggestions or feedback. I&#8217;m looking forward to it. Bug reports are nice, and will be handled. More information about <em>chroots</em> below, and inside the source package. In time, I might put up a page for the project. In the meantime, enjoy this release.</p>
<h3>About Chroots</h3>
<p>Chroots is a set of wrapper scripts around  debootstrap. debootstrap is an effective way of create a general purpose  build environment. While it is fairly simple to setup a working environment, it&#8217;s always necessary to perform several steps to actually login into a deboostrapped environment using chroot. It can  be a cumbersome task, hence chroots.</p>
<p>For test building packages there is already pbuilder. What pbuilder does is build a debian package in a freshly created chroot environment. This allows detecting build and dependency errors quite effectively. Nevertheless, to use pbuilder, an environment is setup every time and out of the user&#8217;s reach, and it is quite a difficult tool to use for the occasional packaging experiment.</p>
<p>This is where chroots comes in. It allows to easily configure setup and deploy a chroot environment, enabling everything from package tests to dependency check, or manual tarball compilation, keeping your production environment &#8216;clean&#8217;. It allows to maintain several chroot environments at the same time, so that it can be easy to test multiple systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalself.org/2008/12/10/chroots-02-first-public-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What does l10n, i18n or m4 mean ?</title>
		<link>http://www.digitalself.org/2008/08/27/what-does-l10n-i18n-or-m4-mean/</link>
		<comments>http://www.digitalself.org/2008/08/27/what-does-l10n-i18n-or-m4-mean/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 21:24:15 +0000</pubDate>
		<dc:creator>alfmatos</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monkey Business]]></category>
		<category><![CDATA[autotools]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[m4]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[words]]></category>

		<guid isPermaLink="false">http://www.digitalself.org/?p=113</guid>
		<description><![CDATA[I have never understood what l10n stands for, nor i18n, nor m4 for that matter. But reading a good online book about autotools, there are a couple of words explaining that in fact m4 stands for Macro, which is m+4 chars. l10n is localization written as  &#8220;l+strlen(ocalizatio)+n&#8221;. Fun. Since I was on vacations while I [...]]]></description>
			<content:encoded><![CDATA[<p>I have never understood what <em>l10n</em> stands for, nor <em>i18n</em>, nor <em>m4</em> for that matter. But reading <a href="http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool">a good online book about autotools</a>, there are a couple of words explaining that in fact <em>m4</em> stands for <em>Macro</em>, which is m+4 chars. <em>l10n</em> is <em>localization</em> written as  &#8220;l+strlen(ocalizatio)+n&#8221;. Fun. Since I was on vacations while I read this, I had time to write a bash script to do this automatically while enhancing my bash skills. Here is the script:</p>
<pre>#!/bin/bash

STRING=$1
STRLEN=${#STRING}

A=${STRING:1:$STRLEN-2}
echo ${STRING:0:1}${#A}${STRING:$STRLEN-1:$STRLEN-1}</pre>
<p>Try running <em>internationalization</em> on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalself.org/2008/08/27/what-does-l10n-i18n-or-m4-mean/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Development &#8211; Improved Ubuntu Workflow</title>
		<link>http://www.digitalself.org/2008/05/04/web-development-improved-ubuntu-workflow/</link>
		<comments>http://www.digitalself.org/2008/05/04/web-development-improved-ubuntu-workflow/#comments</comments>
		<pubDate>Sun, 04 May 2008 15:37:14 +0000</pubDate>
		<dc:creator>alfmatos</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://www.digitalself.org/?p=70</guid>
		<description><![CDATA[Following my previous post on Web Development Workflow, I decided to be done with my procrastination and setup a local workflow, which keeps me location independent and autonomous. The work flow is simple: Develop and test locally, deploy remotely. I&#8217;m currently applying this towards the development of an improved theme for my blog, which is [...]]]></description>
			<content:encoded><![CDATA[<p>Following my previous post on <a href="http://www.digitalself.org/2008/04/21/web-development-workflow/">Web Development Workflow</a>, I decided to be done with my procrastination and setup a local workflow, which keeps me location independent and autonomous.</p>
<p>The work flow is simple: Develop and test locally, deploy remotely. I&#8217;m currently applying this towards the development of an improved theme for my blog, which is basically this one, plus minor adjustments.</p>
<p>My setup is an Apache 2 webserver, with PHP and mySQL. On top of this I enable user dirs for the webserver, and deploy a local wordpress, which in fact runs a backup database from my production site.</p>
<p>First , install apache2,php and mysql support:</p>
<pre>sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server</pre>
<p>Now enable user directories support (things like <em>localhost/~jonhdoe</em> which actually live in <em>/home/johndoe/public_html</em>) and create the public_html folder:</p>
<pre>sudo a2enmod userdir
mkdir $HOME/public_html</pre>
<p>Another twist, since this is my main workstation and I don&#8217;t want an apache+mysql setup running all the time, is to remove all of the startup scripts from the default boot runlevels:</p>
<pre>sudo update-rc.d -f mysql remove
sudo update-rc.d -f apache2 remove</pre>
<p>I then run a script to start my environment when I want to code some web bits:</p>
<pre>#!/bin/bash

/etc/init.d/apache2 start
/etc/init.d/mysql start</pre>
<p>Don&#8217;t forget to make the script executable:</p>
<pre>chmod +x bin/start-web-dev.sh</pre>
<p>After all this I just installing web apps locally. In my case I just install <a href="http://www.wordpress.org">WordPress</a> by uncompressing it into <em>public_html</em>, creating a DataBase using phpmyadmin, and running the install. After that I went to my production wordpress exported the DB, and imported it on the local wordpress. And I&#8217;m done.</p>
<p>As a finally twist I created a git repository of my theme, so i just modify+commit+push, and pull on the main website. Since I can push only when I need or can, this setup is really working for me.</p>
<p>Any further enhancements are welcome, so feel free to drop some suggestions to improve on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalself.org/2008/05/04/web-development-improved-ubuntu-workflow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web Development Workflow</title>
		<link>http://www.digitalself.org/2008/04/21/web-development-workflow/</link>
		<comments>http://www.digitalself.org/2008/04/21/web-development-workflow/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 21:27:58 +0000</pubDate>
		<dc:creator>alfmatos</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[My World]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sshfs]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.digitalself.org/?p=53</guid>
		<description><![CDATA[Lately I&#8217;ve been working on some web projects, nothing major, one of which is the template for this blog. One thing that always bugs me is the workflow for web development. What is the best workflow for such projects, that require server side testing ? How to develop a WordPress theme without major hassle ? [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been working on some web projects, nothing major, one of which is the template for this blog. One thing that always bugs me is the workflow for web development. What is the best workflow for such projects, that require server side testing ?</p>
<p>How to develop a WordPress theme without major hassle ? Or a php website for that matter ?</p>
<h2>Option 1</h2>
<p>Deploy a local http server, and test it as you code it on your local machine.</p>
<h3>Downsides</h3>
<ul>
<li>Requires deployment of local http server and mysql server and wordpress/custom stuff.</li>
</ul>
<h3>Upsides</h3>
<ul>
<li>Fast code/test/fix cycle.</li>
<li>If you screw up, just reinstall or star over.</li>
<li>Does not bother visitor on production sites.</li>
</ul>
<h2>Option 2</h2>
<p>Code directly on the server. Through ssh.</p>
<h3>Downsides</h3>
<ul>
<li>Remote work is usually slugish.</li>
<li>Requires exporting the X windows for minimal usefulness.</li>
<li>Too much work to get into a usable state.</li>
<li>Direct work on the database/project/software.</li>
</ul>
<h3>Upsides</h3>
<ul>
<li>Direct work on the database/project/software.</li>
<li>Already deployed server/php/mysql/wordpress whatever software.</li>
</ul>
<p>But I recently found a third option that seems viable.</p>
<h2>Option 3</h2>
<p>Mount the remote working directory through sshfs.</p>
<h3>Downsides</h3>
<ul>
<li>Remote work can be slugish.</li>
<li>Direct work on the database/project/software.</li>
</ul>
<h3>Upsides</h3>
<ul>
<li>Direct work on the database/project/software.</li>
<li>Simple deployment. Just mount the damn thing and be on your way.</li>
<li>Take advantage of your desktop/development environment.</li>
</ul>
<p>This is the latest and greatest solution so far. But this still doesn&#8217;t sound like perfect, because if I want to code a wordpress theme/template I have to enable it and work on my production website, which hinders both development and visitors.</p>
<p>Has anyone got a great solution for this ? A great workflow ? Or am I just being lazy and should install everything locally ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalself.org/2008/04/21/web-development-workflow/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
