<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Andrew E. Bruno &#187; Linux</title>
	<atom:link href="http://left.subtree.org/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://left.subtree.org</link>
	<description>A sourceful of secrets</description>
	<lastBuildDate>Mon, 10 May 2010 03:56:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='left.subtree.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/e14c799c6e8030a8abefcb495c0b0e17?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Andrew E. Bruno &#187; Linux</title>
		<link>http://left.subtree.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://left.subtree.org/osd.xml" title="Andrew E. Bruno" />
	<atom:link rel='hub' href='http://left.subtree.org/?pushpress=hub'/>
		<item>
		<title>Neo FreeRunner = Freedom</title>
		<link>http://left.subtree.org/2008/07/22/neo-freerunner-freedom/</link>
		<comments>http://left.subtree.org/2008/07/22/neo-freerunner-freedom/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 03:22:40 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[FreeRunner]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Neo]]></category>
		<category><![CDATA[OpenMoko]]></category>

		<guid isPermaLink="false">http://left.subtree.org/?p=23</guid>
		<description><![CDATA[Open. Mobile. Free. That was the tag line printed on the side of the box which housed my shiny new Neo FreeRunner. I finally had some time to sit down and play with this new device and so far it&#8217;s blown me away. If you&#8217;re a Linux geek and haven&#8217;t checked this out yet I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=23&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Open. Mobile. Free.</strong> That was the tag line printed on the side of the box which housed my shiny new <a href="http://wiki.openmoko.org/wiki/FreeRunner_Overview">Neo FreeRunner</a>. I finally had some time to sit down and play with this new device and so far it&#8217;s blown me away. If you&#8217;re a Linux geek and haven&#8217;t checked this out yet I highly recommend <a href="http://www.openmoko.com/product.html">getting one</a>. It&#8217;s a truly open platform with a thriving community and is supported by a company which has basically open sourced their internal development. Where else could you get the complete <a href="http://wiki.openmoko.org/wiki/CAD_models">CAD files</a> for your phone? There&#8217;s a good post about why you might <a href="http://www.fsf.org/blogs/community/5-reasons-to-avoid-iphone-3g">think twice before buying an iPhone</a> and picking up a FreeRunner instead.</p>
<p>Here&#8217;s a few pics of what the Neo looks like all boxed up..</p>
<table style="width:100%;border:none;">
<tr>
<td style="border:none;"><img style="border:1px solid #ccc;" src="http://qnot.files.wordpress.com/2008/07/neo-box.jpg?w=237&#038;h=300" alt="" title="neo-box" width="237" height="300" class="alignnone size-medium wp-image-137" /></td>
<td style="border:none;"><img style="border:1px solid #ccc;" src="http://qnot.files.wordpress.com/2008/07/neo-box2.jpg?w=300&#038;h=225" alt="" title="neo-box2" width="300" height="225" class="alignnone size-medium wp-image-138" /></td>
</tr>
</table>
<p>
The Neo came bundled with a USB cable, a nifty stylus + laser pen, AC adapter, battery, and a 512mb microSD card.</p>
<div style="text-align:center;">
<img style="border:1px solid #ccc;" src="http://qnot.files.wordpress.com/2008/07/neo-accessories.jpg?w=300&#038;h=225" alt="" title="neo-accessories" width="300" height="225" class="aligncenter size-medium wp-image-139" />
</div>
<p>
The <a href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_GTA02_Hardware">hardware specs</a> for the Neo (GTA02) are impressive, GSM, WiFi, Bluetooth, GPS. All that packed into a full blown Linux distro that fits in the palm of your hand.</p>
<div style="text-align:center;">
<img style="border:1px solid #ccc;" src="http://qnot.files.wordpress.com/2008/07/neo-hand.jpg?w=400&#038;h=300" alt="" title="neo-hand" width="400" height="300" class="aligncenter size-full wp-image-140" />
</div>
<div style="text-align:center;">
<img style="border:1px solid #ccc;" src="http://qnot.files.wordpress.com/2008/07/neo-back.jpg?w=400&#038;h=300" alt="" title="neo-back" width="400" height="300" class="aligncenter size-full wp-image-141" />
</div>
<p>I&#8217;ll be posting more about my experiences using the Neo as my daily phone. More to come..</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/qnot.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/qnot.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qnot.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qnot.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qnot.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qnot.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qnot.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qnot.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qnot.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qnot.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qnot.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qnot.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qnot.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qnot.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qnot.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qnot.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=23&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://left.subtree.org/2008/07/22/neo-freerunner-freedom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sigma110</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2008/07/neo-box.jpg?w=237" medium="image">
			<media:title type="html">neo-box</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2008/07/neo-box2.jpg?w=300" medium="image">
			<media:title type="html">neo-box2</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2008/07/neo-accessories.jpg?w=300" medium="image">
			<media:title type="html">neo-accessories</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2008/07/neo-hand.jpg" medium="image">
			<media:title type="html">neo-hand</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2008/07/neo-back.jpg" medium="image">
			<media:title type="html">neo-back</media:title>
		</media:content>
	</item>
		<item>
		<title>Database Design with Dia</title>
		<link>http://left.subtree.org/2007/12/05/database-design-with-dia/</link>
		<comments>http://left.subtree.org/2007/12/05/database-design-with-dia/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 05:23:48 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://left.subtree.org/2007/12/05/database-design-with-dia/</guid>
		<description><![CDATA[In this post I&#8217;m going to give a quick how-to on creating database schemas with a wonderful tool called Dia. I&#8217;ve often found having a nice visual representation of a database to be quite helpful but can&#8217;t stand keeping it up to date. As soon as you add a new column or change the design [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=14&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;m going to give a quick how-to on creating database schemas with a wonderful tool called <a href="http://live.gnome.org/Dia">Dia</a>. I&#8217;ve often found having a nice visual representation of a database to be quite helpful but can&#8217;t stand keeping it up to date. As soon as you add a new column or change the design around you end up having to sync your visual diagram with your SQL files. It&#8217;s tedious having to  manage the various SQL for building the database and this can be a larger pain when trying to support different database platforms each with their own SQL syntax. So before you create your next database read on and see how Dia can make your life a bit easier.</p>
<p><a href="http://live.gnome.org/Dia">Dia</a> is a program for creating diagrams and for this exercise we&#8217;ll be creating UML diagrams from within Dia. We&#8217;re also going to use a perl script called <a href="http://tedia2sql.tigris.org/">tedia2sql</a> which will transform our Dia files directly to SQL for our target database. What&#8217;s also nice about creating database schemas this way is that you can generate SQL for multiple target databases without the maintenance overhead.</p>
<p>First off, install a copy of Dia as well as tedia2sql. You can download tedia2sql <a href="http://tedia2sql.tigris.org/servlets/ProjectDocumentList">here</a> and download Dia <a href="http://live.gnome.org/Dia/Download">here</a>. I&#8217;m not going to cover the install in this post but there should be packages available for most Linux distro&#8217;s and if your not running Linux now is a great time to start!</p>
<p>Fire up Dia, create a new diagram and save it as &#8220;employee.dia&#8221;. Select the UML sheet from the drop down list. We&#8217;ll be using various UML objects to represent tables and definitions that make up our database. Here&#8217;s a quick overview of the main UML objects and their usage:</p>
<table style="width:100%;border:none;">
<tr>
<td style="border:none;"><img style="border:1px solid #ccc;" src="http://qnot.files.wordpress.com/2007/12/dia_menu.jpg?w=175&#038;h=242" alt="" title="dia_menu" width="175" height="242" class="aligncenter size-full wp-image-154" /></td>
<td style="border:none;">
<div style="margin-bottom:20px;">
   <img src="http://qnot.files.wordpress.com/2007/12/dia_class.png?w=35&#038;h=33" alt="" title="dia_class" width="35" height="33" class="size-full wp-image-155" style="float:left;padding:4px;" /> <span style="font-weight:bold;">Class</span> represents a table in the database. A Class has a name which corresponds to the name of the table and attributes which map to the columns of the table. Attributes in classes can have visibility (public, private, protected). Protected attributes are primary keys. More on classes later.
</div>
<div style="margin-bottom:20px;">
   <img src="http://qnot.files.wordpress.com/2007/12/dia_component.png?w=33&#038;h=33" alt="" title="dia_component" width="33" height="33" class="alignnone size-full wp-image-158" style="float:left;padding:4px;" /> <span style="font-weight:bold;">Component</span> is a special object that lets you define a list of default values to be inserted into a table. These are equivalent to hard coding &#8220;insert into ..&#8221; statements in your SQL files.
</div>
<div>
   <img src="http://qnot.files.wordpress.com/2007/12/dia_small_package.png?w=33&#038;h=33" alt="" title="dia_small_package" width="33" height="33" class="alignnone size-full wp-image-159" style="float:left;padding:4px;" /> <span style="font-weight:bold;">Small Package</span> represents a typemap. Typemaps are used for adding custom SQL types such as MySQL tinyint.
</div>
</td>
</tr>
</table>
<p>Now lets create our first table. Select the &#8220;Class&#8221; object icon from the UML sheet and click inside the diagram editor window. This will add the class to your diagram. Now right click on the new class and select &#8220;Show Properties&#8221;. This will bring up a rather large and complex property window for the UML class you&#8217;ve just created. We&#8217;re only going to customize a few properties outlined below.</p>
<p>First, under the &#8220;Class&#8221; tab enter the name of the table (employee) in the &#8220;Class Name: &#8221; field. Next click on the &#8220;Attributes&#8221; tab and enter in the columns of the table as attributes. In the &#8220;Name: &#8221; field enter in the column name. In the &#8220;Type: &#8221; field enter in the SQL type for the column. If you want to support multiple database platforms try to be generic here and only use ANSI SQL 1992 or else use a typemap. More on typemaps later. In the &#8220;Value: &#8221; field enter any default values for the column. For example, this is where you could add in &#8220;not null&#8221;. If the column your adding is a primary key then don&#8217;t put &#8220;not null&#8221; here and instead select &#8220;Protected&#8221; for the &#8220;Visibility: &#8221; field. Not null will automatically get added to all primary keys on output generation. The screen shot below is an example of the Class property editor window.</p>
<p><img src="http://qnot.files.wordpress.com/2007/12/dia_attributes.jpg?w=400&#038;h=494" alt="" title="dia_attributes" width="400" height="494" class="aligncenter size-full wp-image-161" style="border:1px solid #ccc;" /></p>
<p>Next, repeat the process for as many tables as you need in your database. For this example, create two tables &#8220;employee&#8221; and &#8220;department&#8221; with the columns as shown in the screenshot below (note the &#8216;#&#8217; in front of an attribute indicates that it&#8217;s visibility is &#8220;Protected&#8221; thus making it a Primary Key):</p>
<p><img src="http://qnot.files.wordpress.com/2007/12/dia_employee.jpg?w=600&#038;h=201" alt="" title="dia_employee" width="600" height="201" class="aligncenter size-full wp-image-162" style="border:1px solid #ccc;" /></p>
<p>This is a simple example of a database which stores employee data along with the department they belong to. Now suppose we have a default list of departments that we&#8217;d like to load into the department table when our database is created. To do this we&#8217;ll use the &#8220;Component&#8221; object from the UML sheet. Select the &#8220;Component&#8221; object and add it to your diagram editor window. Right click and select &#8220;Properties&#8221;.</p>
<p><img src="http://qnot.files.wordpress.com/2007/12/dia_comp_prop.jpg?w=316&#038;h=230" alt="" title="dia_comp_prop" width="316" height="230" class="aligncenter size-full wp-image-163" style="border:1px solid #ccc;" /></p>
<p>In the &#8220;Stereotype: &#8221; field you basically enter in the first part of an &#8220;insert into ..&#8221; SQL statement. For this example, to insert a default list of departments we&#8217;d normally write the following SQL:</p>
<pre class="brush: sql;">
insert into department (department_id, name) values (1, 'Marketing');
insert into department (department_id, name) values (2, 'Production');
insert into department (department_id, name) values (3, 'Design');
</pre>
<p>So in this case, for the &#8220;Stereotype: &#8221; field we&#8217;d enter in &#8220;department (department_id, name)&#8221;. Click OK to close the properties dialog. Now in the Component object box enter in the values you&#8217;d like to insert, one per line. Here&#8217;s what our diagram should look like now:</p>
<p><img src="http://qnot.files.wordpress.com/2007/12/dia_employee2.jpg?w=600&#038;h=226" alt="" title="dia_employee2" width="600" height="226" class="aligncenter size-full wp-image-164" style="border:1px solid #ccc;" /></p>
<p>Now lets add in a typemap. Typemaps are used for when you&#8217;d like to configure custom types which are specific to a database platform. A good example of this is MySQL auto_increment. This is a feature specific to MySQL and not supported in all databases. Lets suppose we&#8217;d like to have a primary key column which gets auto incremented upon each insert. But we also want to support both MySQL and Apache Derby without having to maintain separate SQL files. To achieve this we&#8217;ll create a custom typemap and define the specific SQL for each target db.</p>
<p>Typemaps are created using a Small Package so select the &#8220;Small Package&#8221; object and add it to your diagram editor window. Right click and select &#8220;Properties&#8221;.</p>
<p><img src="http://qnot.files.wordpress.com/2007/12/dia_type_prop.jpg?w=286&#038;h=230" alt="" title="dia_type_prop" width="286" height="230" class="aligncenter size-full wp-image-165" style="border:1px solid #ccc;" /></p>
<p>In the &#8220;Stereotype: &#8221; field you enter in the target database. So for example &#8220;mysql: typemap&#8221;.  For a list of supported target databases see tedia2sql &#8211;help. Some common ones are: postgres, mysql, sybase, oracle, db2, and innodb. Click OK to close the properties dialog. Now inside the Small package box you can enter custom types one per line. For this example we&#8217;ll create a custom type with a name of &#8220;identity&#8221;. This means that when we generate our SQL files, tedia2sql will replace the column type with our custom type. Here&#8217;s a few examples:</p>
<table style="width:100%;border:none;">
<tr>
<td style="border:none;">
MySQL typemaps</p>
<pre class="brush: plain; light: true; wrap-lines: false;">
identity: int unsigned auto_increment
bigid: bigint unsigned auto_increment
</pre>
</td>
<td style="border:none;">Apache Derby typemaps</p>
<pre class="brush: plain; light: true; wrap-lines: false;">
identity: int generated by default as identity
bigid: long generated by default as identity
</pre>
</td>
</tr>
</table>
<p>Repeat the process for Apache Derby using &#8220;db2: typemap&#8221;.  Now that we&#8217;ve defined our custom identity typemap we can change the employee_id column from type &#8220;int&#8221; to type &#8220;identity&#8221;. We can also do the same for our department table. Now these columns will be auto incrementing columns and depending on which target database we select on output the correct SQL will be generated. Our diagram should now look like this:</p>
<p><img src="http://qnot.files.wordpress.com/2007/12/dia_employee3.jpg?w=600&#038;h=276" alt="" title="dia_employee3" width="600" height="276" class="aligncenter size-full wp-image-166" style="border:1px solid #ccc;" /></p>
<p>At this point we have created our database schema and defined a default list of departments to be inserted. We also created a typemap called &#8220;identity&#8221; which defines auto incrementing columns for both MySQL and Apache derby. Now lets generate the SQL files to create the database using tedia2sql. Before we run tedia2sql we need to apply a small patch to the tedia2sql script. This fixes a very small formatting issue in tedia2sql related to the typemaps we created. Edit the tedia2sql script (/usr/bin/tedia2sql) and comment out the line inside the parseTypeMap(..) subroutine that looks like this:</p>
<pre class="brush: perl; highlight: [3]; light: true;">
$defStr =~ s/s//g; # ignore spaces
     -- change to --
#   $defStr =~ s/s//g; # ignore spaces
</pre>
<p>or just apply the patch I created <a href="http://www.qnot.org/code/tedia2sql-typemap-1.2.12.patch">here</a> (works for version 1.2.12):</p>
<pre class="brush: plain; light: true;">
$ patch /usr/bin/tedia2sql &amp;lt; tedia2sql-typemap-1.2.12.patch
</pre>
<p>Now we can generate the SQL files for our target databases:</p>
<pre class="brush: plain; light: true;">
$ tedia2sql -i employee.dia -o employee-mysql.sql -t mysql -d
$ tedia2sql -i employee.dia -o employee-derby.sql -t db2 -d
</pre>
<p>This will generate two SQL files for building the database in both MySQL and Apache derby. If you view these files you can see how tedia2sql handled our typemaps for the auto incrementing columns in each target database:</p>
<p>MySQL</p>
<pre class="brush: sql;">
-- employee
create table employee (
  employee_id                int unsigned auto_increment not null,
  department_id             int not null,
  first_name                varchar(255) not null,
  last_name                 varchar(255),
  start_date                date,
  constraint pk_Employee primary key (employee_id)
) ;
</pre>
<p>Apache Derby</p>
<pre class="brush: sql;">
-- employee
create table employee (
  employee_id                int generated by default as identity  not null,
  department_id             int not null,
  first_name                varchar(255) not null,
  last_name                 varchar(255),
  start_date                date,
  constraint pk_Employee primary key (employee_id)
) ;
</pre>
<p>You can download the files generated as well as the employee.dia file I used in this tutorial here:</p>
<ul>
<li><a href="http://www.qnot.org/code/employee.dia">employee.dia</a></li>
<li><a href="http://www.qnot.org/code/employee-mysql.sql">employee-mysql.sql</a></li>
<li><a href="http://www.qnot.org/code/employee-derby.sql">employee-derby.sql</a></li>
</ul>
<p>You can test the SQL files generated by tedia2sql and create the employee database as follows:</p>
<p>MySQL</p>
<pre class="brush: plain; light: true;">
$ mysql -u user -p dbname &amp;lt; employee-mysql.sql
</pre>
<p>Apache Derby</p>
<pre class="brush: plain; light: true;">
$ java -cp derby.jar:derbytools.jar \
       -Dderby.system.home=/path/to/dbroot \
       -Dij.protocol=jdbc:derby: \
       -Dij.database='employee;create=true'
    org.apache.derby.tools.ij employee-derby.sql
</pre>
<p>A quick Makefile will help out a lot in testing out your database schema:</p>
<pre class="brush: plain; light: true;">
all:
      tedia2sql -i employee.dia -o employee-mysql.sql -t mysql -d
      tedia2sql -i employee.dia -o employee-derby.sql -t db2 -d
clean:
      rm -f *.sql
</pre>
<p>I&#8217;ve found that for small to moderate size projects creating database schemas in Dia and using tedia2sql for SQL generation to be a lifesaver. You can also make use of Dia&#8217;s export feature to export your database schema to a number of different formats such as jpg, png, eps, tiff, etc. I really only scratched the surface of what can be done using these great tools. tedia2sql has support for lots of cool features like indexes, foreign key constraints, views and much more. For more information check out <a href="http://tedia2sql.tigris.org/usingtedia2sql.html">using tedia2sql</a>  and <a href="http://dia-installer.de/doc/en/index.html">Dia&#8217;s manual</a>.</p>
<p>Happy <span style="font-weight:bold;">Dia</span>gramming!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/qnot.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/qnot.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qnot.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qnot.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qnot.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qnot.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qnot.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qnot.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qnot.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qnot.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qnot.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qnot.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qnot.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qnot.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qnot.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qnot.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=14&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://left.subtree.org/2007/12/05/database-design-with-dia/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sigma110</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_menu.jpg" medium="image">
			<media:title type="html">dia_menu</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_class.png" medium="image">
			<media:title type="html">dia_class</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_component.png" medium="image">
			<media:title type="html">dia_component</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_small_package.png" medium="image">
			<media:title type="html">dia_small_package</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_attributes.jpg" medium="image">
			<media:title type="html">dia_attributes</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_employee.jpg" medium="image">
			<media:title type="html">dia_employee</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_comp_prop.jpg" medium="image">
			<media:title type="html">dia_comp_prop</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_employee2.jpg" medium="image">
			<media:title type="html">dia_employee2</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_type_prop.jpg" medium="image">
			<media:title type="html">dia_type_prop</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/12/dia_employee3.jpg" medium="image">
			<media:title type="html">dia_employee3</media:title>
		</media:content>
	</item>
		<item>
		<title>Xplanet view of Hurricane Dean</title>
		<link>http://left.subtree.org/2007/08/20/xplanet-view-of-hurricane-dean/</link>
		<comments>http://left.subtree.org/2007/08/20/xplanet-view-of-hurricane-dean/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 02:16:30 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://left.subtree.org/2007/08/20/xplanet-view-of-hurricane-dean/</guid>
		<description><![CDATA[I&#8217;m a big fan of Xplanet and every year during the hurricane season there&#8217;s no better way to liven up your desktop than to download the latest cloud maps and watch the path of the storm. Here&#8217;s a screenshot of my desktop showing hurricane dean (larger view): I cron a script to download the latest [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=21&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of <a href="http://xplanet.sourceforge.net/">Xplanet</a> and every year during the hurricane season there&#8217;s no better way to liven up your desktop than to download the latest <a href="http://xplanet.sourceforge.net/clouds.php">cloud maps</a> and watch the path of the storm. Here&#8217;s a screenshot of my desktop showing <a href="http://en.wikipedia.org/wiki/Hurricane_Dean_(2007)">hurricane dean</a> (<a href="http://qnot.files.wordpress.com/2007/08/dean_xplanet_large.jpg">larger view</a>):</p>
<p><a href="http://qnot.files.wordpress.com/2007/08/dean_xplanet_large.jpg"><img src="http://qnot.files.wordpress.com/2007/08/dean_xplanet_large.jpg?w=300&#038;h=196" alt="" title="dean_xplanet_large" width="300" height="196" class="aligncenter size-medium wp-image-168" /></a></p>
<p>I cron a script to download the latest cloud maps every 4 hours or so. The xplanet command I run is as follows:</p>
<pre class="brush: plain;">
xplanet -origin sun -north orbit \
        -config xplanet.conf -label \
        -marker_file brightStars \
        -target earth \
        -latitude 22 \
        -longitude -78 \
        -radius 30 \
        -labelpos +30+30
</pre>
<p>Here&#8217;s my xplanet.conf:</p>
<pre class="brush: plain;">
[earth]
cloud_map=clouds_2048.jpg
magnify=20

[moon]
magnify=20
</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/qnot.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/qnot.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qnot.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qnot.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qnot.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qnot.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qnot.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qnot.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qnot.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qnot.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qnot.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qnot.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qnot.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qnot.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qnot.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qnot.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=21&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://left.subtree.org/2007/08/20/xplanet-view-of-hurricane-dean/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sigma110</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/08/dean_xplanet_large.jpg?w=300" medium="image">
			<media:title type="html">dean_xplanet_large</media:title>
		</media:content>
	</item>
		<item>
		<title>Customizing Pidgin Chat Windows</title>
		<link>http://left.subtree.org/2007/07/06/customizing-pidgin-chat-windows/</link>
		<comments>http://left.subtree.org/2007/07/06/customizing-pidgin-chat-windows/#comments</comments>
		<pubDate>Sat, 07 Jul 2007 05:53:55 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://left.subtree.org/2007/07/06/customizing-pidgin-chat-windows/</guid>
		<description><![CDATA[In my previous post I discussed customizing Gaim chat windows. Since then Gaim has formally changed it&#8217;s name to Pidgin due to legal issues with AOL. I finally upgraded to Pidgin and had to do a few minor tweaks to get the same chat window customizations as before. I updated ~/.purple/gtkrc-2.0 which previously resided in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=19&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my <a href="/2007/01/14/customizing-gaim-chat-windows/">previous post</a> I discussed customizing Gaim chat windows. Since then Gaim has formally changed it&#8217;s name to <a href="http://pidgin.im/pidgin/home/">Pidgin</a> due to <a href="http://pidgin.im/~elb/cgi-bin/pyblosxom.cgi/going_public.html">legal issues with AOL</a>. I finally upgraded to Pidgin and had to do a few minor tweaks to get the same chat window customizations as before. I updated <code>~/.purple/gtkrc-2.0</code> which previously resided in <code>~/.gaim</code> and changed the widget names from <code>gaim_gtkconv_*</code> to <code>pidgin_conv_*</code>. Here&#8217;s my updated <code>~/.purple/gtkrc-2.0</code> file:</p>
<pre class="brush: plain;">
style &quot;pidgin-dark&quot; {
    base[NORMAL]=&quot;#000000&quot;
    text[NORMAL]=&quot;#00FF00&quot;
    GtkIMHtml::hyperlink-color=&quot;#007FFF&quot;
    GtkWidget::cursor-color=&quot;#60AFFE&quot;
    GtkWidget::secondary-cursor-color=&quot;#A4D3EE&quot;
}
widget &quot;*pidgin_conv_imhtml&quot; style &quot;pidgin-dark&quot;
widget &quot;*pidgin_conv_entry&quot; style &quot;pidgin-dark&quot;
</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/qnot.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/qnot.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qnot.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qnot.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qnot.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qnot.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qnot.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qnot.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qnot.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qnot.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qnot.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qnot.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qnot.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qnot.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qnot.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qnot.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=19&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://left.subtree.org/2007/07/06/customizing-pidgin-chat-windows/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sigma110</media:title>
		</media:content>
	</item>
		<item>
		<title>Customizing Gaim Chat Windows</title>
		<link>http://left.subtree.org/2007/01/14/customizing-gaim-chat-windows/</link>
		<comments>http://left.subtree.org/2007/01/14/customizing-gaim-chat-windows/#comments</comments>
		<pubDate>Sun, 14 Jan 2007 10:09:52 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://left.subtree.org/2007/01/14/customizing-gaim-chat-windows/</guid>
		<description><![CDATA[Gaim is an excellent instant messaging client with support for multiple protocols and runs on several different platforms. For the longest time I&#8217;ve wanted to customize the background color of my chat windows so they resemble my xterm settings of green text on a black background. There doesn&#8217;t seem to be an easy way to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=3&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://gaim.sf.net">Gaim</a> is an excellent instant messaging client with support for multiple protocols and runs on several different <a href="http://gaim.sourceforge.net/about.php">platforms</a>. For the longest time I&#8217;ve wanted to customize the background color of my chat windows so they resemble my xterm settings of green text on a black background. There doesn&#8217;t seem to be an easy way to do this via Gaim&#8217;s preferences and after a little digging I finally got it working.</p>
<p>The most recent version of Gaim uses <a href="http://www.gtk.org">GTK+ 2.0</a> and the background color for chat windows can be customized by adding some styles to your <code>~/.gaim/gtkrc-2.0</code> file. You can also customize key bindings, fonts, and other widgets in Gaim by tweaking this file but I&#8217;m just going to discuss the settings for the chat windows in this post. I&#8217;m no GTK+ guru but I found the <a href="http://www.gtk.org/tutorial/x2138.html">API docs</a> and this <a href="http://ometer.com/gtk-colors.html">mini-FAQ</a> helpful and gave a nice introduction to styles and themes in GTK+.</p>
<p>To customize the colors in your chat windows edit your <code>~/.gaim/gtkrc-2.0</code> file or create if it doesn&#8217;t exist and add the following lines:</p>
<pre class="brush: css;">
style &quot;gaim-dark&quot; {
    base[NORMAL]=&quot;#000000&quot;
    text[NORMAL]=&quot;#00FF00&quot;
    GtkIMHtml::hyperlink-color=&quot;#007FFF&quot;
    GtkWidget::cursor-color=&quot;#60AFFE&quot;
    GtkWidget::secondary-cursor-color=&quot;#A4D3EE&quot;
}
widget &quot;*gaim_gtkconv_imhtml&quot; style &quot;gaim-dark&quot;
widget &quot;*gaim_gtkconv_entry&quot; style &quot;gaim-dark&quot;
</pre>
<p><code>base[NORMAL]</code> sets the background color and <code>text[NORMAL]</code> sets the color of the text. You can tweak the colors to your liking restart Gaim and your chat windows should now be customized. I didn&#8217;t find a way to change the color of the screen names displayed in the chat window. Digging through the source code it looks like these colors are hardcoded  using <code>#define SEND_COLOR "#204a87"</code> and <code>#define RECV_COLOR "#cc0000"</code> around line number 86 inside the file <a href="https://svn.sourceforge.net/svnroot/gaim/trunk/gtk/gtkconv.c">./gtk/gtkconv.c</a> of the Gaim source. You could always try changing these values and re-compiling Gaim. I haven&#8217;t tested this but seems like it should work.  Here&#8217;s a screen shot of my customized chat window:</p>
<p><img src="http://qnot.files.wordpress.com/2007/01/gaim_green_black.jpg?w=450&#038;h=453" alt="" title="gaim_green_black" width="450" height="453" class="aligncenter size-full wp-image-203" style="border:1px solid #ccc;" /></p>
<p>There is also a plugin which comes with Gaim called <em>Gaim GTK+ Theme Control</em> which seems to provide a GUI interface for editing your <code>~/.gaim/gtkrc-2.0</code> file but I didn&#8217;t see any options for customizing the chat windows. In the Gaim FAQ there is also a link to a <a href="http://gaim.sourceforge.net/gtkrc-2.0">sample gtkrc-2.0</a> which gives some good examples of other customizations.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/qnot.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/qnot.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qnot.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qnot.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qnot.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qnot.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qnot.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qnot.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qnot.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qnot.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qnot.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qnot.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qnot.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qnot.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qnot.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qnot.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=left.subtree.org&amp;blog=13566420&amp;post=3&amp;subd=qnot&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://left.subtree.org/2007/01/14/customizing-gaim-chat-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sigma110</media:title>
		</media:content>

		<media:content url="http://qnot.files.wordpress.com/2007/01/gaim_green_black.jpg" medium="image">
			<media:title type="html">gaim_green_black</media:title>
		</media:content>
	</item>
	</channel>
</rss>