<?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>Trent Richardson &#187; Linux</title> <atom:link href="http://trentrichardson.com/category/linux/feed/" rel="self" type="application/rss+xml" /><link>http://trentrichardson.com</link> <description>practical web design &#38; development</description> <lastBuildDate>Wed, 02 May 2012 17:05:19 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>Easily Run ColdFusion on Linux, Mac, Windows</title><link>http://trentrichardson.com/2012/02/29/easily-run-coldfusion-on-linux-mac-windows/</link> <comments>http://trentrichardson.com/2012/02/29/easily-run-coldfusion-on-linux-mac-windows/#comments</comments> <pubDate>Wed, 29 Feb 2012 11:53:54 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[Open Blue Dragon]]></category> <category><![CDATA[windows]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1133</guid> <description><![CDATA[Open Blue Dragon has come a long way in a short period of time. They now offer a super fast way to get ColdFusion up and running on pretty much any machine for developement. On top of that it comes with a nice GUI. So how easy is it? Just download the package, unzip it, [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/04/04/coldfusion-snippets-for-gedit/' rel='bookmark' title='ColdFusion Snippets for Gedit'>ColdFusion Snippets for Gedit</a></li><li><a
href='http://trentrichardson.com/2011/04/01/format-names-coldfusion/' rel='bookmark' title='Format Names in ColdFusion'>Format Names in ColdFusion</a></li><li><a
href='http://trentrichardson.com/2009/01/21/coldfusion-style-dumps-in-php/' rel='bookmark' title='ColdFusion Style Dumps in PHP'>ColdFusion Style Dumps in PHP</a></li></ol>]]></description> <content:encoded><![CDATA[<p><a
href="http://www.openbd.org/" title="Open Blue Dragon" target="_blank">Open Blue Dragon</a> has come a long way in a short period of time.  They now offer a super fast way to get ColdFusion up and running on pretty much any machine for developement.  On top of that it comes with a nice GUI.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2012/02/OBD-Desktop.jpg"><img
src="http://trentrichardson.com/wp-content/uploads/2012/02/OBD-Desktop-300x191.jpg" alt="" title="OBD-Desktop" width="300" height="191" class="size-medium wp-image-1134" /></a></p><p>So how easy is it?  Just download the package, unzip it, and run the OpenBlueDragonDesktop.sh.  Thats all!.  It will launch a gui to start, stop, and point the server anywhere (pictured above).  I also must add the administration interface is MUCH more pleasing than their Adobe counterpart.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2012/02/OBD-Administrator.jpg"><img
src="http://trentrichardson.com/wp-content/uploads/2012/02/OBD-Administrator.jpg" alt="" title="OBD-Administrator" width="500" height="311" class="size-full wp-image-1135" /></a></p><p>I still use ColdFusion on a daily basis, along with php.  But the question remains. Does ColdFusion still play a major roll in web development? Or has it been written off is a slow, out of date, has been?</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/04/04/coldfusion-snippets-for-gedit/' rel='bookmark' title='ColdFusion Snippets for Gedit'>ColdFusion Snippets for Gedit</a></li><li><a
href='http://trentrichardson.com/2011/04/01/format-names-coldfusion/' rel='bookmark' title='Format Names in ColdFusion'>Format Names in ColdFusion</a></li><li><a
href='http://trentrichardson.com/2009/01/21/coldfusion-style-dumps-in-php/' rel='bookmark' title='ColdFusion Style Dumps in PHP'>ColdFusion Style Dumps in PHP</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2012/02/29/easily-run-coldfusion-on-linux-mac-windows/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Install PHP Pear Spreadsheet in Ubuntu and Mint</title><link>http://trentrichardson.com/2012/02/22/install-php-pear-spreadsheet-in-ubuntu-and-mint/</link> <comments>http://trentrichardson.com/2012/02/22/install-php-pear-spreadsheet-in-ubuntu-and-mint/#comments</comments> <pubDate>Wed, 22 Feb 2012 11:50:10 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CakePHP]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[excel]]></category> <category><![CDATA[ods]]></category> <category><![CDATA[pear]]></category> <category><![CDATA[spreadsheet]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1121</guid> <description><![CDATA[If you&#8217;ve ever had to work with spreadsheets on a linux system, you may have stumbled across the PEAR Excel Spreadsheet Writer. Its a quite useful too, but installing it on your system may be a little misleading. Here&#8217;s the quick rundown: # install php-pear sudo apt-get install php-pear # install PEAR OLE sudo pear [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2010/02/08/installing-memcached-on-ubuntu-for-php/' rel='bookmark' title='Installing Memcached on Ubuntu for PHP'>Installing Memcached on Ubuntu for PHP</a></li><li><a
href='http://trentrichardson.com/2008/01/08/install-safari-on-ubuntu/' rel='bookmark' title='Install Safari on Ubuntu'>Install Safari on Ubuntu</a></li><li><a
href='http://trentrichardson.com/2008/04/21/localhost-subdomains-on-ubuntu/' rel='bookmark' title='Localhost Subdomains on Ubuntu'>Localhost Subdomains on Ubuntu</a></li></ol>]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve ever had to work with spreadsheets on a linux system, you may have stumbled across the <a
href="http://pear.php.net/Spreadsheet_Excel_Writer" title="PEAR Spreadsheet Writer" target="_blank">PEAR Excel Spreadsheet Writer</a>. Its a quite useful too, but installing it on your system may be a little misleading.  Here&#8217;s the quick rundown:</p><pre class="shell"><code>
# install php-pear
sudo apt-get install php-pear

# install PEAR OLE
sudo pear install OLE-1.0.0RC2

# install Spreadsheet_Excel_Writer
sudo pear install Spreadsheet_Excel_Writer-0.9.2
</code></pre><p>Not much to it, but just getting around the prereq of OLE. Now you should be able to create and edit Excel spreadsheets on linux.  Of course if you have complete flexibility in requirements for your app, you would generate ODS, but I&#8217;ll leave that for a future topic ;) Unfortunately the corporate world is quite attached to .xls and xlsx files. Anyway.. Enjoy!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2010/02/08/installing-memcached-on-ubuntu-for-php/' rel='bookmark' title='Installing Memcached on Ubuntu for PHP'>Installing Memcached on Ubuntu for PHP</a></li><li><a
href='http://trentrichardson.com/2008/01/08/install-safari-on-ubuntu/' rel='bookmark' title='Install Safari on Ubuntu'>Install Safari on Ubuntu</a></li><li><a
href='http://trentrichardson.com/2008/04/21/localhost-subdomains-on-ubuntu/' rel='bookmark' title='Localhost Subdomains on Ubuntu'>Localhost Subdomains on Ubuntu</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2012/02/22/install-php-pear-spreadsheet-in-ubuntu-and-mint/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Return Multiple Result Sets with PHP and PostgreSQL Functions</title><link>http://trentrichardson.com/2012/01/04/return-multiple-result-sets-with-php-and-postgresql-functions/</link> <comments>http://trentrichardson.com/2012/01/04/return-multiple-result-sets-with-php-and-postgresql-functions/#comments</comments> <pubDate>Wed, 04 Jan 2012 11:45:24 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Database]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[cursor]]></category> <category><![CDATA[functions]]></category> <category><![CDATA[postgresql]]></category> <category><![CDATA[procedures]]></category> <category><![CDATA[results]]></category> <category><![CDATA[return]]></category> <category><![CDATA[stored]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1061</guid> <description><![CDATA[A while back I discussed how to use the new sqlsrv extension for php to retrieve multiple result sets at a time from stored proceedures. This was indeed helpful when you need to retrieve related data and avoid multiple calls to stored proceedures. The down side is this was using a rather expensive (but good) [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/08/10/making-sense-of-stored-procedures-with-php-pdo-and-sqlsrv/' rel='bookmark' title='Making Sense of Stored Procedures with PHP, PDO, and Sqlsrv'>Making Sense of Stored Procedures with PHP, PDO, and Sqlsrv</a></li><li><a
href='http://trentrichardson.com/2010/12/01/thought-is-else-return-really-necessary/' rel='bookmark' title='Thought: Is else return really necessary?'>Thought: Is else return really necessary?</a></li><li><a
href='http://trentrichardson.com/2010/01/31/cakephp-postgresql-and-regex/' rel='bookmark' title='CakePHP, PostgreSQL, and Regex'>CakePHP, PostgreSQL, and Regex</a></li></ol>]]></description> <content:encoded><![CDATA[<p>A while back I discussed how to use the new sqlsrv extension for php to <a
href="http://trentrichardson.com/2011/08/10/making-sense-of-stored-procedures-with-php-pdo-and-sqlsrv/" title="SQL Server Stored Procedures with PHP, PDO, and SQLSrv">retrieve multiple result sets at a time from stored proceedures</a>.  This was indeed helpful when you need to retrieve related data and avoid multiple calls to stored proceedures.  The down side is this was using a rather expensive (but good) database engine.  Also, <a
href="http://www.microsoft.com/download/en/details.aspx?id=28160" title="SQLSrv PHP extension for linux" target="_blank">until recently</a>, there was absolutely no support for the sqlsrv php extension on unix based servers.  How can the open source world tap into such functionality?</p><p>PostgreSQL has the ability to return multiple cursors to result sets.  Using this we can achieve the same effect with php with a little magic.  Lets take a look at a simple function which returns three queries by way of refcursor type.  Also note that I said &#8220;function&#8221;, not &#8220;procedure&#8221;, but never fear, 6 of one, half dozen of the other as far as this topic goes:</p><pre><code class="sql">
CREATE OR REPLACE FUNCTION test_get_users(userID integer) RETURNS SETOF refcursor AS $$

	DECLARE
		ref1 refcursor;
		ref2 refcursor;
		ref3 refcursor;
	BEGIN

	OPEN ref1 FOR
		SELECT id, name, email FROM users;
	RETURN NEXT ref1;

	OPEN ref2 FOR
		SELECT id FROM users WHERE is_active=1;
	RETURN next ref2;

	OPEN ref3 FOR
		SELECT * FROM users WHERE id = userID;
	RETURN next ref3;

	RETURN;

END;
$$ LANGUAGE plpgsql;
</code></pre><p><span
id="more-1061"></span></p><p><a
href="http://trentrichardson.com/wp-content/uploads/2012/01/pg_test_get_users.jpg"><img
src="http://trentrichardson.com/wp-content/uploads/2012/01/pg_test_get_users.jpg" alt="" title="pg_test_get_users" width="200" height="111" class="alignright size-full wp-image-1065" /></a></p><p>So that is pretty simple, we run 3 select queries, and return the refcursor for those.  Now the tricky part will be how to read each of these queries on the php end.  The values returned from calling this function will resemble the image presented here.  These merely represent references to the cursors to each query run, so we will have to use some pg magic to pull those result sets in.  It boils down to we need to make one call to the function, then a separate call per result set to bring in those results (note the query has run at this point, its basically reading in the data, which should be quick).  Lets look at the SQL which would achieve this:<pre><code class="sql">
BEGIN;
SELECT test_get_users(2);
FETCH ALL IN "&lt;unnamed portal 1&gt;";
FETCH ALL IN "&lt;unnamed portal 2&gt;";
FETCH ALL IN "&lt;unnamed portal 3&gt;";
END;
</code></pre><p>Now it should make a little more sense what has to happen.  We call a fetch for each result set to return. So now we just need to process this with PHP:</p><pre><code class="php">
$conn = new PDO("pgsql:host=localhost;port=5432;dbname=testing", "username", "password");

$userID = 2;

// begin transaction, this is all one process
$conn-&gt;beginTransaction();

	// call the function
	$stmt = $conn-&gt;prepare("select test_get_users(:userID)");
	$stmt-&gt;bindParam('userID', $userID, PDO::PARAM_INT);
	$stmt-&gt;execute();
	$cursors = $stmt-&gt;fetchAll();
	$stmt-&gt;closeCursor();

	// get each result set
	$results = array();
	foreach($cursors as $k=&gt;$v){
		$stmt = $conn-&gt;query('FETCH ALL IN "'. $v[0] .'";');
		$results[$k] = $stmt-&gt;fetchAll();
		$stmt-&gt;closeCursor();
	}
$conn-&gt;commit();
unset($stmt);

echo '&lt;pre&gt;';
print_r($results);echo "\n"; // all record sets
echo '&lt;/pre&gt;';
</code></pre><p>Now first off, we call the select test_get_users(), which returns a list of refcursor names.  So with this we know how many queries were returned.  Just loop through this list and fetch each result set.  It is essentially the same process used from the Sql Server example, except the nextRowset() is not yet implemented for the pdo pgsql extension, so we just manually call the fetch.  No Biggie. You would then receive something similar to the following:</p><pre><code>
Array
(
	[0] =&gt; Array
		(
			[0] =&gt; Array
				(
					[id] =&gt; 2
					[0] =&gt; 2
					[name] =&gt; John Doe
					[1] =&gt; John Doe
					[email] =&gt; test2@test.com
					[2] =&gt; test2@test.com
				)

			[1] =&gt; Array
				(
					[id] =&gt; 3
					[0] =&gt; 3
					[name] =&gt; Jane Doe
					[1] =&gt; Jane Doe
					[email] =&gt; test3@test.com
					[2] =&gt; test3@test.com
				)

			......

		)

	[1] =&gt; Array
		(
			[0] =&gt; Array
				(
					[id] =&gt; 3
					[0] =&gt; 3
				)

			[1] =&gt; Array
				(
					[id] =&gt; 1
					[0] =&gt; 1
				)

		)

	[2] =&gt; Array
		(
			[0] =&gt; Array
				(
					[id] =&gt; 2
					[0] =&gt; 2
					[name] =&gt; John Doe
					[1] =&gt; John Doe
					[email] =&gt; test2@test.com
					[2] =&gt; test2@test.com
					[password] =&gt; zxcvxcvczxcv
					[3] =&gt; zxcvxcvczxcv
					[is_active] =&gt; 0
					[4] =&gt; 0
				)

		)

)
</code></pre><p>If you&#8217;re still feeling frisky at this point, there are all sorts of ways to &#8220;fetch&#8221; the result sets, just take a look at the <a
href="http://www.postgresql.org/docs/9.1/static/plpgsql-cursors.html" title="Postgresql Cursor Docs" target="_blank">docs on cursors</a>.  The more I use PostgreSQL the more I am becoming a fan.  It&#8217;s power and features go far beyond my skill set, but it feels good always knowing you have the best tool at hand for whatever task you have ahead of you.  As always feel free to chime in and leave any knowledge you may have, especially on Postgres!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/08/10/making-sense-of-stored-procedures-with-php-pdo-and-sqlsrv/' rel='bookmark' title='Making Sense of Stored Procedures with PHP, PDO, and Sqlsrv'>Making Sense of Stored Procedures with PHP, PDO, and Sqlsrv</a></li><li><a
href='http://trentrichardson.com/2010/12/01/thought-is-else-return-really-necessary/' rel='bookmark' title='Thought: Is else return really necessary?'>Thought: Is else return really necessary?</a></li><li><a
href='http://trentrichardson.com/2010/01/31/cakephp-postgresql-and-regex/' rel='bookmark' title='CakePHP, PostgreSQL, and Regex'>CakePHP, PostgreSQL, and Regex</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2012/01/04/return-multiple-result-sets-with-php-and-postgresql-functions/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Clientside Plugin Available for Gedit 3</title><link>http://trentrichardson.com/2011/12/15/clientside-plugin-available-for-gedit-3/</link> <comments>http://trentrichardson.com/2011/12/15/clientside-plugin-available-for-gedit-3/#comments</comments> <pubDate>Thu, 15 Dec 2011 11:34:57 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[clientside]]></category> <category><![CDATA[format]]></category> <category><![CDATA[gedit]]></category> <category><![CDATA[lint]]></category> <category><![CDATA[minify]]></category> <category><![CDATA[plugin]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1053</guid> <description><![CDATA[The Gedit Clientside plugin is now available for Gedit 3. All the features remained the same, just some minor tweaks throughout. You can still find both Gedit versions of the plugin on Github: Clientside Plugin for Gedit 3+ Clientside Plugin for Gedit 2 I moved the old Gedit 2 version to a separate branch on [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li><li><a
href='http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/' rel='bookmark' title='Gedit Clientside Plugin'>Gedit Clientside Plugin</a></li><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li></ol>]]></description> <content:encoded><![CDATA[<p>The Gedit Clientside plugin is now available for Gedit 3.  All the features remained the same, just some minor tweaks throughout.  You can still find both Gedit versions of the plugin on Github:</p><ul><li><a
href="https://github.com/trentrichardson/Gedit-Clientside-Plugin" title="Clientside Plugin for Gedit 3+" target="_blank">Clientside Plugin for Gedit 3+</a></li><li><a
href="https://github.com/trentrichardson/Gedit-Clientside-Plugin/tree/Gedit2" title="Clientside Plugin for Gedit 2" target="_blank">Clientside Plugin for Gedit 2</a></li></ul><p>I moved the old Gedit 2 version to a separate branch on Github, so both versions of the project are still available.</p><p>If you&#8217;re unfamiliar with the Clientside plugin you just found a real gem.  The plugin bundles together functionality to minify, format, batch minify, and run a lint service on both Javascript and CSS.  Hope you enjoy!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li><li><a
href='http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/' rel='bookmark' title='Gedit Clientside Plugin'>Gedit Clientside Plugin</a></li><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/12/15/clientside-plugin-available-for-gedit-3/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Ubuntu 11.10 Almost Here</title><link>http://trentrichardson.com/2011/10/07/ubuntu-11-10-almost-here/</link> <comments>http://trentrichardson.com/2011/10/07/ubuntu-11-10-almost-here/#comments</comments> <pubDate>Fri, 07 Oct 2011 16:29:49 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[gnome]]></category> <category><![CDATA[gtk]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[unity]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=974</guid> <description><![CDATA[The next version of Ubuntu is nearly here. I must admit I&#8217;ve not yet made the move to Unity, as I&#8217;m still on Gnome 2, but I&#8217;m debating on making the switch this go around. I&#8217;ve got a few projects I need to update as well (Clientside and Email Dissector). The last release was the [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/05/12/ubuntu-thoughts/' rel='bookmark' title='Ubuntu Thoughts'>Ubuntu Thoughts</a></li><li><a
href='http://trentrichardson.com/2011/06/29/gedit-clientside-now-with-csslint/' rel='bookmark' title='Gedit Clientside Now with CSSLint'>Gedit Clientside Now with CSSLint</a></li><li><a
href='http://trentrichardson.com/2011/08/23/inspect-and-debug-with-email-dissector/' rel='bookmark' title='Inspect and Debug with Email Dissector'>Inspect and Debug with Email Dissector</a></li></ol>]]></description> <content:encoded><![CDATA[<p><a
href="http://www.ubuntu.com/" class="alignright"><img
src="http://www.ubuntu.com/countdown/banner1.png" border="0" width="180" height="150" alt="The next version of Ubuntu is coming soon"></a></p><p>The next version of <a
href="http://www.ubuntu.com/" title="Ubuntu Linux">Ubuntu</a> is nearly here.  I must admit I&#8217;ve not yet made the move to Unity, as I&#8217;m still on Gnome 2, but I&#8217;m debating on making the switch this go around.  I&#8217;ve got a few projects I need to update as well (<a
href="http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/" title="Gedit Clientside Plugin">Clientside</a> and <a
href="http://trentrichardson.com/2011/08/23/inspect-and-debug-with-email-dissector/" title="Python Email Dissector and Debugger">Email Dissector</a>).  The last release was the first release of Unity and I felt it was too soon to hop aboard.  I&#8217;ve debated on Unity or Gnome 3.  Anyone have any preferences or opinions?</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/05/12/ubuntu-thoughts/' rel='bookmark' title='Ubuntu Thoughts'>Ubuntu Thoughts</a></li><li><a
href='http://trentrichardson.com/2011/06/29/gedit-clientside-now-with-csslint/' rel='bookmark' title='Gedit Clientside Now with CSSLint'>Gedit Clientside Now with CSSLint</a></li><li><a
href='http://trentrichardson.com/2011/08/23/inspect-and-debug-with-email-dissector/' rel='bookmark' title='Inspect and Debug with Email Dissector'>Inspect and Debug with Email Dissector</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/10/07/ubuntu-11-10-almost-here/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Inspect and Debug with Email Dissector</title><link>http://trentrichardson.com/2011/08/23/inspect-and-debug-with-email-dissector/</link> <comments>http://trentrichardson.com/2011/08/23/inspect-and-debug-with-email-dissector/#comments</comments> <pubDate>Tue, 23 Aug 2011 11:33:21 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[alternate]]></category> <category><![CDATA[attachment]]></category> <category><![CDATA[debug]]></category> <category><![CDATA[email]]></category> <category><![CDATA[inspect]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[python]]></category> <category><![CDATA[smtp]]></category> <category><![CDATA[source]]></category> <category><![CDATA[test]]></category> <category><![CDATA[text]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=912</guid> <description><![CDATA[Everyone needs to test emails for web applications, but it turns your inbox into a mess. Not to mention constantly refreshing your web mail and clicking Send/Receive. You struggle to find the broken html, and viewing your text and html alternate versions just takes too much time. This is where Email Dissector comes in to [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/10/07/ubuntu-11-10-almost-here/' rel='bookmark' title='Ubuntu 11.10 Almost Here'>Ubuntu 11.10 Almost Here</a></li><li><a
href='http://trentrichardson.com/2011/03/17/send-mail-locally-on-ubuntu/' rel='bookmark' title='Send Mail Locally on Ubuntu'>Send Mail Locally on Ubuntu</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Everyone needs to test emails for web applications, but it turns your inbox into a mess.  Not to mention constantly refreshing your web mail and clicking Send/Receive.  You struggle to find the broken html, and viewing your text and html alternate versions just takes too much time.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-html.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-html-300x176.png" alt="" title="Email Dissector html tab" width="300" height="176" class="alignright size-medium wp-image-919" /></a></p><p>This is where Email Dissector comes in to play.  Email Dissector creates a dummy smtp server right on your desktop.  It will then intercept any outgoing emails on the host and port it is listening on, and present them to you in a few different formats: HTML, HTML Source, Text (for multipart emails with alternate text versions), raw headers, and attachments.</p><p>Since the email server is contained right in the application, there is zero wait time.  The inbox is refreshed immediately!  Also the Inbox is the only box, as this is development work only.</p><p><span
id="more-912"></span></p><p>Before we get too carried away it needs to be noted right off the bat that the html view uses webkit.  This means it is likely much more advanced than the general email client, so don&#8217;t get too far ahead of yourself with css and javascript. The good part is you can quickly see any major issues before debugging in 50 different email clients.</p><p>The html source view elegantly shows off the markup.  Now you can see what is wrong with your html.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-source.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-source-300x176.png" alt="" title="Email Dissector Source Tab" width="300" height="176" class="alignnone size-medium wp-image-920" /></a></p><p>The Text tab is for alternate text versions of emails.  If your email client is html capable (which it probably is) it can be difficult to find the the text versions of emails if they are supplied.  Believe it or not but some people actually like text emails as they are generally short and to the point.  Email Dissector presents this conviniently.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-text.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-text-300x176.png" alt="" title="Email Dissector Text Tab" width="300" height="176" class="alignnone size-medium wp-image-921" /></a></p><p>Looking for the encoding or your reply-to values?  Check the Raw tab to see all the headers sent</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-raw.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-raw-300x176.png" alt="" title="Email Dissector Raw Tab" width="300" height="176" class="alignnone size-medium wp-image-922" /></a></p><p>Finally you can see what attachments were sent.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-attachments.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/08/Screenshot-Email-Dissector-attachments-300x176.png" alt="" title="Email Dissector Attachments Tab" width="300" height="176" class="alignnone size-medium wp-image-923" /></a></p><p>Thats all there is to this simple little program, but it should surely speed up you email development significantly!  Best part is it is developed in python, so it should run most anywhere python does as long as Webkit is available. (So far tested on Ubuntu and Windows).  Enjoy!</p><p><a
href="https://github.com/trentrichardson/Python-Email-Dissector" title="Python Email Dissector on Github" target="_blank">Python Email Dissector on Github</a></p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/10/07/ubuntu-11-10-almost-here/' rel='bookmark' title='Ubuntu 11.10 Almost Here'>Ubuntu 11.10 Almost Here</a></li><li><a
href='http://trentrichardson.com/2011/03/17/send-mail-locally-on-ubuntu/' rel='bookmark' title='Send Mail Locally on Ubuntu'>Send Mail Locally on Ubuntu</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/08/23/inspect-and-debug-with-email-dissector/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Clientside Discussion</title><link>http://trentrichardson.com/2011/06/30/clientside-discussion/</link> <comments>http://trentrichardson.com/2011/06/30/clientside-discussion/#comments</comments> <pubDate>Thu, 30 Jun 2011 11:53:43 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[clientside]]></category> <category><![CDATA[coffeescript]]></category> <category><![CDATA[gedit]]></category> <category><![CDATA[less]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=876</guid> <description><![CDATA[I keep seeing mention of a few &#8220;preprocessors&#8221; for javascript and css, including CoffeeScript, Sass, and Less. I personally don&#8217;t see the need in these tools, but apparently they are all the rave at the moment. Essentially what these do is allow you to write in a more functional language/script, and compiles it down to [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li><li><a
href='http://trentrichardson.com/2011/06/29/gedit-clientside-now-with-csslint/' rel='bookmark' title='Gedit Clientside Now with CSSLint'>Gedit Clientside Now with CSSLint</a></li><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I keep seeing mention of a few &#8220;preprocessors&#8221; for javascript and css, including <a
href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a>, <a
href="http://sass-lang.com/">Sass</a>, and <a
href="http://lesscss.org/">Less</a>.  I personally don&#8217;t see the need in these tools, but apparently they are all the rave at the moment.  Essentially what these do is allow you to write in a more functional language/script, and compiles it down to cross browser css or javascript.  I have a few questions of my own, specifically how the work with existing frameworks like jQuery or Mootools (accessing objects from the Coffee side).  If anyone has any input on this or experience please share.</p><p>The main topic of this post however concerns the <a
href="http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/">Gedit Clientside Plugin</a>.  It appears it would be possible to easily integrate CoffeeScript and Less into Clientside, since they both work well with node.js.  One user suggested before adding support for Sass, however that seems to be more geared toward Ruby.  The question is would this be a valuable/used component if added to the Clientside plugin?  This plugin is geared towards helping manipulate, format, and debug clientside languages, and these do fall into this category, but I don&#8217;t want to begin cluttering the plugin with useless tools, and waist time keeping up with the latest CoffeeScript and Less plugins.</p><p>On another potential change to Clientside would be to consolidate the menu.  Instead of having separate JS and CSS items for minify, format, lint, and batch minify, there could be one menu item for each, and depending on the document type process it accordingly.  So considering this change, we could add one more menu item called &#8220;Compile: Coffee/Less&#8221;.  I look forward to hearing your thoughts!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li><li><a
href='http://trentrichardson.com/2011/06/29/gedit-clientside-now-with-csslint/' rel='bookmark' title='Gedit Clientside Now with CSSLint'>Gedit Clientside Now with CSSLint</a></li><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/06/30/clientside-discussion/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Gedit Clientside Now with CSSLint</title><link>http://trentrichardson.com/2011/06/29/gedit-clientside-now-with-csslint/</link> <comments>http://trentrichardson.com/2011/06/29/gedit-clientside-now-with-csslint/#comments</comments> <pubDate>Wed, 29 Jun 2011 11:39:25 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[clientside]]></category> <category><![CDATA[gedit]]></category> <category><![CDATA[lint]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=865</guid> <description><![CDATA[It only feels right to include a lint method for CSS since javascript has had support in the Gedit Clientside Plugin from the beginning. The latest commit over on Github now includes CSSLint through the nodejs hookup. Don&#8217;t worry, if you had it working before all you need to do is update your plugin. The [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li><li><a
href='http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/' rel='bookmark' title='Gedit Clientside Plugin'>Gedit Clientside Plugin</a></li><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li></ol>]]></description> <content:encoded><![CDATA[<p>It only feels right to include a lint method for CSS since javascript has had support in the <a
href="http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/">Gedit Clientside Plugin</a> from the beginning.  The latest commit over on <a
href="https://github.com/trentrichardson/Gedit-Clientside-Plugin">Github</a> now includes <a
href="https://github.com/stubbornella/csslint">CSSLint</a> through the nodejs hookup.  Don&#8217;t worry, if you had it working before all you need to do is update your plugin.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/06/gedit-clientside-csslint.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/06/gedit-clientside-csslint.png" alt="Gedit Clientside Plugin with CSSLint" title="gedit-clientside-csslint" width="461" height="225" class="alignright size-full wp-image-874" /></a></p><p>The new CSSLint functionality works the same as JS Lint, through Tools->Clientside->CSS, or through the shortcut Alt+Shift+U.  If there are any errors you will see them in the bottom panel under a tab called Clientside Issues.</p><p>Now the next step is to get Clientside plugin working with Gedit 3.  I know this will take a bit of reworking, but honestly I&#8217;m still using classic gnome, not Unity or Gnome3.  While I would like to have a version for both, its not priority at the moment.  I plan to start using either Unity or Gnome 3 with Ubuntu&#8217;s next release.  I felt it was too soon for this round, and didn&#8217;t have time for a cut in productivity trying to get things straightened out.</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li><li><a
href='http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/' rel='bookmark' title='Gedit Clientside Plugin'>Gedit Clientside Plugin</a></li><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/06/29/gedit-clientside-now-with-csslint/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Enabling Apache Sites and Modules in Ubuntu</title><link>http://trentrichardson.com/2011/06/17/enabling-apache-sites-and-modules-in-ubuntu/</link> <comments>http://trentrichardson.com/2011/06/17/enabling-apache-sites-and-modules-in-ubuntu/#comments</comments> <pubDate>Fri, 17 Jun 2011 11:28:44 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Linux]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=836</guid> <description><![CDATA[So you&#8217;ve installed apache and the rest of your lamp system in Ubuntu, and you&#8217;re needing to do some configuring. You&#8217;ve got some virtual hosts you need set up and some modules you need enabled. You can dive into the config files and enable everything that way, however apache comes with some nice methods to [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/23/creating-virtual-hosts-in-ubuntu/' rel='bookmark' title='Creating Virtual Hosts in Ubuntu'>Creating Virtual Hosts in Ubuntu</a></li><li><a
href='http://trentrichardson.com/2008/11/12/intrepid-ibex-and-apache2-virtualhosts/' rel='bookmark' title='Intrepid Ibex and Apache2 VirtualHost'>Intrepid Ibex and Apache2 VirtualHost</a></li><li><a
href='http://trentrichardson.com/2008/04/21/localhost-subdomains-on-ubuntu/' rel='bookmark' title='Localhost Subdomains on Ubuntu'>Localhost Subdomains on Ubuntu</a></li></ol>]]></description> <content:encoded><![CDATA[<p>So you&#8217;ve installed apache and the rest of your lamp system in Ubuntu, and you&#8217;re needing to do some configuring.  You&#8217;ve got some virtual hosts you need set up and some modules you need enabled.  You can dive into the config files and enable everything that way, however apache comes with some nice methods to do this for us.  Lets say we want to enable the rewrite module.  If you browse the directory structure you will see there is &#8220;/etc/apache2/mods-available&#8221; and &#8220;/etc/apache2/mods-enabled&#8221;.  This is pretty self explanatory, the trick is mods-enabled directory is really just symbolic links to the modules in mods-available.</p><h4>Enable Apache Module</h4><p>Ok, so now that you know the inner workings, here&#8217;s how to enable an available module from the terminal without getting our hands too dirty:</p><pre class="shell">
sudo a2enmod rewrite
</pre><p>That wasn&#8217;t too bad! Also you can run just &#8220;a2enmod&#8221; and it will print out all available modules and ask you to type in the one you want.</p><h4>Enable Apache Site/VirtualHost</h4><p>Ok, now you have a site you need enabled, &#8220;mynewsite&#8221;.  You&#8217;ve already added &#8220;mynewsite&#8221; to your host file (/etc/hosts).  Now you would create a new site file in &#8220;/etc/apache2/sites-available&#8221; called &#8220;mynewsite&#8221; and add your virtual host config:</p><pre class="shell">
sudo pico /etc/apache2/sites-available/mynewsite
</pre><p>I&#8217;ll let you handle the details of your new site&#8217;s virtual host config and move on.  Now we can call apache&#8217;s tool to enable this site (essentially tell apache to create a symbolic link in sites-enabled):</p><pre class="shell">
sudo a2ensite mynewsite
# running just a2ensite will print available sites and allow you to key in the site you want
</pre><p>And finally restart apache, and we&#8217;re done!</p><pre class="shell">
sudo apache2ctl restart
</pre><p>Now after all of this if you need to disable a module or site you can run &#8220;a2dismod&#8221; or &#8220;a2dissite&#8221; accordingly.  Thats it! You&#8217;re enabling and disabling apache modules like a pro!</p><ul><li><a
href="http://manpages.ubuntu.com/manpages/oneiric/man8/a2enmod.8.html">Ubuntu Manual: a2enmod/a2dismod</a></li><li><a
href="http://manpages.ubuntu.com/manpages/oneiric/man8/a2ensite.8.html">Ubuntu Manual: a2ensite/a2dissite</a></li></ul><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/23/creating-virtual-hosts-in-ubuntu/' rel='bookmark' title='Creating Virtual Hosts in Ubuntu'>Creating Virtual Hosts in Ubuntu</a></li><li><a
href='http://trentrichardson.com/2008/11/12/intrepid-ibex-and-apache2-virtualhosts/' rel='bookmark' title='Intrepid Ibex and Apache2 VirtualHost'>Intrepid Ibex and Apache2 VirtualHost</a></li><li><a
href='http://trentrichardson.com/2008/04/21/localhost-subdomains-on-ubuntu/' rel='bookmark' title='Localhost Subdomains on Ubuntu'>Localhost Subdomains on Ubuntu</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/06/17/enabling-apache-sites-and-modules-in-ubuntu/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Remove Photo Timestamps in Gimp</title><link>http://trentrichardson.com/2011/05/30/remove-photo-timestamps-in-gimp/</link> <comments>http://trentrichardson.com/2011/05/30/remove-photo-timestamps-in-gimp/#comments</comments> <pubDate>Mon, 30 May 2011 11:26:54 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Design]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[gimp]]></category> <category><![CDATA[object remove]]></category> <category><![CDATA[remove timestamp]]></category> <category><![CDATA[resynthesizer]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=810</guid> <description><![CDATA[I&#8217;m not a big photographer, so sometimes I forget the camera has a pesky timestamp feature that somehow I forget to turn off from time to time. Well as you&#8217;re about to find out its not too hard to remove with Gimp. There are plugins available for just this thing, but I like to use [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2008/10/02/new-gimp-out/' rel='bookmark' title='New Gimp Out!'>New Gimp Out!</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I&#8217;m not a big photographer, so sometimes I forget the camera has a pesky timestamp feature that somehow I forget to turn off from time to time.  Well as you&#8217;re about to find out its not too hard to remove with Gimp.  There are plugins available for just this thing, but I like to use a slightly different approach as it could be used for more than just timestamps.  We&#8217;re going to use the &#8220;Smart Remove Selection&#8221; which comes with the <a
href="http://registry.gimp.org/node/25219">Gimp Resynthesizer</a> plugin.  Lets start off by watching the quick video I made of this proceedure.</p><p><object
width="425" height="344"><param
name="movie" value="http://www.youtube.com/v/sBnDH8bnPUI?hl=en&#038;fs=1"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/sBnDH8bnPUI?hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p><p>Ok, as you could tell the first step is to open up Synaptic (or just use apt-get) and install &#8220;gimp-resynthesizer&#8221;.  This will add a few &#8220;Smart&#8221; commands under the Filter->Enhance menu.  Now our tools are in place, lets get rolling.</p><ol><li>First choose the Select by Color Tool, and set your threshold to about 60 (that worked great for me, you may have to tweak the threshold depending on your image)</li><li>Click on your timestamp to select it, if your threshold is set properly your entire timestamp should be selected with one click.</li><li>Under the Select menu choose Grow.  Depending on the size of your image, and if your timestamp has a slight glow/shadow/feathering/fade you may need to tweak the grow by variable to make sure the selection covers it all.</li><li>Now under Filter->Enhance menu choose Smart Remove Selection.  The variable option I used was 100px.  This determines how much of the image surrounding the selection will be used to determine the pattern to replace it with.</li></ol><p>Thats it, pretty easy?  I think this approach works pretty darn well, plus you got to learn a new tool which will work for much more than a removing a timestamp.  Also if you&#8217;re not an Ubuntu user the link above for the plugin provides a manual download instead of using Synaptic.</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2008/10/02/new-gimp-out/' rel='bookmark' title='New Gimp Out!'>New Gimp Out!</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/05/30/remove-photo-timestamps-in-gimp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 4/114 queries in 0.037 seconds using disk: basic
Object Caching 2636/2842 objects using disk: basic

Served from: trentrichardson.com @ 2012-05-21 05:47:25 -->
