<?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>Small Dropbear</title>
	<atom:link href="http://enc.com.au/feed/" rel="self" type="application/rss+xml" />
	<link>https://enc.com.au</link>
	<description>ummm</description>
	<lastBuildDate>Wed, 15 May 2013 13:14:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>itools is back</title>
		<link>https://enc.com.au/2013/05/15/itools-is-back/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=itools-is-back</link>
		<comments>https://enc.com.au/2013/05/15/itools-is-back/#comments</comments>
		<pubDate>Wed, 15 May 2013 13:14:08 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Turbogears]]></category>
		<category><![CDATA[Nslookup]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[TurboGears]]></category>
		<category><![CDATA[Whois]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=901</guid>
		<description><![CDATA[My last post I said that I had to remove my internet query tools due to some bugs that were a concern.  Some of the code was hard to maintain and probably had holes and I had noticed that it looped at times. I&#8217;m happy to say that I have restored some of those tools now, still located at http://enc.com.au/itools This code is completely re-written in Python using the TurboGears toolkit which means it is a lot cleaner in how it works and how it looks.  Some of the lookup tables use a database rather than an array for ease of updating and querying.  The downside is the backends will take time.  It currently only does nslookup queries and whois only works for IPv4 addresses. The domain name queries will be a while off as these are the most complicated<p><a class="excerpt-more blog-excerpt" href="https://enc.com.au/2013/05/15/itools-is-back/">Read More...</a></p>]]></description>
				<content:encoded><![CDATA[<p>My <a title="Removing itools" href="https://enc.com.au/2013/04/16/removing-itools/">last post</a> I said that I had to remove my internet query tools due to some bugs that were a concern.  Some of the code was hard to maintain and probably had holes and I had noticed that it looped at times.</p>
<p>I&#8217;m happy to say that I have restored some of those tools now, still located at <a href="https://enc.com.au/itools/">http://enc.com.au/itools</a></p>
<p>This code is completely re-written in Python using the <a class="zem_slink" title="TurboGears" href="http://www.turbogears.org/" target="_blank" rel="homepage">TurboGears</a> toolkit which means it is a lot cleaner in how it works and how it looks.  Some of the lookup tables use a database rather than an array for ease of updating and querying.  The downside is the backends will take time.  It currently only does <a class="zem_slink" title="Nslookup" href="http://en.wikipedia.org/wiki/Nslookup" target="_blank" rel="wikipedia">nslookup</a> queries and whois only works for <a class="zem_slink" title="IPv4" href="http://en.wikipedia.org/wiki/IPv4" target="_blank" rel="wikipedia">IPv4 addresses</a>. The domain name queries will be a while off as these are the most complicated to handle. To give you an idea, all IPv4 and IPv6 address information comes from 5 sources with two formats while <a class="zem_slink" title="Domain name" href="http://en.wikipedia.org/wiki/Domain_name" target="_blank" rel="wikipedia">domain names</a> come from over 200 sources with about 40 formats.  This means the information from Regional Internet Registries will be done first.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"></a></div>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/05/15/itools-is-back/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Removing itools</title>
		<link>https://enc.com.au/2013/04/16/removing-itools/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=removing-itools</link>
		<comments>https://enc.com.au/2013/04/16/removing-itools/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 11:35:50 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[Domain name]]></category>
		<category><![CDATA[Nslookup]]></category>
		<category><![CDATA[Whois]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=883</guid>
		<description><![CDATA[Update: The newer code is now running, though still needs some testing. For very many years I have been running a set of tools on my website that basically runs whois or nslookup queries and presents them in a standard format.  I have decided today to shut this part of the website down as the code running those components is very old and I&#8217;ve not maintained it for years.  Back when I initially wrote the tools, in 1995 or so, there wasn&#8217;t many alternatives to this site but that has long changed. So thanks for those who emailled me over the years; its been an interesting journey.]]></description>
				<content:encoded><![CDATA[<p><strong>Update: The newer code is now running, though still needs some testing.</strong></p>
<p>For very many years I have been running a set of tools on my website that basically runs whois or nslookup queries and presents them in a standard format.  I have decided today to shut this part of the website down as the code running those components is very old and I&#8217;ve not maintained it for years.  Back when I initially wrote the tools, in 1995 or so, there wasn&#8217;t many alternatives to this site but that has long changed.</p>
<p>So thanks for those who emailled me over the years; its been an interesting journey.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"></a></div>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/04/16/removing-itools/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Pie Charts in TurboGears</title>
		<link>https://enc.com.au/2013/04/13/pie-charts-in-turbogears/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pie-charts-in-turbogears</link>
		<comments>https://enc.com.au/2013/04/13/pie-charts-in-turbogears/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 23:40:38 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Turbogears]]></category>
		<category><![CDATA[GUI widget]]></category>
		<category><![CDATA[Pie chart]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ToscaWidgets]]></category>
		<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=868</guid>
		<description><![CDATA[You might of looked at Ralph Bean&#8217;s tutorial on graphs and thought, that&#8217;s nice but I&#8217;d like something different.  The great thing about ToscaWidgets using the jqPlot library is that pretty much anything you can do in jqPlot, you can do in ToscaWidgets and by extension in TurboGears.  You want different graph types? jqPlot has heaps! My little application needed a Pie Chart to display the overall status of attributes. There are 6 states an attribute can be in: Up, Alert, Down, Testing, Admin Down and Unknown.  The Pie Chart would show them all with some sort of colour representing the status. For this example I&#8217;ve used hard-coded data but you would normally extract it from the database using a TurboGears model and possibly some bucket sorting code. I&#8217;ve divided my code into widget specific, which is found in myapp/widgets/attribute.py<p><a class="excerpt-more blog-excerpt" href="https://enc.com.au/2013/04/13/pie-charts-in-turbogears/">Read More...</a></p>]]></description>
				<content:encoded><![CDATA[<p>You might of looked at Ralph Bean&#8217;s <a href="http://threebean.org/blog/2011/04/30/tutorial-melting-your-face-off-with-tw2-and-turbogears2-1/" target="_blank">tutorial on graphs</a> and thought, that&#8217;s nice but I&#8217;d like something different.  The great thing about <a href="http://www.toscawidgets.org" target="_blank">ToscaWidgets</a> using the <a title="jqPlot" href="http://www.jqplot.com" target="_blank">jqPlot</a> library is that pretty much anything you can do in jqPlot, you can do in ToscaWidgets and by extension in <a class="zem_slink" title="TurboGears" href="http://www.turbogears.org/" target="_blank" rel="homepage">TurboGears</a>.  You want different graph types? <a title="jqPlot Graph List" href="http://www.jqplot.com/tests/" target="_blank">jqPlot has heaps</a>!</p>
<p>My little application needed a Pie Chart to display the overall status of attributes. There are 6 states an attribute can be in: Up, Alert, Down, Testing, Admin Down and Unknown.  The Pie Chart would show them all with some sort of colour representing the status. For this example I&#8217;ve used hard-coded data but you would normally extract it from the database using a TurboGears model and possibly some bucket sorting code.</p>
<p>I&#8217;ve divided my code into widget specific, which is found in <em>myapp/widgets/attribute.py</em> and the controller code found unsurprisingly at <em>myapp/controllers/attribute.py</em>  Also note that some versions of ToscaWidgets have a bug which means any jqPlot widget won&#8217;t work, version 2.0.4 has the fix for <a title="ToscaWidgets Issue #80" href="https://github.com/toscawidgets/tw2.core/issues/80" target="_blank">issue 80</a> that explains briefly the bug.</p>
<p>The widget code looks like this:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="python"><pre class="de1"><span class="kw1">from</span> tw2.<span class="me1">jqplugins</span>.<span class="me1">jqplot</span> <span class="kw1">import</span> JQPlotWidget
<span class="kw1">from</span> tw2.<span class="me1">jqplugins</span>.<span class="me1">jqplot</span>.<span class="me1">base</span> <span class="kw1">import</span> pieRenderer_js
<span class="kw1">import</span> tw2.<span class="me1">core</span> <span class="kw1">as</span> twc
&nbsp;
<span class="kw1">class</span> AttributeStatusPie<span class="br0">&#40;</span>JQPlotWidget<span class="br0">&#41;</span>:
    <span class="st0">&quot;&quot;&quot;
    Pie Chart of the Attributes' Status &quot;&quot;&quot;</span>
    <span class="kw2">id</span> <span class="sy0">=</span> <span class="st0">'attribute-status-pie'</span>
    resources <span class="sy0">=</span> JQPlotWidget.<span class="me1">resources</span> + <span class="br0">&#91;</span>
            pieRenderer_js<span class="sy0">,</span>
            <span class="br0">&#93;</span>
&nbsp;
    options <span class="sy0">=</span> <span class="br0">&#123;</span>
            <span class="st0">'seriesColors'</span>: <span class="br0">&#91;</span> <span class="st0">&quot;#468847&quot;</span><span class="sy0">,</span> <span class="st0">&quot;#F89406&quot;</span><span class="sy0">,</span> <span class="st0">&quot;#B94A48&quot;</span><span class="sy0">,</span> <span class="st0">&quot;#999999&quot;</span><span class="sy0">,</span> <span class="st0">&quot;#3887AD&quot;</span><span class="sy0">,</span> <span class="st0">&quot;#222222&quot;</span><span class="br0">&#93;</span><span class="sy0">,</span> 
            <span class="st0">'seriesDefaults'</span> : <span class="br0">&#123;</span>
                <span class="st0">'renderer'</span>: twc.<span class="me1">js_symbol</span><span class="br0">&#40;</span><span class="st0">'$.jqplot.PieRenderer'</span><span class="br0">&#41;</span><span class="sy0">,</span>
                <span class="br0">&#125;</span><span class="sy0">,</span>
            <span class="st0">'legend'</span>: <span class="br0">&#123;</span>
                <span class="st0">'show'</span>: <span class="kw2">True</span><span class="sy0">,</span> 
                <span class="st0">'location'</span>: <span class="st0">'e'</span><span class="sy0">,</span>
                <span class="br0">&#125;</span><span class="sy0">,</span>
            <span class="br0">&#125;</span></pre></div></div></div></div></div></div></div>


<p>Some important things to note are:</p>
<ul>
<li>resources are the way of pulling in the javascript includes that actually do the work, generally if you have something like a renderer using js_symbol further on, it needs to be listed in the resources too.</li>
<li>seriesColors is how you make a specific data item a specific colour, or perhaps change the range of colours.  It&#8217;s not required if you use the default set, which is defined in the <a href="http://www.jqplot.com/docs/files/jqPlotOptions-txt.html" target="_blank">jqPlot options</a>.</li>
<li>The renderer tells jqPlot what sort of graph we want, the line above says we want pie</li>
</ul>
<p>&nbsp;</p>
<p>Next the controller needs to be defined:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="python"><pre class="de1"><span class="kw1">from</span> myapp.<span class="me1">widgets</span>.<span class="me1">attribute</span> <span class="kw1">import</span> AttributeStatusPie
&nbsp;
<span class="sy0">@</span>expose<span class="br0">&#40;</span><span class="st0">'myapp.templates.widget'</span><span class="br0">&#41;</span>
    <span class="kw1">def</span> statuspie<span class="br0">&#40;</span><span class="kw2">self</span><span class="br0">&#41;</span>:
        data <span class="sy0">=</span> <span class="br0">&#91;</span><span class="br0">&#91;</span>
                <span class="br0">&#91;</span><span class="st0">'Up'</span><span class="sy0">,</span> <span class="nu0">20</span><span class="br0">&#93;</span><span class="sy0">,</span> <span class="br0">&#91;</span><span class="st0">'Alert'</span><span class="sy0">,</span> <span class="nu0">7</span><span class="br0">&#93;</span><span class="sy0">,</span> <span class="br0">&#91;</span><span class="st0">'Down'</span><span class="sy0">,</span> <span class="nu0">12</span><span class="br0">&#93;</span><span class="sy0">,</span> <span class="br0">&#91;</span><span class="st0">'Admin Down'</span><span class="sy0">,</span> <span class="nu0">3</span><span class="br0">&#93;</span><span class="sy0">,</span> <span class="br0">&#91;</span><span class="st0">'Testing'</span><span class="sy0">,</span> <span class="nu0">1</span><span class="br0">&#93;</span><span class="sy0">,</span> <span class="br0">&#91;</span><span class="st0">'Unknown'</span><span class="sy0">,</span> <span class="nu0">4</span><span class="br0">&#93;</span><span class="sy0">,</span>
                <span class="br0">&#93;</span><span class="br0">&#93;</span>
        pie <span class="sy0">=</span> AttributeStatusPie<span class="br0">&#40;</span>data<span class="sy0">=</span>data<span class="br0">&#41;</span>
        <span class="kw1">return</span> <span class="kw2">dict</span><span class="br0">&#40;</span>w<span class="sy0">=</span>pie<span class="br0">&#41;</span></pre></div></div></div></div></div></div></div>


<p>And that is about it, we now have a controller path attributes/statuspie which shows us the pie chart.<br />
My template is basically a bare template with a ${w.display | n} in it to just show the widget for testing.</p>
<div id="attachment_871" class="wp-caption aligncenter" style="width: 310px"><a href="https://enc.com.au/wp-content/uploads/2013/04/piechart.png"><img class="size-medium wp-image-871" alt="Pie Chart in Turbogears" src="https://enc.com.au/wp-content/uploads/2013/04/piechart-300x210.png" width="300" height="210" /></a><p class="wp-caption-text">Pie Chart in Turbogears</p></div>
<p>&nbsp;</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"></a></div>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/04/13/pie-charts-in-turbogears/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>procps-ng 3.3.7 Released</title>
		<link>https://enc.com.au/2013/03/26/procps-ng-3-3-7-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=procps-ng-3-3-7-released</link>
		<comments>https://enc.com.au/2013/03/26/procps-ng-3-3-7-released/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 11:07:40 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[procps]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=851</guid>
		<description><![CDATA[procps-ng version 3.3.7 was released today.  It has some new and interesting features in the top program that Jim has been busy working on.  There is a new filter feature which can exclude fields that match a value for example. The remainder of the changes are small bug fixes and getting the compile warnings count down with -Wall enabled. The library revision was updated but this did not involve an API or ABI change. procps-ng can be downloaded off the sourceforge page which has the current and previous releases stored there. Alternatively you can visit our gitorious page if git fetch is more your thing. Debian packages will be going into experimental until the freeze is over and we get things unblocked.]]></description>
				<content:encoded><![CDATA[<p>procps-ng version 3.3.7 was released today.  It has some new and interesting features in the top program that Jim has been busy working on.  There is a new filter feature which can exclude fields that match a value for example. The remainder of the changes are small bug fixes and getting the compile warnings count down with -Wall enabled. The library revision was updated but this did not involve an API or ABI change.</p>
<p>procps-ng can be downloaded off the <a title="procps-ng on sourceforge" href="https://sourceforge.net/projects/procps-ng/" target="_blank">sourceforge page </a>which has the current and previous releases stored there. Alternatively you can visit our <a title="procps-ng on gitorious" href="https://gitorious.org/procps" target="_blank">gitorious page</a> if git fetch is more your thing. Debian packages will be going into experimental until the freeze is over and we get things unblocked.</p>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/03/26/procps-ng-3-3-7-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>python and rrdtool</title>
		<link>https://enc.com.au/2013/02/26/python-and-rrdtool/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=python-and-rrdtool</link>
		<comments>https://enc.com.au/2013/02/26/python-and-rrdtool/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 12:06:22 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RRDtool]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=848</guid>
		<description><![CDATA[RRDTool is a neat utility for collecting and graphing statistics such as server loads or network traffic. There are two main modules for interfacing with RRDTool files within python; rrdpython and pyrrd. rrdpython is the basic bindings of the rrdtool library within python. The API is very familiar for people who program in C or use the command line tools which for me is both so it works well. However if you were expecting a &#8220;pythonic&#8221; API you will be disappointed. As there is the direct binding, you have to have either a pre-compiled module or compile it yourself with librrd-dev package installed. Depending on your setup this could be trivial or a real pain. pyrrd initially looks good as it is a object-orientated style and (supposedly) a pure python code, so no trying to compile things&#8230; but! Well, the<p><a class="excerpt-more blog-excerpt" href="https://enc.com.au/2013/02/26/python-and-rrdtool/">Read More...</a></p>]]></description>
				<content:encoded><![CDATA[<p>RRDTool is a neat utility for collecting and graphing statistics such as server loads or network traffic.  There are two main modules for interfacing with RRDTool files within python; rrdpython and pyrrd.</p>
<p><a href="http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html">rrdpython</a> is the basic bindings of the rrdtool library within python. The API is very familiar for people who program in C or use the command line tools which for me is both so it works well. However if you were expecting a &#8220;pythonic&#8221; API you will be disappointed.  As there is the direct binding, you have to have either a pre-compiled module or compile it yourself with librrd-dev package installed.  Depending on your setup this could be trivial or a real pain.</p>
<p><a href="https://code.google.com/p/pyrrd/">pyrrd<a> initially looks good as it is a object-orientated style and (supposedly) a pure python code, so no trying to compile things&#8230; but!</p>
<p>Well, the problem is its not pure python. The hooks are there for it (in backend.py) for it to be implemented in python but it falls back to using the external method, and external method is a bunch of Popen calls. pyrrd also does not<br />
support the full set of rrdtool commands.</p>
<p>My intention is to keep using rrdpython despite the compile hassle and possibly even use a fancier graph setup such as <a href="http://www.highcharts.com/">High Charts</a> though there is a problem with their license for me.</p>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/02/26/python-and-rrdtool/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What I learnt from LCA 2013</title>
		<link>https://enc.com.au/2013/02/02/what-i-learnt-from-lca-2013/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-i-learnt-from-lca-2013</link>
		<comments>https://enc.com.au/2013/02/02/what-i-learnt-from-lca-2013/#comments</comments>
		<pubDate>Fri, 01 Feb 2013 21:57:44 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=834</guid>
		<description><![CDATA[Well I&#8217;m back from LCA 2013 and what a great week it was. I learnt plenty of things over the week, including: Cloud computing into the government will be coming but will be hard to do in a significant way It wasn&#8217;t just me that found the GTK 2 to 3 API change hard going OpenStack is the next cool kid on the block and there is a lot going on here Try out novaprova for testing C programs SELinux shouldnt slow my computer down and yes ill try it soon git-annex looks very interesting, I&#8217;m just trying to find a use-case for it for me The development methods for Free Software have come a long way since a decade ago Test and release processes are important on large software projects Pretty much everyone I knew has changed companies, at<p><a class="excerpt-more blog-excerpt" href="https://enc.com.au/2013/02/02/what-i-learnt-from-lca-2013/">Read More...</a></p>]]></description>
				<content:encoded><![CDATA[<p>
Well I&#8217;m back from LCA 2013 and what a great week it was.  I learnt plenty of things over the week, including:
</p>
<ul>
<li>Cloud computing into the government will be coming but will be hard to do in a significant way
<li>It wasn&#8217;t just me that found the GTK 2 to 3 API change hard going
<li><a href="http://www.openstack.org/">OpenStack</a> is the next cool kid on the block and there is a lot going on here
<li>Try out <a href="http://www.novaprova.org/">novaprova</a> for testing C programs
<li>SELinux shouldnt slow my computer down and yes ill try it soon
<li><a href="http://git-annex.branchable.com/">git-annex</a> looks very interesting, I&#8217;m just trying to find a use-case for it for me
<li>The development methods for Free Software have come a long way since a decade ago
<li>Test and release processes are important on large software projects
<li>Pretty much everyone I knew has changed companies, at least once.
<li>For multi-process communication, <a href="http://www.zeromq.org/">0mq</a> looks interesting
</ul>
<p>It was great to actually meet people who I&#8217;ve known for years (over 10 for some) only as emails or irc chats as well.  I&#8217;ve not been to <a href="http://www.stromloforestpark.com.au/">Mount Stromlo</a> for almost as long and its somewhere I&#8217;d like to visit again.</p>
<p>Argh, the wordpress editor is still not fixed <img src='http://enc.com.au/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/02/02/what-i-learnt-from-lca-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Off to LCA2013</title>
		<link>https://enc.com.au/2013/01/25/off-to-lca2013/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=off-to-lca2013</link>
		<comments>https://enc.com.au/2013/01/25/off-to-lca2013/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 12:41:04 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[lca2013]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=826</guid>
		<description><![CDATA[While I&#8217;ve been involve in Linux and Debian for many (15 or more) years, I&#8217;ve only ever been to one &#8220;major Linux thing&#8221; in all that time and that was manning some stall for Debian about 10 years ago. Well, let&#8217;s call it two because next week I&#8217;m off to the Linux.conf.au 2013 conference. I can&#8217;t get too terribly excited about the location because its&#8230; Canberra, yep my (now) home town and about 4 blocks from my workplace; so no exotic locales for me! I&#8217;m hoping to catch up with some Debian folk while the conference is on. There is at the very least a keysigning party where there are some others from Debian on Wednesday. PS WordPress update broke the visual editing, I hope it looks ok.]]></description>
				<content:encoded><![CDATA[<p>While I&#8217;ve been involve in Linux and Debian for many (15 or more) years, I&#8217;ve only ever been to one &#8220;major Linux thing&#8221; in all that time and that was manning some stall for Debian about 10 years ago.</p>
<p>Well, let&#8217;s call it two because next week I&#8217;m off to the <a href="https://lca2013.linux.org.au/">Linux.conf.au 2013</a> conference.  I can&#8217;t get too terribly excited about the location because its&#8230; Canberra, yep my (now) home town and about 4 blocks from my workplace; so no exotic locales for me!</p>
<p>I&#8217;m hoping to catch up with some Debian folk while the conference is on. There is at the very least a <a href="https://lca2013.linux.org.au/wiki/Keysigning_Party">keysigning party</a> where there are some others from Debian on Wednesday.</p>
<p>PS WordPress update broke the visual editing, I hope it looks ok.</p>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/01/25/off-to-lca2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bootstrap &#8211; The hidden gem in Turbogears</title>
		<link>https://enc.com.au/2013/01/24/bootstrap-the-hidden-gem-in-turbogears/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bootstrap-the-hidden-gem-in-turbogears</link>
		<comments>https://enc.com.au/2013/01/24/bootstrap-the-hidden-gem-in-turbogears/#comments</comments>
		<pubDate>Thu, 24 Jan 2013 12:05:09 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Turbogears]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[TurboGears]]></category>
		<category><![CDATA[Web application]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=820</guid>
		<description><![CDATA[I&#8217;ve been trying to tidy up my Mako templates within my Turbogears 2 project.  As part of that I was looking at some of them that are quickstarted including one which is the About page. What was curious was there was all this CSS work all done already for you, including icons.  Digging further I found out that one of the many projects Turbogears takes in, is Bootstrap.  It&#8217;s website describes Bootstrap as &#8220;Sleek, intuitive, and powerful front-end framework for faster and easier web development.&#8221;  but what it means to me is a bunch of guys who understand HTML and CSS way better than me have made it easy for me to build a decent web application. While the framework won&#8217;t suit everyone&#8217;s tastes, it makes a lot of the formatting decisions so much easier.  The thing is, in all<p><a class="excerpt-more blog-excerpt" href="https://enc.com.au/2013/01/24/bootstrap-the-hidden-gem-in-turbogears/">Read More...</a></p>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been trying to tidy up my <a title="Mako Templates" href="http://www.makotemplates.org/" target="_blank">Mako templates</a> within my <a class="zem_slink" title="TurboGears" href="http://www.turbogears.org" rel="homepage" target="_blank">Turbogears</a> 2 project.  As part of that I was looking at some of them that are quickstarted including one which is the About page.</p>
<p>What was curious was there was all this CSS work all done already for you, including icons.  Digging further I found out that one of the many projects Turbogears takes in, is <a title="Bootstrap on Github" href="http://twitter.github.com/bootstrap/" target="_blank">Bootstrap</a>.  It&#8217;s website describes Bootstrap as &#8220;Sleek, intuitive, and powerful front-end framework for faster and easier web development.&#8221;  but what it means to me is a bunch of guys who understand HTML and CSS way better than me have made it easy for me to build a decent web application.</p>
<p>While the framework won&#8217;t suit everyone&#8217;s tastes, it makes a lot of the formatting decisions so much easier.  The thing is, in all the Turbogears documentation I have read I&#8217;ve not heard it mentioned. Not sure why, its pretty awesome (not <a title="SQL Alchemy" href="http://www.sqlalchemy.org/" target="_blank">SQLAlchemy</a> awesome but not many things are).</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://pypi.python.org/pypi/TurboGears2/2.2.1" target="_blank">TurboGears2 2.2.1</a> (pypi.python.org)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/14438801/twitter-bootstrap-css-mobile" target="_blank">twitter bootstrap CSS mobile</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.sitepoint.com/11-reasons-to-use-twitter-bootstrap/" target="_blank">11 Reasons to Use Twitter Bootstrap</a> (sitepoint.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.anujgakhar.com/2013/01/06/book-review-twitter-bootstrap-web-development-how-to/" target="_blank">Book Review : Twitter BootStrap Web Development How-To</a> (anujgakhar.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.epiphanysearch.co.uk/blog/bootstrap-in-2013/" target="_blank">Bootstrap in 2013</a> (epiphanysearch.co.uk)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"></a></div>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/01/24/bootstrap-the-hidden-gem-in-turbogears/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pre-selecting ToscaWidgets jqgrid values in TurboGears</title>
		<link>https://enc.com.au/2013/01/18/pre-selecting-toscawidgets-jqgrid-values-in-turbogears/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pre-selecting-toscawidgets-jqgrid-values-in-turbogears</link>
		<comments>https://enc.com.au/2013/01/18/pre-selecting-toscawidgets-jqgrid-values-in-turbogears/#comments</comments>
		<pubDate>Thu, 17 Jan 2013 21:57:11 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Turbogears]]></category>
		<category><![CDATA[GUI widget]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ToscaWidgets]]></category>
		<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=809</guid>
		<description><![CDATA[My Turbogears project has recently reached an important milestone; one of the back-end processes now runs pretty much continuously and the plugins it use (or at least the ones I can see) are also working.  That means I can turn to the front-end which displays the data the back-end collected. For some of the data I am using a ToscaWidgets (or TW2) widget called a jqGridWidget which is a very nice jquery device that separates the presentation and data using a json query.  I&#8217;ve mentioned previously about how to get a jqGridWidget working but left the pre-filtering out until now.  This meant that my grid showed all the items in the database, not just the ones I wanted to see, but it was a start. Now this widget displays things called Attributes which are basically children of another model called<p><a class="excerpt-more blog-excerpt" href="https://enc.com.au/2013/01/18/pre-selecting-toscawidgets-jqgrid-values-in-turbogears/">Read More...</a></p>]]></description>
				<content:encoded><![CDATA[<p>My <a class="zem_slink" title="TurboGears" href="http://www.turbogears.org" rel="homepage" target="_blank">Turbogears</a> project has recently reached an important milestone; one of the back-end processes now runs pretty much continuously and the plugins it use (or at least the ones I can see) are also working.  That means I can turn to the front-end which displays the data the back-end collected.</p>
<p>For some of the data I am using a ToscaWidgets (or TW2) widget called a jqGridWidget which is a very nice jquery device that separates the presentation and data using a json query.  I&#8217;ve mentioned previously about <a title="jqGridWidget in Turbogears" href="https://enc.com.au/2012/10/jqgridwidget-in-turbogears/">how to get a jqGridWidget working</a> but left the pre-filtering out until now.  This meant that my grid showed all the items in the database, not just the ones I wanted to see, but it was a start.</p>
<p>Now this widget displays things called Attributes which are basically children of another model called Hosts. Basically, Attributes are things you want to check or track about a Host.  My widget used to show all Attributes but often on a Host screen, I want to see its hosts only. So, this is how I got my widget to behave; I&#8217;m not sure this is THE CORRECT way of doing it, but it does work.</p>
<p>First, in the Hosts controller you need to create the widget and pass along the host_id that the controller has obtained.  I was not able to use the sub-classing trick you see in some TW2 documentation but actually make a widget instance.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="python"><pre class="de1"><span class="kw1">class</span> HostsController<span class="br0">&#40;</span>BaseController<span class="br0">&#41;</span>:
    <span class="co1"># other stuff here</span>
    <span class="kw1">class</span> por2<span class="br0">&#40;</span>portlets.<span class="me1">Portlet</span><span class="br0">&#41;</span>:
        title <span class="sy0">=</span> <span class="st0">'Host Attributes'</span>
        widget <span class="sy0">=</span> AttributeGrid<span class="br0">&#40;</span><span class="br0">&#41;</span>
        widget.<span class="me1">host_id</span> <span class="sy0">=</span> host_id</pre></div></div></div></div></div></div></div>


<p>Next, the prepare() method in the Widget needs to get hold of the host_id and put it into the postData list.  I needed to do it before calling super() because the options become one long string in the sub-class.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="python"><pre class="de1"><span class="kw1">class</span> AttributeGrid<span class="br0">&#40;</span>jqgrid.<span class="me1">jqGridWidget</span><span class="br0">&#41;</span>:
    <span class="kw1">def</span> prepare<span class="br0">&#40;</span><span class="kw2">self</span><span class="sy0">,</span> **kw<span class="br0">&#41;</span>:
        <span class="kw1">if</span> <span class="kw2">self</span>.<span class="me1">host_id</span> <span class="kw1">is</span> <span class="kw1">not</span> <span class="kw2">None</span>:
            <span class="kw2">self</span>.<span class="me1">options</span><span class="br0">&#91;</span><span class="st0">'postData'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="br0">&#123;</span><span class="st0">'hostid'</span>: <span class="kw2">self</span>.<span class="me1">host_id</span><span class="br0">&#125;</span>
        <span class="kw2">super</span><span class="br0">&#40;</span>AttributeGrid<span class="sy0">,</span> <span class="kw2">self</span><span class="br0">&#41;</span>.<span class="me1">prepare</span><span class="br0">&#40;</span><span class="br0">&#41;</span></pre></div></div></div></div></div></div></div>


<p>This means the jqgrid when it asks for its <a class="zem_slink" title="JSON" href="http://json.org/" rel="homepage" target="_blank">JSON</a> data will include the hostid parameter as well.  We need that method to &#8220;see&#8221; the host ID so we can filter the database access.</p>
<p>Finally in the JSON method for the Attribute we pick up and filter on the hostid.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="python"><pre class="de1">    <span class="sy0">@</span>expose<span class="br0">&#40;</span><span class="st0">'json'</span><span class="br0">&#41;</span>
    <span class="sy0">@</span>validate<span class="br0">&#40;</span>validators<span class="sy0">=</span><span class="br0">&#123;</span><span class="st0">'hostid'</span>:validators.<span class="me1">Int</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>
    <span class="kw1">def</span> jqsumdata<span class="br0">&#40;</span><span class="kw2">self</span><span class="sy0">,</span> hostid<span class="sy0">=</span><span class="nu0">0</span><span class="sy0">,</span> page<span class="sy0">=</span><span class="nu0">1</span><span class="sy0">,</span> rows<span class="sy0">=</span><span class="nu0">1</span><span class="sy0">,</span> *args<span class="sy0">,</span> **kw<span class="br0">&#41;</span>:
        conditions <span class="sy0">=</span> <span class="br0">&#91;</span><span class="br0">&#93;</span>
        <span class="kw1">if</span> hostid &amp;gt<span class="sy0">;</span> <span class="nu0">0</span>:
            conditions.<span class="me1">append</span><span class="br0">&#40;</span>model.<span class="me1">Attribute</span>.<span class="me1">host_id</span> <span class="sy0">==</span> hostid<span class="br0">&#41;</span>
        attributes <span class="sy0">=</span>model.<span class="me1">DBSession</span>.<span class="me1">query</span><span class="br0">&#40;</span>model.<span class="me1">Attribute</span><span class="br0">&#41;</span>.<span class="kw2">filter</span><span class="br0">&#40;</span>and_<span class="br0">&#40;</span>*conditions<span class="br0">&#41;</span><span class="br0">&#41;</span></pre></div></div></div></div></div></div></div>


<p>From there you run through the attributes variable and build your JSON reply.</p>
<p>&nbsp;</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://pypi.python.org/pypi/tw2.core/2.1.3" target="_blank">tw2.core 2.1.3</a> (pypi.python.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"></a></div>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/01/18/pre-selecting-toscawidgets-jqgrid-values-in-turbogears/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>procps 3.3.6 and Mudlet 2.0</title>
		<link>https://enc.com.au/2013/01/02/procps-3-3-6-and-mudlet-2-0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=procps-3-3-6-and-mudlet-2-0</link>
		<comments>https://enc.com.au/2013/01/02/procps-3-3-6-and-mudlet-2-0/#comments</comments>
		<pubDate>Tue, 01 Jan 2013 22:09:03 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[Mudlet]]></category>
		<category><![CDATA[procps]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MUD]]></category>

		<guid isPermaLink="false">https://enc.com.au/?p=798</guid>
		<description><![CDATA[Yesterday was a busy Debian day for me with the release of not one but two packages. procps procps version 3.3.6 was released both as an upstream and a Debian package.  While there were many bug fixes in this release, the main new feature for it was the top inspect feature. The top inspect feature allows you to run top in the normal way then you can inspect a specific process you have selected within top for more information.  Examples of this include fuser or lsof type output to see what files or libraries are open but really the limit is how clever the operator is and how often you would need this information.  Even scripts can be run off this feature if you have some customised or cooked output you need to see.  Once the output is there, you<p><a class="excerpt-more blog-excerpt" href="https://enc.com.au/2013/01/02/procps-3-3-6-and-mudlet-2-0/">Read More...</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="https://enc.com.au/wp-content/uploads/2013/01/mudlet.png"><img class="alignleft size-medium wp-image-801" title="mudlet" src="https://enc.com.au/wp-content/uploads/2013/01/mudlet-300x228.png" alt="Mudlet - Graphical MUD client" width="300" height="228" /></a>Yesterday was a busy Debian day for me with the release of not one but two packages.</p>
<h1>procps</h1>
<p>procps version 3.3.6 was released both as an upstream and a Debian package.  While there were many bug fixes in this release, the main new feature for it was the top inspect feature.</p>
<p>The top inspect feature allows you to run top in the normal way then you can inspect a specific process you have selected within top for more information.  Examples of this include fuser or lsof type output to see what files or libraries are open but really the limit is how clever the operator is and how often you would need this information.  Even scripts can be run off this feature if you have some customised or cooked output you need to see.  Once the output is there, you can search for text.</p>
<p>There will be a small hold-up with the Debian packages as the section for the  library has been moved to libs, where it should be. At least I think that&#8217;s why there is a delay.</p>
<h2>procps infrastructure</h2>
<p>procps currently has only an email list and a <a class="zem_slink" title="Gitorious" href="https://gitorious.org/" rel="homepage" target="_blank">gitorious</a> <a title="Procps git page" href="https://gitorious.org/procps" target="_blank">git repository</a>.  While this works most of the time, there are two main problems with this setup.</p>
<p>The first is that the only two ways you can report bugs is send an email to the list or create a <a title="procps merge requests" href="https://gitorious.org/procps/procps/merge_requests" target="_blank">git merge request</a>. The email has the problem with tracking and gathering history while the git sets the bar pretty high for reporting something has gone wrong.</p>
<p>Second problem is there is no tarball file repository.  gitorious does have the feature of downloading tarballs of the tag checkpoints, but this is the raw repository.  When you make a tarball with &#8220;make dist&#8221; there are some generated files included in the tarball that don&#8217;t appear in the gitorious ones, which means its not a simple for some as you expect.</p>
<p>So I&#8217;ll be creating a project for these two features soon.  Not sure where they will be but I use <a title="Sourceforge home page" href="http://sf.net/" target="_blank">sourceforge</a> for both these for a few other projects so that might be where they end up.</p>
<p>&nbsp;</p>
<h1>Mudlet</h1>
<p><a href="http://www.mudlet.org/">Mudlet</a>, the <a class="zem_slink" title="MUD" href="http://en.wikipedia.org/wiki/MUD" rel="wikipedia" target="_blank">multi-user dungeon</a> or <a class="zem_slink" title="MUD client" href="http://en.wikipedia.org/wiki/MUD_client" rel="wikipedia" target="_blank">MUD client</a>, has finally made it to version 2.0!  It looks a lot more stable and polished at least from the scripting side than the previous RC versions but has all the features that we&#8217;ve come to expect with it.  The most important thing is that the developers have finally put a line in the sand and said &#8220;this is version 2.0&#8243;.  The Debian package was uploaded yesterday and should be on its way to your local mirror soon.</p>
<p>&nbsp;</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"></a></div>
]]></content:encoded>
			<wfw:commentRss>https://enc.com.au/2013/01/02/procps-3-3-6-and-mudlet-2-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
