<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Andrés J. Díaz &#187; code</title>
	<atom:link href="http://ajdiaz.wordpress.com/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://ajdiaz.wordpress.com</link>
	<description>Tips and tricks for system administration</description>
	<lastBuildDate>Wed, 23 Dec 2009 23:23:03 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='ajdiaz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/2e3e45fcc57489501b042e4119949cb4?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Andrés J. Díaz &#187; code</title>
		<link>http://ajdiaz.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ajdiaz.wordpress.com/osd.xml" title="Andrés J. Díaz" />
		<item>
		<title>python module to handle runit and daemontools supervised services</title>
		<link>http://ajdiaz.wordpress.com/2009/12/23/python-module-to-handle-runit-and-daemontools-supervised-services/</link>
		<comments>http://ajdiaz.wordpress.com/2009/12/23/python-module-to-handle-runit-and-daemontools-supervised-services/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 22:56:04 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[systems]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/?p=80</guid>
		<description><![CDATA[Last month I needed to install runit in some servers to supervise a couple of services. Unfortunately my management interface cannot handle the services anymore, so I decided to write a small module in python to solve this handicap, and that is the result!.
With this module you can handle in python environment a number of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=80&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last month I needed to install <a href="http://smarden.org/runit/">runit</a> in some servers to supervise a couple of services. Unfortunately my management interface cannot handle the services anymore, so I decided to write a small module in python to solve this handicap, and <a href="http://pastebin.com/pastebin.php?dl=f3e7ff3c4">that is the result!</a>.</p>
<p>With this module you can handle in python environment a number of runit scripts. I think that this might be work for daemontools too, but I do not test yet. Let&#8217;s see an example <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><code><br />
&gt;&gt;&gt; import supervise<br />
&gt;&gt;&gt; c = supervise.Service("/var/service/httpd")<br />
&gt;&gt;&gt; print s.status()<br />
{'action': None, 'status': 0, 'uptime': 300L, 'pid': None}<br />
&gt;&gt;&gt; if s.status()['status'] == supervise.STATUS_DOWN: print "service down"<br />
service down<br />
&gt;&gt;&gt; s.start()<br />
&gt;&gt;&gt; if s.status()['status'] == supervise.STATUS_UP: print "service up"<br />
service up<br />
</code></p>
<p>Personally I use this module with <a href="http://rpyc.wikidot.com/">rpyc</a> library to manage remotely the services running in a host, but it too easy making a web interface, for example using <a href="http://bottle.paws.de/">bottle</a>:</p>
<p><code><br />
import supervise<br />
import simplejson<br />
from bottle import route, run</p>
<p>@route('/service/status/:name')<br />
def service_status(name):<br />
   """ Return a json with service status """<br />
   return simplejson.dumps( supervise.Service("/var/service/" +<br />
name).status() )</p>
<p>@route('/service/up/:name')<br />
def service_up(name):<br />
    """ Start the service and return OK """<br />
    c = supervise.Service("/var/service/" + name)<br />
    c.start()<br />
    return "OK UP"</p>
<p>@route('/service/down/:name')<br />
def service_down(name):<br />
    """ Stop the service and return OK """<br />
    c = supervise.Service("/var/service/" + name)<br />
    c.down()<br />
    return "OK DOWN"</p>
<p>from bottle import PasteServer<br />
run(server=PasteServer)<br />
</code></p>
<p>Now you can stop your service just only point your browser <a href="http://localhost/service/down/httpd" rel="nofollow">http://localhost/service/down/httpd</a> (to down http service in this case).</p>
<p>Enjoy!</p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=80&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2009/12/23/python-module-to-handle-runit-and-daemontools-supervised-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
		<item>
		<title>libnsss_map library</title>
		<link>http://ajdiaz.wordpress.com/2009/11/21/the-libnss_map-module-is-a-nss-library-t/</link>
		<comments>http://ajdiaz.wordpress.com/2009/11/21/the-libnss_map-module-is-a-nss-library-t/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 18:41:59 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[distribute]]></category>
		<category><![CDATA[nss]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[systems]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/2009/11/21/the-libnss_map-module-is-a-nss-library-t/</guid>
		<description><![CDATA[Last week I was working on libnss_map, aNSS library module to map user credentials to existent user in the system. This module is intended to be used in high virtualized environment like cloud computing or embedded systems which require a lot of users.
When a new user has been authenticated by PAM or other authentication mechanism, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=73&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last week I was working on <a href="http://connectical.com/projects/libnss-map">libnss_map</a>, aNSS library module to map user credentials to existent user in the system. This module is intended to be used in high virtualized environment like cloud computing or embedded systems which require a lot of users.</p>
<p>When a new user has been authenticated by PAM or other authentication mechanism, then the nss_map module create a virtual user when credentials mapped to an existent user. For example, suppose here are a user virtual, created a la standard way on /etc/passwd:</p>
<pre>
    virtual:x:15000:15000:virtual user for nss_map:/dev/null:/sbin/nologin
</pre>
<p>Then edit the /etc/nssmap.conf<br />
file:</p>
<pre>
    virtual:x:15000:15000:virtual user for nss_map:/home/virtual:/bin/bash
</pre>
<p>Note that the user directory is really a base dir in nssmap, each new user can search their home in <code>/home/virtual/logname</code>, where logname is the name used by user to login, and the /home/virtual is the prefix setted in <code>nssmap.conf</code>.</p>
<p>As usual, you can get the project from <a href="http://connectical.com/projects/libnss-map" rel="nofollow">http://connectical.com/projects/libnss-map</a>.</p>
<p>Enjoy!</p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=73&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2009/11/21/the-libnss_map-module-is-a-nss-library-t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
		<item>
		<title>Distributed tools</title>
		<link>http://ajdiaz.wordpress.com/2009/04/03/distributed-tools/</link>
		<comments>http://ajdiaz.wordpress.com/2009/04/03/distributed-tools/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 18:29:22 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/2009/04/03/distributed-tools/</guid>
		<description><![CDATA[For last months I needed to maintain a number of heterogeneous servers for mi work, I need to do some usually actions, like update a config file, restart a service, create local users etc. 
For this purposes there are a lot of applications, like dsh (or full csm), pysh, shmux and many others (only need [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=60&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For last months I needed to maintain a number of heterogeneous servers for mi work, I need to do some usually actions, like update a config file, restart a service, create local users etc. </p>
<p>For this purposes there are a lot of applications, like dsh (or full csm), pysh, shmux and many others (only need to perform a search in google using phrase &#8220;distributed shell&#8221;). Unfortunately for me, I want a easy-to-parse solution, because I&#8217;ve a big (really big) number of servers, and I want a single cut-based/awk parsing, and also I need to do some actions as other users (like root, for example) via sudo. Althought many of the existants solutions offers me a subset of this features, I cannot found a complete solution. So I decided to create one <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>You can find the code, and some packages in the <a href="https://connectical.com/projects/dtools">dtools</a> development site. I was use this solution in production environment from months with excelent results, and you can feel free to use.</p>
<p>Of course, its free (of freedom) software, distributed under MIT license.</p>
<p>Enjoy and remember: feedback are welcome <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=60&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2009/04/03/distributed-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
		<item>
		<title>netstrings implementation</title>
		<link>http://ajdiaz.wordpress.com/2008/08/09/netstrings-implementation/</link>
		<comments>http://ajdiaz.wordpress.com/2008/08/09/netstrings-implementation/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 16:27:39 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/?p=52</guid>
		<description><![CDATA[This week I publish a tiny library to manage netstrings, as described in Bernstein&#8217;s paper. This library is wirten in C and provide a very basic implementation for small applications. I use this library in some projects for months, and now a publish the code over MIT License in launchpad.
You can visit the page of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=52&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This week I publish a tiny library to manage <a href="http://cr.yp.to/proto/netstrings.txt">netstrings</a>, as described in <a href="http://en.wikipedia.org/wiki/Daniel_J._Bernstein">Bernstein</a>&#8217;s paper. This library is wirten in C and provide a very basic implementation for small applications. I use this library in some projects for months, and now a publish the code over <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a> in launchpad.</p>
<p>You can visit the <a href="http://launchpad.net/netstr">page of the project in launchpad</a>, or get the code via bzr:</p>
<pre>
bzr get lp:netstr
</pre><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ajdiaz.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ajdiaz.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=52&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2008/08/09/netstrings-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
		<item>
		<title>bash ini parser</title>
		<link>http://ajdiaz.wordpress.com/2008/02/09/bash-ini-parser/</link>
		<comments>http://ajdiaz.wordpress.com/2008/02/09/bash-ini-parser/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 18:42:07 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/?p=40</guid>
		<description><![CDATA[In some situations i like to use INI files as configuration files, as python do. But bash do not provide a parser for these files, obviously you can use a awk code or a couple of sed calls, but if you are bash-priest and do not want to use nothing more, then you can try [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=40&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In some situations i like to use INI files as configuration files, as python do. But bash do not provide a parser for these files, obviously you can use a awk code or a couple of sed calls, but if you are bash-priest and do not want to use nothing more, then you can try the following obscure code:</p>
<pre>
cfg.parser () {
    IFS=$'\n' &amp;&amp; ini=( $(&lt;$1) )              # convert to line-array
    ini=( ${ini[*]//;*/} )                   # remove comments
    ini=( ${ini[*]/#[/\}$'\n'cfg.section.} ) # set section prefix
    ini=( ${ini[*]/%]/ \(} )                 # convert text2function (1)
    ini=( ${ini[*]/=/=\( } )                 # convert item to array
    ini=( ${ini[*]/%/ \)} )                  # close array parenthesis
    ini=( ${ini[*]/%\( \)/\(\) \{} )         # convert text2function (2)
    ini=( ${ini[*]/%\} \)/\}} )              # remove extra parenthesis
    ini[0]=''                                # remove first element
    ini[${#ini[*]} + 1]='}'                  # add the last brace
    eval "$(echo "${ini[*]}")"               # eval the result
}
</pre>
<p></p>
<p>And then you can parse your ini files as following:</p>
<pre>
# parse the config file called 'myfile.ini', with the following
# contents::
#   [sec2]
#   var2='something'
cfg.parser 'myfile.ini'

# enable section called 'sec2' (in the file [sec2]) for reading
cfg.section.sec2

# read the content of the variable called 'var2' (in the file
# var2=XXX). If your var2 is an array, then you can use
# ${var[index]}
echo "$var2"
</pre>
<p></p>
<p>Unfortunately, the cfg.parser() function do no support embedded spaces<br />
in section names&#8230; yet</p><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ajdiaz.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ajdiaz.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=40&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2008/02/09/bash-ini-parser/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
		<item>
		<title>bashdoc: just another documentation tool</title>
		<link>http://ajdiaz.wordpress.com/2008/02/08/bashdoc-just-another-documentation-tool/</link>
		<comments>http://ajdiaz.wordpress.com/2008/02/08/bashdoc-just-another-documentation-tool/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 22:27:31 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/2008/02/08/bashdoc-just-another-documentation-tool/</guid>
		<description><![CDATA[bashdoc is a small utility to make documentation automatically from bash scripts, using awk to frontend parser (and you can add your own frontends in awk language), and reStructuredText as backend parser. bashdoc parse the object script (using awk) and create an intermediate documentation in RST, which is parsed in next step using RST backend.

The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=39&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>bashdoc is a small utility to make documentation automatically from bash scripts, using <a href="http://en.wikipedia.org/wiki/AWK_%28programming_language%29">awk</a> to frontend parser (and you can add your own frontends in awk language), and <a href="http://en.wikipedia.org/wiki/ReStructuredText">reStructuredText</a> as backend parser. bashdoc parse the object script (using awk) and create an intermediate documentation in RST, which is parsed in next step using RST backend.</p>
<p>
The fronted allows you to parse more complicated scripts (or other than bash scripts) and the backend allows you to make the output in different formats.</p>
<p>
You can download the source code from <a href="http://launchpad.net/bashdoc">launchpad project page</a> or using bzr version control system:</p>
<pre>
$ bzr get lp:bashdoc</pre></p><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ajdiaz.wordpress.com/39/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ajdiaz.wordpress.com/39/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=39&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2008/02/08/bashdoc-just-another-documentation-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
		<item>
		<title>comida</title>
		<link>http://ajdiaz.wordpress.com/2008/02/01/comida/</link>
		<comments>http://ajdiaz.wordpress.com/2008/02/01/comida/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 21:37:39 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[floss]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/?p=36</guid>
		<description><![CDATA[comida is a bash script designed to create a FTP (or HTTP, or rsync or&#8230;) mirror and maintain the archive synchronized with the source. I design this tool when I was working at the Free Software Office (OSL) in the University of A Corunna, and decided to create a new mirror in Spain which host [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=36&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>comida is a bash script designed to create a FTP (or HTTP, or rsync or&#8230;) mirror and maintain the archive synchronized with the source. I design this tool when I was working at the <a href="http://softwarelibre.udc.es">Free Software Office (OSL)</a> in the <a href="http://www.udc.es">University of A Corunna</a>, and decided to create a new mirror in Spain which host a lot of free software projects. But, we wanted a single tool to manage all mirrors in the archive, with full integration in our web page (yes, we wanted on-the-fly status page).</p>
<p>You can download the source code from <a href="https://launchpad.net/comida/">launchpad project page</a> or using bzr version control system:</p>
<pre>
$ bzr get lp:comida
</pre><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ajdiaz.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ajdiaz.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=36&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2008/02/01/comida/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
		<item>
		<title>ssh-keysend: a tool to distribute ssh keys</title>
		<link>http://ajdiaz.wordpress.com/2008/01/30/ssh-keysend-a-tool-to-distribute-ssh-keys/</link>
		<comments>http://ajdiaz.wordpress.com/2008/01/30/ssh-keysend-a-tool-to-distribute-ssh-keys/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 16:23:58 +0000</pubDate>
		<dc:creator>ajdiaz</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://ajdiaz.wordpress.com/?p=32</guid>
		<description><![CDATA[ssh-keysend is a tiny script written in bash which read a number of ssh public keys from a file (according to search pattern) and send these keys to remote hosts (taken from another file, also filtered by specified pattern). The remote host add these keys into authorized_keys file for specified user. Here are an example [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=32&subd=ajdiaz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><tt>ssh-keysend</tt> is a tiny script written in bash which read a number of ssh public keys from a file (according to search pattern) and send these keys to remote hosts (taken from another file, also filtered by specified pattern). The remote host add these keys into <tt>authorized_keys</tt> file for specified user. Here are an example of use:</p>
<pre>
$ ssh-keysend bill@gates 10.1.10.*
</pre>
<p></p>
<blockquote><p>This example send the key for user <em>bill@gates</em> and send the key to any known_host which match with the pattern 10.1.10.* (yes, it&#8217;s a regexp). The key is taken from *.pub files in <tt>~/.ssh/</tt> directory.
</p></blockquote>
<p>You can get the code from <a href="https://launchpad.net/ssh-keysend">launchpad ssh-keysend project page</a>, or get the repository code with bzr:</p>
<pre>
$ bzr get lp:ssh-keysend
</pre><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ajdiaz.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ajdiaz.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajdiaz.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajdiaz.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajdiaz.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajdiaz.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajdiaz.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajdiaz.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajdiaz.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajdiaz.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajdiaz.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajdiaz.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajdiaz.wordpress.com&blog=630003&post=32&subd=ajdiaz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ajdiaz.wordpress.com/2008/01/30/ssh-keysend-a-tool-to-distribute-ssh-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffc718cc95b66ed168d0d4b8d88f885c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajdiaz</media:title>
		</media:content>
	</item>
	</channel>
</rss>