<?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>JADDOG &#187; Planet Fedora</title>
	<atom:link href="http://www.jaddog.org/category/planet-fedora/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jaddog.org</link>
	<description>Just Another Day Depending On Grace</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:18:45 +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>MacVTap Bridge on F16</title>
		<link>http://www.jaddog.org/2012/02/01/macvtap-bridge-on-f16/</link>
		<comments>http://www.jaddog.org/2012/02/01/macvtap-bridge-on-f16/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 19:18:45 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Planet Fedora]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=563</guid>
		<description><![CDATA[I setup a couple VMs over the past day or two on my desktop machine I recently built. Had to use this MacVTap thing and I really like it. To do this I used virt-manager in Fedora 16. Initially virt manager didn&#8217;t give me an option to bridge the network interfaces, it was greyed out. I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>I setup a couple VMs over the past day or two on my desktop machine I recently built. Had to use this MacVTap thing and I really like it.</p>
<p>To do this I used virt-manager in Fedora 16. Initially virt manager didn&#8217;t give me an option to bridge the network interfaces, it was greyed out. I wanted to be able to ssh into these VMs inside my home network without having to go through the virt host. Turns out there&#8217;s an option to customize settings in the details panel just before you start the installation. Select it and bring up the VM&#8217;s detail panel to take advantage of MacVTap.<a href="http://www.jaddog.org/wp-content/uploads/2012/02/Screenshot-at-2012-02-01-141040.png"><img class="alignnone  wp-image-564" title="Screenshot at 2012-02-01 14:10:40" src="http://www.jaddog.org/wp-content/uploads/2012/02/Screenshot-at-2012-02-01-141040.png" alt="" width="281" height="268" /></a></p>
<p>When the details panel comes up you can monkey with the networking of course. I selected the macvtap that my bare metal uses and set it to bridge mode.<a href="http://www.jaddog.org/wp-content/uploads/2012/02/Screenshot-at-2012-02-01-141207.png"><img class="alignnone  wp-image-565" title="Screenshot at 2012-02-01 14:12:07" src="http://www.jaddog.org/wp-content/uploads/2012/02/Screenshot-at-2012-02-01-141207.png" alt="" width="487" height="430" /></a></p>
<p>Using this method both VM&#8217;s got a dhcp address from my home router and are able to talk to each other now.</p>
<p>Word of warning, don&#8217;t use VEPA mode. It&#8217;s something special that most router&#8217;s don&#8217;t haveyet that, from what I can gather, let&#8217;s the swtich do the bridging instead of the virt host.</p>
<p>Learned about this stuff here: <a href="http://virt.kernelnewbies.org/MacVTap">http://virt.kernelnewbies.org/MacVTap</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2012/02/01/macvtap-bridge-on-f16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Audrey Multi-instance Deployment Demo</title>
		<link>http://www.jaddog.org/2012/01/13/audrey-multi-instance-demo/</link>
		<comments>http://www.jaddog.org/2012/01/13/audrey-multi-instance-demo/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 19:02:12 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Just Another Day]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=555</guid>
		<description><![CDATA[A screencast I created  has landed on youtube. It demonstrates using audrey to launch a multi-instance deployment in EC2 using the Aeolus Project. More info at https://www.aeolusproject.org/ https://www.aeolusproject.org/audrey.html]]></description>
			<content:encoded><![CDATA[<p>A screencast I created  has landed on youtube. It demonstrates using audrey to launch a multi-instance deployment in EC2 using the Aeolus Project.</p>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/mRlguptneCU?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>More info at<br />
<a title="Aeolus Project" href="https://www.aeolusproject.org/">https://www.aeolusproject.org/<br />
</a><a title="Audrey!" href="https://www.aeolusproject.org/audrey.html">https://www.aeolusproject.org/audrey.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2012/01/13/audrey-multi-instance-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>coverage.py</title>
		<link>http://www.jaddog.org/2011/10/25/coverage-py/</link>
		<comments>http://www.jaddog.org/2011/10/25/coverage-py/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 21:15:27 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Just Another Day]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=543</guid>
		<description><![CDATA[I was working on updating some unit tests today at work and was wondering if there was a way to measure the unit test coverage on a set of code. A single google search returned the ability for you to tell the exact test coverage your unit tests achieve and the exact lines of code [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on updating some unit tests today at work and was wondering if there was a way to measure the unit test coverage on a set of code. A single google search returned the ability for you to tell the exact test coverage your unit tests achieve and the exact lines of code that are not included in your coverage.</p>
<p>Enter coverage.py: http://nedbatchelder.com/code/coverage/</p>
<p>I&#8217;m on fedora so <em>$ yum install python-coverage</em> installed it for me.<br />
To get the details suggested above you need only run two commands.</p>
<blockquote><p>~/git/audrey git:(oauth*)➤ coverage run audrey_start/test_audrey_startup.py<br />
&#8230;&#8230;&#8230;&#8230;&#8230;<br />
Ran 15 tests in 2.601s</p>
<p>OK</p></blockquote>
<p>The <em>coverage run</em> command executes your code just as if you had executed it without coverage.py, but has generated data about the code it&#8217;s executing as it&#8217;s running. You can see here I&#8217;ve executed this code&#8217;s unit test script. Next you display the report data:</p>
<blockquote><p>~/git/audrey git:(oauth*)➤ coverage report audrey_start/*.py<br />
Name                               Stmts   Miss  Cover<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
audrey_start/audrey_startup          472    270    43%<br />
audrey_start/test_audrey_startup     217     19    91%<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
TOTAL                                689    289    58%</p>
<p>~/git/audrey git:(oauth*)➤ coverage report -m audrey_start/*.py<br />
Name                               Stmts   Miss  Cover   Missing<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
audrey_start/audrey_startup          472    270    43%   126-132, 186-216, 237, 241-243, 247, 288, 352, 379, 382, 388, 414, 456, 544, 558-559, 585-601, 609, 630, 640, 654-689, 700-730, 739, 747, 774-794, 837-847, 854-857, 907-936, 955-957, 975-1125, 1139, 1151, 1190-1195, 1203-1229, 1264-1340, 1344<br />
audrey_start/test_audrey_startup     217     19    91%   65, 130, 384, 420-428, 505-526<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
TOTAL                                689    289    58%</p></blockquote>
<p>The <em>coverage report</em> command will give you the percentages missing for each script. The <em>coverage report -m</em> command will give you the exact lines missing from the unit test coverage. I checked a few of these lines that it reported, a quick check seems to indicate these are all actual lines of code that were not executed during the unit test run. Pretty useful data for measuring the effectiveness of your unit tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2011/10/25/coverage-py/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dvorak + Kinesis</title>
		<link>http://www.jaddog.org/2011/09/09/dvorak-kinesis/</link>
		<comments>http://www.jaddog.org/2011/09/09/dvorak-kinesis/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 17:57:21 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[I'm a Geek]]></category>
		<category><![CDATA[Planet Fedora]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=524</guid>
		<description><![CDATA[I passed a milestone in my Dvorak endeavor yesterday. I had some one looking over my shoulder at what I was doing while I was typing in Dvorak&#8230; on a contoured keyboard. Work bought me a Kinesis Advantage keyboard in May. (Manufacturer&#8217;s Page) These are hard enough to get used to in a qwerty layout. It has a native Dvorak [...]]]></description>
			<content:encoded><![CDATA[<p>I passed a milestone in my Dvorak endeavor yesterday. I had some one looking over my shoulder at what I was doing while I was typing in Dvorak&#8230; on a contoured keyboard.</p>
<p>Work bought me a <a title="Amazon.com" href="http://www.amazon.com/Kinesis-Advantage-USB-Keyboard-black/dp/B000LVJ9W8/ref=sr_1_1?ie=UTF8&amp;qid=1315583811&amp;sr=8-1">Kinesis Advantage keyboard</a> in May. (<a title="Kinesis Ergo" href="http://www.kinesis-ergo.com/">Manufacturer&#8217;s Page</a>) These are hard enough to get used to in a qwerty layout. It has a native Dvorak mode on it so I made the Kinesis my Dvorak keyboard and the keyboard I was using my qwerty. I had been using both since May. Unplugged the qwerty keyboard the first of September.</p>
<p>This pic is from before I unplugged the qwerty keyboard:<br />
<a href="http://www.jaddog.org/wp-content/uploads/2011/09/IMG_1858.jpg"><img class="alignnone size-large wp-image-525" title="Dvorak + Kinesis" src="http://www.jaddog.org/wp-content/uploads/2011/09/IMG_1858-1024x764.jpg" alt="" width="614" height="458" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2011/09/09/dvorak-kinesis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenShift + Django + MySQL</title>
		<link>http://www.jaddog.org/2011/08/17/openshift-django-mysql/</link>
		<comments>http://www.jaddog.org/2011/08/17/openshift-django-mysql/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 21:06:23 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=484</guid>
		<description><![CDATA[I&#8217;ve spent the past 3 years developing two django projects. Nushus: https://fedorahosted.org/nushus Loki: https://fedorahosted.org/loki When Red Hat released openshift I was interested to deploy django on it. I use MySQL with my django apps, mainly because that&#8217;s what I know well. The tutorial I was working through used sqlite so I&#8217;ve put this together to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the past 3 years developing two <a title="The Django Project" href="https://www.djangoproject.com/">django</a> projects.<br />
Nushus: <a title="Nushus" href="https://fedorahosted.org/nushus">https://fedorahosted.org/nushus</a><br />
Loki: <a title="Loki" href="https://fedorahosted.org/loki">https://fedorahosted.org/loki</a></p>
<p>When Red Hat released openshift I was interested to deploy django on it. I use MySQL with my django apps, mainly because that&#8217;s what I know well. The tutorial I was working through used sqlite so I&#8217;ve put this together to show how I got MySQL working with django on openshift.</p>
<p>Run this quick start to get your account and domain setup<br />
<a title="OpenShift Express Quickstart" href="https://openshift.redhat.com/app/express#quickstart"> https://openshift.redhat.com/app/express#quickstart</a><br />
Then login to the website and open this turoial:<br />
<a title="Django on OpenShift Tutorial" href="https://www.redhat.com/openshift/kb/kb-e1010-show-me-your-django-getting-django-up-and-running-in-5-minutes"> https://www.redhat.com/openshift/kb/kb-e1010-show-me-your-django-getting-django-up-and-running-in-5-minutes</a><br />
Run the &#8216;Deploying a Django Application&#8217; section of this tutorial to get a basic django app setup and running. Then you&#8217;ll have Django setup but with no admin:<br />
<a href="http://www.jaddog.org/wp-content/uploads/2011/08/Screenshot.png"><img class="alignnone size-large wp-image-487" title="Screenshot" src="http://www.jaddog.org/wp-content/uploads/2011/08/Screenshot-1024x272.png" alt="" width="819" height="218" /></a></p>
<p>After you get here, continue the tutorial related to the usual code edits needed in your django project to enable the admin. Don&#8217;t setup the sqlite database as the tutorial suggests, we&#8217;ll get connected to MySQL next.<br />
Next lets setup the database:</p>
<blockquote>
<pre>testapp git:(master)➤ rhc-ctl-app -e add-mysql-5.1 -a testapp
Password:
Contacting https://openshift.redhat.com
Contacting https://openshift.redhat.com

RESULT:

Mysql 5.1 database added.  Please make note of these credentials:

   Root User: SuperSecretUser
   Root Password: SuperSecretPassword

Connection URL: mysql://127.XXX.XXX.XXXX:3306/</pre>
</blockquote>
<p>This will create the MySQL instance but not the database.<br />
This forum post suggests the current method to get the database setup: <a title="Thread: mysql DB name?" href="https://www.redhat.com/openshift/forums/express/mysql-db-name">https://www.redhat.com/openshift/forums/express/mysql-db-name</a><br />
We need to also run syncdb, which the django tuorial shows us how to do. It also shows us how to deploy the admin media. I don&#8217;t like how the django tutorial makes us commit static code that&#8217;s already deployed. Let&#8217;s copy it remotely from the egg that&#8217;s already deployed into the remote static dir without commiting it. All this is done via the openshift build hook. I&#8217;ve rewritten it a bit in process of testing things so it will look a bit different than the tutorials:</p>
<blockquote>
<pre>testapp git:(master)➤ cat .openshift/action_hooks/build
#!/bin/bash
# This is a simple build script, place your post-deploy but pre-start commands
# in this script.  This script gets executed directly, so it could be python,
# php, ruby, etc.

# create the database if it doesn't exist
# https://www.redhat.com/openshift/forums/express/mysql-db-name
if ! /usr/bin/mysql -u "$OPENSHIFT_DB_USERNAME" --password="$OPENSHIFT_DB_PASSWORD" -h "$OPENSHIFT_DB_HOST" -e "show tables;" $OPENSHIFT_APP_NAME &gt; /dev/null
then
    /usr/bin/mysqladmin -u "$OPENSHIFT_DB_USERNAME" --password="$OPENSHIFT_DB_PASSWORD" -h "$OPENSHIFT_DB_HOST" create "$OPENSHIFT_APP_NAME"
    echo "Created MySQL database $OPENSHIFT_APP_NAME"
fi

# copy the admin media into place
if [ ! -d "$DIRECTORY" ]; then
    if mkdir $OPENSHIFT_REPO_DIR/wsgi/static/admin
    then
        echo "Created directory $OPENSHIFT_REPO_DIR/wsgi/static/admin"
        echo "Copying admin media into $OPENSHIFT_REPO_DIR/wsgi/static/admin"
        cp -R $OPENSHIFT_APP_DIR/virtenv/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/contrib/admin/media/** $OPENSHIFT_REPO_DIR/wsgi/static/admin
    fi
fi

# cd into the project to run django manage.py commands
cd $OPENSHIFT_REPO_DIR/wsgi/testapp

# run syncdb
# https://www.redhat.com/openshift/kb/kb-e1010-show-me-your-django-getting-django-up-and-running-in-5-minutes
echo "Executing './manage.py syncdb --noinput'"
./manage.py syncdb --noinput</pre>
</blockquote>
<p>This gets us to the login page for the admin: <a href="http://www.jaddog.org/wp-content/uploads/2011/08/Screenshot-1.png"><img class="alignnone size-large wp-image-491" title="Screenshot-1" src="http://www.jaddog.org/wp-content/uploads/2011/08/Screenshot-1-1024x364.png" alt="" width="819" height="291" /></a></p>
<p>Now all that&#8217;s missing is a user. I toyed with a couple options to get a basic user in. The command line manage.py won&#8217;t let you pass a password and I had trouble getting fixtures to load. Though, both of those required sql to verify if the user existed. Settled on a simple management command to make sure we have a user. We have to put it in an app, but we&#8217;re going to need an app eventually anyways to make django so more than start. So here&#8217;s what I did.<br />
In the project directory run the django startapp command:</p>
<blockquote>
<pre>testapp/wsgi/testapp git:(master+)➤ ../manage.py startapp myapp</pre>
</blockquote>
<p>Then add it to the INSTALLED_APPS in your settings file</p>
<blockquote>
<pre>+     'testapp.myapp',</pre>
</blockquote>
<p>You have to put the projects name in there, otherwise things won&#8217;t work later. I got 500&#8242;s trying just to put just &#8216;myapp&#8217; in the installed apps. This app won&#8217;t really do anything for now. It&#8217;s just a container for our management command. You can make it into something else later. Next create the directory structure for the command in the myapp directory.</p>
<blockquote>
<pre>testapp/wsgi/testapp git:(master+)➤ mkdir -p myapp/management/commands
testapp/wsgi/testapp git:(master+)➤ touch myapp/management/__init__.py myapp/management/commands/__init__.py
testapp/wsgi/testapp git:(master+)➤ vim myapp/management/commands/ensuresuperuser.py
testapp/wsgi/testapp git:(master+)➤ tree myapp
myapp
|-- __init__.py
|-- management
|   |-- commands
|   |   |-- ensuresuperuser.py
|   |   `-- __init__.py
|   `-- __init__.py
|-- models.py
|-- tests.py
`-- views.py

2 directories, 7 files</pre>
</blockquote>
<p>You can see I called my command ensuresuperuser. The command will check if the user exists and create it with a password equal to the user&#8217;s username if the user doesn&#8217;t exist. Here&#8217;s it&#8217;s code:</p>
<blockquote>
<pre>testapp/wsgi/testapp git:(master+)➤ cat myapp/management/commands/ensuresuperuser.py
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User

class Command(BaseCommand):
    args = 'username'
    help = 'make sure a user exists with a password'

    def handle(self, *args, **options):
        try:
            user = User.objects.get(username=args[0])
        except:
            User.objects.create_superuser(args[0], email=args[0]+'@example.com', password=args[0])
            self.stdout.write('user %s created with password %s\n' % (args[0], args[0]))</pre>
</blockquote>
<p>Last thing to do is to add this command to your build hook so it executes when you push your code, so update your build hook. Here&#8217;s the whole contents of mine:</p>
<blockquote>
<pre>testapp git:(master+)➤ cat .openshift/action_hooks/build
#!/bin/bash
# This is a simple build script, place your post-deploy but pre-start commands
# in this script.  This script gets executed directly, so it could be python,
# php, ruby, etc.

# create the database if it doesn't exist
# https://www.redhat.com/openshift/forums/express/mysql-db-name
if ! /usr/bin/mysql -u "$OPENSHIFT_DB_USERNAME" --password="$OPENSHIFT_DB_PASSWORD" -h "$OPENSHIFT_DB_HOST" -e "show tables;" $OPENSHIFT_APP_NAME &gt; /dev/null
then
    /usr/bin/mysqladmin -u "$OPENSHIFT_DB_USERNAME" --password="$OPENSHIFT_DB_PASSWORD" -h "$OPENSHIFT_DB_HOST" create "$OPENSHIFT_APP_NAME"
    echo "Created MySQL database $OPENSHIFT_APP_NAME"
fi

# copy the admin media into place
if [ ! -d "$DIRECTORY" ]; then
    if mkdir $OPENSHIFT_REPO_DIR/wsgi/static/admin
    then
        echo "Created directory $OPENSHIFT_REPO_DIR/wsgi/static/admin"
        echo "Copying admin media into $OPENSHIFT_REPO_DIR/wsgi/static/admin"
        cp -R $OPENSHIFT_APP_DIR/virtenv/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/contrib/admin/media/** $OPENSHIFT_REPO_DIR/wsgi/static/admin
    fi
fi

# cd into the project to run django manage.py commands
cd $OPENSHIFT_REPO_DIR/wsgi/testapp

# run syncdb
# https://www.redhat.com/openshift/kb/kb-e1010-show-me-your-django-getting-django-up-and-running-in-5-minutes
echo "Executing './manage.py syncdb --noinput'"
./manage.py syncdb --noinput

# add an admin user
./manage.py ensuresuperuser admin</pre>
</blockquote>
<p>This time when you commit and push everything you will see it tell you &#8220;user admin created with password admin&#8221;. Obviously this is really insecure so go ahead and change that password right away. Wouldn&#8217;t want your throw away testapp become something it wasn&#8217;t intended for.<br />
<a href="http://www.jaddog.org/wp-content/uploads/2011/08/Screenshot-2.png"><img class="alignnone size-large wp-image-492" title="Screenshot-2" src="http://www.jaddog.org/wp-content/uploads/2011/08/Screenshot-2-1024x305.png" alt="" width="819" height="244" /></a></p>
<p>There you have it, OpenShift + Django + MySQL.<br />
It&#8217;s worth noting, If you get a 500 error you need to use the rhc-snapshot command like so:</p>
<p>testapp git:(master+)➤ rhc-snapshot -a testapp<br />
Password:<br />
Contacting https://openshift.redhat.com<br />
Pulling down a snapshot to testapp.tar.gz</p>
<p>This pulls down a tar ball of your running environment and has a logs directory in there that you can look at the apache logs. I&#8217;ll second <a title="rhc-logwatch pls" href="http://blog.ianweller.org/2011/05/12/openshift-express-first-thoughts/">Ian&#8217;s suggestion for a rhc-logwatch command</a>. That would be pretty handy.</p>
<p>Next steps for me:<br />
1. How to delete an OpenShift application (i.e. throw away testapp, I&#8217;m done with it)<br />
2. Install <a title="Nushus" href="https://fedorahosted.org/nushus">Nushus</a> in OpenShift!</p>
<p>*** Update ***<br />
I came across another blog post a day later that reference rhc-tail-files. i.e. the watchlog thing I mentioned above is already a feature:</p>
<blockquote>
<pre>testapp git:(master+)➤ rhc-tail-files -a testapp
Password:
Contacting https://openshift.redhat.com
Attempting to tail files: testapp/logs/*
Use ctl + c to stop

==&gt; testapp/logs/access_log-20110817-000000-EST &lt;==
... snip log files output ...
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2011/08/17/openshift-django-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnome 3 two months later</title>
		<link>http://www.jaddog.org/2011/06/27/gnome-3-two-months-later/</link>
		<comments>http://www.jaddog.org/2011/06/27/gnome-3-two-months-later/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 14:24:50 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Planet Fedora]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=471</guid>
		<description><![CDATA[I&#8217;ve been using Fedora 15 and Gnome 3 for a little over  2 months now. I&#8217;ve learned a few things that have made my daily workflow a little easier, thought I&#8217;d share. 1. the alt key switches the Suspend menu item to &#8220;Power Off&#8221; I infrequently need it, but the alternative was to logout and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Fedora 15 and Gnome 3 for a little over  2 months now. I&#8217;ve learned a few things that have made my daily workflow a little easier, thought I&#8217;d share.</p>
<p>1. the alt key switches the Suspend menu item to &#8220;Power Off&#8221;<br />
I infrequently need it, but the alternative was to logout and power off from the login screen or to add a gnome-shell-extension.</p>
<p>2. gnome-tweak-tool<br />
There&#8217;s a couple settings in there that I was glad to be able to tweak</p>
<p>3. Drag to top of the screen to maximize.<br />
I keep a couple things maximized, It&#8217;s nice to just drag the window to the top of the screen and have it maximize.</p>
<p>4. gsettings<br />
I haven&#8217;t had too much need for this yet, but understanding it is relevant to writing extensions.</p>
<p>5. gnome-shell-extensions-dock<br />
yum install gnome-shell-extensions-dock<br />
gsettings set org.gnome.shell.extensions.dock position left<br />
alt-f2<br />
r<br />
enter</p>
<p>6. wrote a gnome-shell-extension</p>
<p>Part of my team at work is in Pune, India and our company also pass lots of times around in utc. The Fedora 14 Clock applet that listed what time it was in other timezones was helpful. So I set out last week to put something together in gnome 3 that would serve the same purpose.</p>
<p>In the process I also found some code to add apps to the top panel and decided to post the little bit of code I put together here: https://github.com/radez/gnome-shell-extensions</p>
<p>Here&#8217;s what my &#8220;clocks&#8221; extension looks like. It&#8217;s not much but it suits my needs. I need to plug into gsettings as some point so that Pune and UTC arn&#8217;t hard coded.</p>
<p><a href="http://www.jaddog.org/wp-content/uploads/2011/06/Screenshot-1.png"><img class="alignnone size-full wp-image-474" title="gnome-shell-extensions-clocks" src="http://www.jaddog.org/wp-content/uploads/2011/06/Screenshot-1.png" alt="" width="408" height="398" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2011/06/27/gnome-3-two-months-later/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnome 3 on Fedora 15</title>
		<link>http://www.jaddog.org/2011/04/09/gnome-3-on-fedora-15/</link>
		<comments>http://www.jaddog.org/2011/04/09/gnome-3-on-fedora-15/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 01:50:36 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Planet Fedora]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=453</guid>
		<description><![CDATA[Went ahead an updated to Fedora 15 this evening. Though Gnome 3 will take some time to get used to, I think I&#8217;ll like it over time.]]></description>
			<content:encoded><![CDATA[<p>Went ahead an updated to Fedora 15 this evening.<br />
Though Gnome 3 will take some time to get used to, I think I&#8217;ll like it over time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2011/04/09/gnome-3-on-fedora-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nushus 0.12.7</title>
		<link>http://www.jaddog.org/2011/02/25/nushus-0-12-7/</link>
		<comments>http://www.jaddog.org/2011/02/25/nushus-0-12-7/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 16:49:10 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=441</guid>
		<description><![CDATA[New version of nushus is available for download. Couple bug fixes and a couple small features. New cli plugin added as part of the standard distribution. https://fedorahosted.org/nushus Release Notes: https://fedorahosted.org/nushus/wiki/Release]]></description>
			<content:encoded><![CDATA[<p><img title="Nushus" src="https://fedorahosted.org/nushus/attachment/wiki/logo/logo-black-name.gif?format=raw" alt="" width="200" height="50" /><br />
New version of nushus is available for download.<br />
Couple bug fixes and a couple small features.<br />
New cli plugin added as part of the standard distribution.</p>
<p><a title="Nushus" href="https://fedorahosted.org/nushus">https://fedorahosted.org/nushus</a><br />
Release Notes: <a title="Nushus Release Notes" href="https://fedorahosted.org/nushus/wiki/Release">https://fedorahosted.org/nushus/wiki/Release</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2011/02/25/nushus-0-12-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loki 0.10.1</title>
		<link>http://www.jaddog.org/2010/12/02/loki-0-10-1/</link>
		<comments>http://www.jaddog.org/2010/12/02/loki-0-10-1/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 19:06:19 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=411</guid>
		<description><![CDATA[Loki 0.10.1 https://fedorahosted.org/loki Just put a tarball out on the loki downloads page: https://fedorahosted.org/released/loki/ Check out the change log here: https://fedorahosted.org/loki/wiki/ChangeLog]]></description>
			<content:encoded><![CDATA[<p>Loki 0.10.1<br />
<a title="Loki" href="https://fedorahosted.org/loki">https://fedorahosted.org/loki</a></p>
<p>Just put a tarball out on the loki downloads page: <a title="Download Loki" href="https://fedorahosted.org/released/loki/">https://fedorahosted.org/released/loki/</a></p>
<p>Check out the change log here: <a title="Loki Change Log" href="https://fedorahosted.org/loki/wiki/ChangeLog">https://fedorahosted.org/loki/wiki/ChangeLog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2010/12/02/loki-0-10-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice Python Cheat Sheet</title>
		<link>http://www.jaddog.org/2010/11/24/nice-python-cheat-sheet/</link>
		<comments>http://www.jaddog.org/2010/11/24/nice-python-cheat-sheet/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 14:34:07 +0000</pubDate>
		<dc:creator>radez</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://www.jaddog.org/?p=404</guid>
		<description><![CDATA[I&#8217;m currently working on consuming some of the yum-utils package on Fedora/RHEL to add a repo &#8220;mirror&#8221; sort of functionality to nushus. One of the files in the package is /usr/bin/repodiff which defines a class that has some functionality that would be super helpful to not have to rewrite. Problem is that you can&#8217;t do [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on consuming some of the yum-utils package on Fedora/RHEL to add a repo &#8220;mirror&#8221; sort of functionality to <a title="Nushus" href="http://fedorahosted.org/nushus">nushus</a>. One of the files in the package is /usr/bin/repodiff which defines a class that has some functionality that would be super helpful to not have to rewrite. Problem is that you can&#8217;t do a straight import on that file because it doesn&#8217;t have a .py extension. A little googling for variants of &#8220;python import non .py&#8221; had a couple different ways to do the import. Best answer I&#8217;ve found that provides access to the class was found on a little cheat sheet. Just wanted to post a link and a copy, it has some good information for those new to python and a few little gems of &#8220;things you don&#8217;t do all the time&#8221;.</p>
<p>the link on google went directly to the pdf: <a title="All I ever needed to know about python scripting" href="http://www.socallinuxexpo.org/scale7x/sites/scale7x.socallinuxexpo.org/files/matt-harrison-pyhandout.pdf">All I ever needed to know about python scripting</a><br />
Here&#8217;s my copy of it: <a href="http://www.jaddog.org/wp-content/uploads/2010/11/matt-harrison-pyhandout.pdf">All I ever needed to know about python scripting</a></p>
<p>Answer to my question is on page one of the pdf:</p>
<blockquote><p>&gt;&gt;&gt; from types import ModuleType<br />
&gt;&gt;&gt; my_script = ModuleType(&#8216;my_script&#8217;)<br />
&gt;&gt;&gt; exec open(&#8216;bin/my_script&#8217;) in my_script.__dict__<br />
&gt;&gt;&gt; my_script.main(['-t', 'bar'])</p></blockquote>
<p>Thanks Matt Harrison! (no idea who you are, but thanks!)<br />
Maybe I&#8217;ll email him now <img src='http://www.jaddog.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In case anyone is looking to learn python, here&#8217;s the resource I learned on: <a title="Dive into Python" href="http://diveintopython.org/">Dive into Python</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaddog.org/2010/11/24/nice-python-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

