<?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>Ubuntu Tutorials &#187; c0de</title>
	<atom:link href="http://ubuntu-tutorials.com/category/c0de/feed/" rel="self" type="application/rss+xml" />
	<link>http://ubuntu-tutorials.com</link>
	<description>Enhancing your Ubuntu experience!</description>
	<lastBuildDate>Sat, 28 Jan 2012 20:08:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hacking Perl</title>
		<link>http://ubuntu-tutorials.com/2008/11/18/hacking-perl/</link>
		<comments>http://ubuntu-tutorials.com/2008/11/18/hacking-perl/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 19:25:04 +0000</pubDate>
		<dc:creator>Christer Edwards</dc:creator>
				<category><![CDATA[c0de]]></category>
		<category><![CDATA[origami]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=921</guid>
		<description><![CDATA[As I mentioned in yesterdays post, I have begun studying perl.  I&#8217;m actually enjoying it quite a bit, and picking things up fairly quickly I think.  I&#8217;m sure my familiarity with bash scripting helps quite a bit. This morning I hacked together an irssi script for origami users that will let you display your current [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in yesterdays post, I have begun studying perl.  I&#8217;m actually enjoying it quite a bit, and picking things up fairly quickly I think.  I&#8217;m sure my familiarity with bash scripting helps quite a bit.</p>
<p>This morning I hacked together an irssi script for origami users that will let you display your current work unit progress percentage within irssi chat.  I&#8217;d like some feedback on it.</p>
<p>If you are using irssi and have origami running on the same machine please check out my plugin and let me know what can be improved.</p>
<p><a title="origami.pl irssi script" href="http://zelut.org/dropbox/origami.pl">Download origami.pl v0.2</a></p>
<p><strong>Instructions:</strong></p>
<p>download and save the above script into ~/.irssi/scripts</p>
<p>To load the script:</p>
<blockquote><p><code>/script load origami.pl</code></p></blockquote>
<p>To get the origami work unit status:</p>
<blockquote><p><code>/origami</code></p></blockquote>
<p>To unload the script:</p>
<blockquote><p><code>/script unload origami</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ubuntu-tutorials.com/2008/11/18/hacking-perl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Regex Challenge</title>
		<link>http://ubuntu-tutorials.com/2008/11/17/regex-challenge/</link>
		<comments>http://ubuntu-tutorials.com/2008/11/17/regex-challenge/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 00:59:56 +0000</pubDate>
		<dc:creator>Christer Edwards</dc:creator>
				<category><![CDATA[c0de]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=918</guid>
		<description><![CDATA[Over the weekend I started studying Perl and quickly realized I was going to be better off if I reviewed regular expressions before I got too far into things.  I went back and found my copy of &#8220;Mastering Regular Expressions&#8221; and dove right in.  Now, maybe its just me, but I find that I really [...]]]></description>
			<content:encoded><![CDATA[<p>Over the weekend I started studying Perl and quickly realized I was going to be better off if I reviewed regular expressions before I got too far into things.  I went back and found my copy of &#8220;Mastering Regular Expressions&#8221; and dove right in.  Now, maybe its just me, but I find that I really enjoy the problem solving aspect of regular expressions.  I thought it might be fun to put up a regular challenge on the blog that needs to be solved via regular expressions.</p>
<p>(<a title="I know regular expressions!" href="http://xkcd.com/208/" target="_blank">Obligatory xkcd reference</a>)</p>
<p>So, I figure I&#8217;d start off with one that caught me today.  Here is the situation:</p>
<p>You&#8217;ve got a regular text file filled with usernames.  You want to be able to read this file into a program to populate an array, but there are random blank lines throughout the file.  What regex would you use to find and remove all empty lines in the file?</p>
<p>For consistency sake, I&#8217;ve populated just such a file and made it available <a title="usernames.txt" href="http://zelut.org/dropbox/usernames.txt">here</a>.</p>
<p>Rules: Use any tool you want (perl, sed, vim, etc)  The file must contain all original usernames (total of 15), one per line, with no blank lines start to finish.  Please share your solution in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://ubuntu-tutorials.com/2008/11/17/regex-challenge/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Project Update Announcements</title>
		<link>http://ubuntu-tutorials.com/2008/03/21/project-update-announcements/</link>
		<comments>http://ubuntu-tutorials.com/2008/03/21/project-update-announcements/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 13:59:30 +0000</pubDate>
		<dc:creator>Christer Edwards</dc:creator>
				<category><![CDATA[c0de]]></category>
		<category><![CDATA[Folding]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://ubuntu-tutorials.com/2008/03/21/project-update-announcements/</guid>
		<description><![CDATA[I wanted to quickly toss something out there for all of you on the interweb.  I spent some time last evening cleaning up a few of my code projects.  If you have been using either of them you may want to update. apturl for Gnome Do I spent some time in the #gnome-do channel last [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to quickly toss something out there for all of you on the interweb.  I spent some time last evening cleaning up a few of my code projects.  If you have been using either of them you may want to update.</p>
<p><strong>apturl for Gnome Do</strong></p>
<p>I spent some time in the #gnome-do channel last nite seeing what needed to be done for the <a href="https://wiki.ubuntu.com/GnomeDo/Plugins/Apturl" title="apturl for gnome-do plugin">apturl plugin</a> to become better supported.  The end result is that its much cleaner, properly licensed and has been submitted to the do-plugins branch on launchpad for possible future inclusion in the &#8220;official&#8221; plugins package.  If you have been using the apturl plugin for Gnome Do and saw some recent breakage, you can download the new known-to-be-working-on-0.4 version <a href="http://zelut.org/projects/apturl" title="apturl for Gnome-Do">here</a>.</p>
<p><strong>GoogleSecure Greasemonkey Script</strong></p>
<p>I&#8217;m a big fanboy of data encryption, including encrypting as much of my web traffic as I can.  I hacked together a small Greasemonkey script long ago that will force encryption on any supported Google application (gmail, reader, docs, calendar, etc), and recently added Twitter as well.  I guess that might be cause for a name change, but I didn&#8217;t get that far.  I would like to extend the list of sites that it supports, so if you know of any sites that offer https on login but don&#8217;t <em>require</em> (but support) https session-wide, let me know.  If you&#8217;re interested in this tool you can download <a href="https://addons.mozilla.org/en-US/firefox/addon/748" title="Greasemonkey for Firefox">Greasemonkey here</a> and <a href="http://zelut.org/projects/greasey/" title="googlesecure greasemonkey script - force encryption on google tools">GoogleSecure here</a>.</p>
<p><strong>folding.sh</strong></p>
<p>I also have time set aside today to try and squash two remaining bugs in folding.sh.  For all of you great folks that have been using <a href="https://help.ubuntu.com/community/FoldingAtHome/folding.sh" title="folding.sh installation and management tool documentation">folding.sh</a>, expect an update fairly soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://ubuntu-tutorials.com/2008/03/21/project-update-announcements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can You Improve This Command Line Magic?</title>
		<link>http://ubuntu-tutorials.com/2007/08/13/can-you-improve-this-command-line-magic/</link>
		<comments>http://ubuntu-tutorials.com/2007/08/13/can-you-improve-this-command-line-magic/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 16:20:56 +0000</pubDate>
		<dc:creator>Christer Edwards</dc:creator>
				<category><![CDATA[c0de]]></category>

		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=412</guid>
		<description><![CDATA[Today I needed to come up with some more command line magic. You might remember the post I did about digging out of holes with some command line magic. Today&#8217;s goal was to do some math, or more specifically, find an average of numbers based from data in a text file. I asked around in [...]]]></description>
			<content:encoded><![CDATA[<p>Today I needed to come up with some more command line magic.  You might remember the post I did about <a href="http://ubuntu-tutorials.com/2007/06/21/digging-people-out-of-holes-via-the-command-line/" title="digging out of holes with the command line magic">digging out of holes</a> with some command line magic.  Today&#8217;s goal was to do some math, or more specifically, find an average of numbers based from data in a text file.  I asked around in IRC for some solutions and one user (<a href="http://www.tuxgirl.com" title="the genious coder - tuxgirl">the genius coder</a>) came up with something in about two-minutes.  Can you improve this or do it with another language?  Bash? Python? C?  I&#8217;d like to see other implementations if you&#8217;d like to take the challenge.  It&#8217;s not much but gets your mind going&#8230;</p>
<p>Here is a link to an <a href="http://www.ubuntu-tutorials.com/projects/misc/quarterly.txt" title="quarterly data example file - use for averaging">example file</a> I&#8217;m sourcing from.  Not the exact same, but you get the idea.  Basically taking quarterly data and averaging it.  (Let&#8217;s not get into a discussion on a better way to store this data in the first place, I&#8217;m just looking at clean ways to average the data.)</p>
<p><strong>First submission here: </strong></p>
<p><em>cat quarterly.txt | grep Q3 | cut -d &#8220;=&#8221; -f2 | perl -e &#8216;$a=0;$b=0;while(&lt;&gt;){$a++;$b+=$_;}print $b/$a.&#8221;\n&#8221;;&#8217;</em></p>
<p>I&#8217;m sure some of you Perl mongers can play some golf with this.  Who else wants to try?</p>
<p><hints id="hah_hints"></hints></p>
]]></content:encoded>
			<wfw:commentRss>http://ubuntu-tutorials.com/2007/08/13/can-you-improve-this-command-line-magic/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic (User agent is rejected)
Database Caching 2/26 queries in 0.016 seconds using disk: basic
Object Caching 339/380 objects using disk: basic

Served from: ubuntu-tutorials.com @ 2012-02-09 13:18:02 -->
