<?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>Deadlypenguin &#187; Computers</title>
	<atom:link href="http://blog.deadlypenguin.com/blog/category/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.deadlypenguin.com/blog</link>
	<description>My notes and rants about tech things</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:58:57 +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>Creating Web-services in Salesforce</title>
		<link>http://blog.deadlypenguin.com/blog/2012/01/06/creating-web-services-in-salesforce/</link>
		<comments>http://blog.deadlypenguin.com/blog/2012/01/06/creating-web-services-in-salesforce/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 21:47:50 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[developement]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[apex]]></category>
		<category><![CDATA[web-service]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=144</guid>
		<description><![CDATA[Preface At my current job, we have several external systems that interact with Salesforce, and they do so through web-services. This document will cover what I have learned in regards to web-services, caveats with them and common pitfalls. Overview The goal &#8230; <a href="http://blog.deadlypenguin.com/blog/2012/01/06/creating-web-services-in-salesforce/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h1 id="Preface">Preface</h1>
<p>At my current job, we have several external systems that interact with Salesforce, and they do so through web-services. This document will cover what I have learned in regards to web-services, caveats with them and common pitfalls.</p>
<h1 id="Overview">Overview</h1>
<p>The goal of our web-services is to provide a single point of entry for each <em>major</em> object represented in Salesforce.  A <em>major</em> object would be Account, Case, Case Comment etc.  The reason this is differentiated is that for instance, Case Groups would under the AccountAPI since they are a <em>minor</em> object.  Each web-service consists of two parts.  First the actual <strong>web-service class</strong> which holds the exterally facing methods and from which the WSDL is generated.  The second part is that of the <strong>util class</strong> which holds all of the logic and is reusable.</p>
<h2 id="Webservice_class">Web-service class</h2>
<h3 id="APIUtils">APIUtils</h3>
<p>This class contains several static variables, exceptions and most importantly the classes that are returned from the web-service</p>
<h4 id="Static_Variables">Static Variables</h4>
<p>The static variables listed here are used to set the returnCode in the resulting return class.  This helps to keep return codes consistent with what is expected by the calling app</p>
<h4 id="Exceptions">Exceptions</h4>
<p>There are two types of base exceptions in APIUtils</p>
<h5 id="InvalidException">InvalidException</h5>
<p>This is used for things that are passed into the web-service that are considered invalid.  For example an invalid username passed in, or if the account does not match the requesting contact.</p>
<h5 id="UnknownException">UnknownException</h5>
<p>This is used when the requested object cannot be found.  For example if the case 123456 was requested and was not found then this would be a<em>UnknownCaseException</em></p>
<h4 id="Generic_Contexts">Generic Contexts</h4>
<p>For most web-services, they will contain their own Context classes.  But there are some context classes that are common and reusable.  The primary one being the ContactContext.  The ContactContext is often passed into the method to determine access level.</p>
<h4 id="Returned_Classes">Returned Classes</h4>
<p>These are abstraction classes usually representative of a Salesforce object.</p>
<ul>
<li>Each field to be returned must be of type WebService</li>
<li>Each class should have Integer returnCode and String message to be passed back to the caller.</li>
<li>If the method is to return a List&lt;Object&gt; a wrapper class of APIObjects should contain returnCode, message and a List of Objects.  [Example below]</li>
<li>Each class should have a constructor to aid in creation.  This will save time in the long run and will make writing tests 1000 times easier</li>
</ul>
<p><em>Note:</em> You could probably throw exceptions out to the calling service instead of setting a returnCode.  I think that setting the returnCode instead of throwing an exception makes it easier for integration since the integrator does not need to know the exceptions.<br />
<script src="https://gist.github.com/1481536.js?file=APIUtils.java"></script></p>
<h3 id="ObjectAPI">ObjectAPI</h3>
<p>This class should be written primarily as a wrapper class for the Object&#8217;s util class</p>
<h4 id="Specific_Contexts">Specific Contexts</h4>
<p>If contexts are needed and they will only be used by this API, then they should be included directly in the API file</p>
<ul>
<li>Each field must be of type WebService</li>
<li>Each class should have a constructor to aid in creation</li>
<li>Do not assume that variables in contexts will be set</li>
</ul>
<h4 id="Methods">Methods</h4>
<p>Each method should be disparate function of work and contain minimal logic.  These methods should call the required Util methods, transform data, catch exceptions and set returnCode/messages</p>
<ul>
<li>Method must be of type WebService</li>
<li>Method must be static</li>
<li>Method should return an APIObject</li>
<li>Method should set the returnCode and the message of the APIObject</li>
<li>All calls should be in a try-catch block so that no exceptions are leaked</li>
</ul>
<p><script src="https://gist.github.com/1481536.js?file=MyObjectAPI.java"></script></p>
<h3 id="ObjectUtils">ObjectUtils</h3>
<p>This class should have the majority of the logic.  The methods in this class should follow the idea of Samurai Programming.  Samurai Programming means the method should &#8220;return successful or not at all.&#8221;  This means instead of returning null if an error happens (if the method should return something ie getCase) then the method should throw an exception.</p>
<ul>
<li>Most methods will be static</li>
<li>Methods should throw an exception if the parameters are set incorrectly</li>
<li>SOQL queries that are single lines should have their exceptions caught, reported then throw the appropriate exception.  For example if we are selecting a single Case using Case c = [ select ... ] then we should catch the exception in case the query fails, and then thrown an UnknownCaseException.</li>
</ul>
<p><script src="https://gist.github.com/1481536.js?file=MyObjectUtils.java"></script></p>
<h2 id="Caveats">Caveats</h2>
<ul>
<li>Declaring a class as <em>virtual</em> and then <em>implementing</em> that class to try to have global variables that all classes get do not work.  The fields will not show up in the generated WSDL</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2012/01/06/creating-web-services-in-salesforce/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fedora 16 Supplemental Wallpapers</title>
		<link>http://blog.deadlypenguin.com/blog/2011/06/20/fedora-16-supplemental-wallpapers/</link>
		<comments>http://blog.deadlypenguin.com/blog/2011/06/20/fedora-16-supplemental-wallpapers/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 20:51:50 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=134</guid>
		<description><![CDATA[I&#8217;ve taken up the charge to be the so called &#8220;Supplemental Wallpaper Wrangler.&#8221; With that being said, I want to put call out to everyone to submit supplemental wallpapers for our next release. What are supplemental wallpapers? In addition to &#8230; <a href="http://blog.deadlypenguin.com/blog/2011/06/20/fedora-16-supplemental-wallpapers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve taken up the charge to be the so called &#8220;Supplemental Wallpaper Wrangler.&#8221;  With that being said, I want to put call out to everyone to submit supplemental wallpapers for our next release.</p>
<p><strong>What are supplemental wallpapers?</strong></p>
<p>In addition to the standard wallpaper that the design team is working hard to design and finalize, we want to include some addition wallpapers for people to choose from.  We will still ship with the default GNOME upstream supplemental wallpapers but, we want to include some more from our community.</p>
<p><strong>What we need</strong></p>
<p>In order to us the image for the supplemental wallpapers we need some basic information</p>
<ul>
<li>URL of the image (ie. “where it’s at”)</li>
<li>Title of the work in question</li>
<li>Name of the author (their real name is preferable, but a nickname with a link to the profile on the page the image is from works as well)</li>
<li>Contact information for the author, email if possible</li>
<li>URL of the source page that the image was originally from</li>
<li>The license of the photo (has to be compatible with the Fedora requirements)</li>
</ul>
<p>In addition to this, what the image is of is important (see the <a href="https://fedoraproject.org/wiki/F16_Artwork/Submissions/Supplemental_Wallpapers#Subject_matter:" target="_self">wiki</a> for the full requirements)</p>
<ul>
<li>Must not contain brand names or trademarks of any kind</li>
<li>Must not contain material that is inappropriate, offensive, indecent, obscene, hateful, tortuous, defamatory, slanderous or libelous</li>
<li>No religious, political, or nationalist imagery (including flags)</li>
<li>No images of hats, particularly fedoras. (This is a matter of respect for our primary sponsor, Red Hat, Inc., and is not negotiable. Of course, passive appearance of hats, such as those upon heads in a crowd, may be allowed.)</li>
<li>No version numbers. End users might prefer to continue to use an older theme, or use the latest theme in their older version of Fedora. To enable that choice, do not use any version numbers within the Fedora artwork.</li>
<li>No text. Text should not be used in the backgrounds because the artwork is intended for a global audience and to be reused by derivative distributions.</li>
<li>Should not contain images of people (contemporary, historical, or fictional)</li>
<li>Should not contain images of pets, or captive or mistreated animals</li>
</ul>
<p><strong>How to submit</strong></p>
<p>So, got that perfect image in mind for a supplemental wallpaper?  Great!  If the image meets all of the <a href="https://fedoraproject.org/wiki/F16_Artwork/Submissions/Supplemental_Wallpapers#Subject_matter:" target="_self">requirements</a> then all you need to do is add it to the <a href="https://fedoraproject.org/wiki/F16_Artwork/Submissions/Supplemental_Wallpapers#Submissions" target="_self">submissions section</a> of the wiki and wait.  We will take submissions until 23:59 UTC on August 9th 2011 following that the design team will vote for the top 15 and they will be packaged up and included in the Fedora 16 release.</p>
<p>If you have any questions feel free to email me (pcon AT fedoraproject DOT org) or contact me (pcon) in #fedora-design on freenode</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2011/06/20/fedora-16-supplemental-wallpapers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using meld with git diff</title>
		<link>http://blog.deadlypenguin.com/blog/2011/05/03/using-meld-with-git-diff/</link>
		<comments>http://blog.deadlypenguin.com/blog/2011/05/03/using-meld-with-git-diff/#comments</comments>
		<pubDate>Tue, 03 May 2011 18:21:35 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=127</guid>
		<description><![CDATA[This is test <a href="http://blog.deadlypenguin.com/blog/2011/05/03/using-meld-with-git-diff/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the things I&#8217;ve found myself doing more of is merging in code for other people.  Most of this are changes/additions/deletions to XML files.  And one thing that is really annoying to do is doing these by hand.  Well, fortunately there is a great tool for helping with this.  it&#8217;s called <a href="http://meld.sourceforge.net/" target="_self">Meld</a>.  To get it to play nicely with git we have to do one small thing.  Create a bash script called &#8220;git-meld&#8221; and put in your bin directory</p>
<blockquote><p>#!/bin/bash<br />
meld &#8220;$2&#8243; &#8220;$5&#8243;</p></blockquote>
<p>Then make it executable with chmod.  Now add the following to your ~/.gitconfig file</p>
<blockquote><p>[diff]<br />
external = git-meld</p></blockquote>
<p>This will now run meld whenever you do a git diff.  You can easily see diffs and apply diffs with it now.  If you click the arrow in the blue/green box it will move that chunk of code over.  If you diff multiple files, meld will run with each one of the files, so just quit out of meld and it will relaunch with the next file.</p>
<p><a href="http://meld.sourceforge.net/meld_file1.png"><img src="http://meld.sourceforge.net/meld_file1.png" alt="" width="550px" height="408px" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2011/05/03/using-meld-with-git-diff/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Syncing saved games between Windows / Mac / Linux with Dropbox</title>
		<link>http://blog.deadlypenguin.com/blog/2010/05/20/syncing-saved-games-between-windows-mac-linux-with-dropbox/</link>
		<comments>http://blog.deadlypenguin.com/blog/2010/05/20/syncing-saved-games-between-windows-mac-linux-with-dropbox/#comments</comments>
		<pubDate>Thu, 20 May 2010 17:46:58 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[dropbox]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=124</guid>
		<description><![CDATA[So with steam coming out on the Mac and with the Humble Indie Bundle working on all three, there is a problem with keeping all of your saves in sync. Not any more. This is all thanks to dropbox. What &#8230; <a href="http://blog.deadlypenguin.com/blog/2010/05/20/syncing-saved-games-between-windows-mac-linux-with-dropbox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So with steam coming out on the Mac and with the Humble Indie Bundle working on all three, there is a problem with keeping all of your saves in sync. Not any more. This is all thanks to dropbox.</p>
<p><strong>What is dropbox?</strong><br />
Dropbox is a cross-platform application / website that keeps files in sync and gives you 2Gb of storage space for free.  If you&#8217;re not a dropbox user already, you can sign up <a href="https://www.dropbox.com/referrals/NTIxMjU2Njk" target="_blank">here</a>.</p>
<p><strong>Initial setup</strong></p>
<p>The initial setup is the tricky part.  Fortunately you only need to install something (other than dropbox) on one system and only if you&#8217;re running Windows XP.</p>
<p><strong>Windows XP</strong></p>
<p>You&#8217;ll need to install <a href="http://www.microsoft.com/technet/sysinternals/FileAndDisk/junction.mspx" target="_self">junction</a> to make the symlinks in Windows XP.  In Vista and later you can use mklink</p>
<p><strong>Linux / OSX</strong></p>
<p>You&#8217;ll use the ln command</p>
<p>After you have installed your game you will need to move your save game directory into your dropbox and then link to it.  For this example, I&#8217;ll be using Civ 4.  In the examples below, I&#8217;m assuming you&#8217;ve already moved your files into Dropbox/games/</p>
<p><strong>Windows</strong></p>
<blockquote><p>junction &#8220;C:\Documents and Settings\User\My Documents\My Games\Sid Meier&#8217;s Civilization IV\replay&#8221; C:\Documents and Settings\User\My Documents\My Dropbox\games\civ4&#8243;</p></blockquote>
<p><strong>OSX / Linux</strong></p>
<blockquote><p>ln -s ~/Documents/Sid\ Meier\&#8217;s\ Civilzation\ IV/replay ~/My\ Dropbox/games/civ4</p></blockquote>
<p><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2010/05/20/syncing-saved-games-between-windows-mac-linux-with-dropbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automatic backups with UDEV</title>
		<link>http://blog.deadlypenguin.com/blog/2009/09/25/automatic-backups-with-udev/</link>
		<comments>http://blog.deadlypenguin.com/blog/2009/09/25/automatic-backups-with-udev/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 15:04:04 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=117</guid>
		<description><![CDATA[I recently challenged myself to come up with a way to make udev automatically backup when you plug in a USB harddrive. I did all my testing with a USB stick drive, but since they both show up as block &#8230; <a href="http://blog.deadlypenguin.com/blog/2009/09/25/automatic-backups-with-udev/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently challenged myself to come up with a way to make udev automatically backup when you plug in a USB harddrive.  I did all my testing with a USB stick drive, but since they both show up as block devices to the kernel, it shouldn&#8217;t matter.</p>
<p><strong>UDEV Rules</strong></p>
<p>To start with, we need to set up static naming for the storage device that you want to make into backup disk.  Start by plugging in the disk.  (Now I&#8217;m not using Gnome or KDE so I&#8217;m not sure what their automounter will do.  So, you might have to find a way to exclude it from the automounter.  We need to find out the &#8220;model&#8221; of the drive.  My udev rules are pretty basic, and will work since most people don&#8217;t have more than one the same model of USB drive laying around that they would use.  You can always modify the udev rules to work for you.</p>
<blockquote><p>udevadm info -a -p /sys/block/sdc | grep model</p></blockquote>
<p>Here we are looking at the block device sdc (which is what the kernel named it since we don&#8217;t have any udev rules yet).  This could change depending on how many block devices you currently have.  Now we take this information, and feed it into a udev rule.  I created a file <em>/etc/udev/rules.d/50-backup.rules</em> The name isn&#8217;t really important, however, the number 50- is.  That is the order in which it runs.  We want that number to be less than 90 so that hal doesn&#8217;t run first.  Inside that file, we have the following:</p>
<blockquote><p>KERNEL==&#8221;sd?1&#8243;, SUBSYSTEM==&#8221;block&#8221;, ATTRS{model}==&#8221;MODEL GOES HERE&#8221;, SYMLINK+=&#8221;backup&#8221;, RUN+=&#8221;/usr/local/bin/backup.sh&#8221;</p></blockquote>
<p>Replace &#8220;MODEL GOES HERE&#8221; with the output from the udevadm command</p>
<p><strong>The backup script</strong></p>
<p>Now we udev running our script <em>/usr/local/bin/backup.sh</em> we need to make that script</p>
<blockquote><pre>#!/bin/bash

NOTIFYUSER="pcon"
MAINDIR="/home/pcon/"
BACKUPDIR="/mnt/backup"

su $NOTIFYUSER alt-notify-send backup "Waiting for things to settle" 0
sleep 5

su $NOTIFYUSER alt-notify-send backup "Starting backup" 0
echo "$(date) - Mounting /dev/backup to $BACKUPDIR" &gt; /tmp/backup.log
mount /dev/backup $BACKUPDIR &gt;&gt; /tmp/backup.log 2&gt;&amp;1
echo "$(date) - Staring rsync of $MAINDIR to $BACKUPDIR" &gt;&gt; /tmp/backup.log
rsync -arvuz --inplace --delete $MAINDIR $BACKUPDIR &gt;&gt; /tmp/backup.log 2&gt;&amp;1
echo "$(date) - Mounting /dev/backup to $BACKUPDIR" &gt;&gt; /tmp/backup.log
umount $BACKUPDIR &gt;&gt; /tmp/backup.log 2&gt;&amp;1
su $NOTIFYUSER alt-notify-send backup "Backup completed" 0</pre>
</blockquote>
<p>We have a couple of things to setup here.  First we need to create /mnt/backup as root, and fill out the other variables in the top of the script.  Aslo, if we want notification in gnome, we need to make a notify-send work around.  Put the following in <em>/usr/local/bin/alt-notify-send</em></p>
<blockquote><pre>#!/bin/sh
user=`whoami`
pids=`pgrep -u $user gnome-panel`
title=$1
text=$2
timeout=$3

if [ -z "$title" ]; then
    echo You need to give me a title &gt;&amp;2
    exit 1
fi
if [ -z "$text" ]; then
     text=$title
fi
if [ -z "$timeout" ]; then
     timeout=60000
fi

for pid in $pids; do
    # find DBUS session bus for this session
    DBUS_SESSION_BUS_ADDRESS=`grep -z DBUS_SESSION_BUS_ADDRESS \
    /proc/$pid/environ | sed -e 's/DBUS_SESSION_BUS_ADDRESS=//'`
    # use it
    DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS \
    notify-send -u low -t $timeout "$title" "$text"
done</pre>
</blockquote>
<p>Now chmod +x the two scripts, and everything should be good to go.  You can download the scripts used in this post below:</p>
<ul>
<li><a href="http://deadlypenguin.com/code/udevBackups/50-backup.rules" target="_blank">50-backup.rules</a></li>
<li><a href="http://deadlypenguin.com/code/udevBackups/backup.sh" target="_blank">backup.sh</a></li>
<li><a href="http://deadlypenguin.com/code/udevBackups/alt-notify-send" target="_blank">alt-notify-send</a> (Taken from <a href="http://ubuntuforums.org/showthread.php?p=6889270#post6889270" target="_blank">here</a>)</li>
</ul>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2009/09/25/automatic-backups-with-udev/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>External programs that update screen</title>
		<link>http://blog.deadlypenguin.com/blog/2009/09/18/external-programs-that-update-screen/</link>
		<comments>http://blog.deadlypenguin.com/blog/2009/09/18/external-programs-that-update-screen/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 21:12:36 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=111</guid>
		<description><![CDATA[Screen is a great tool, and it allows you do to alot of neat things.  One of my favorites is binding commands to key strokes.  So all you have to do is hit F5 and it will start something in &#8230; <a href="http://blog.deadlypenguin.com/blog/2009/09/18/external-programs-that-update-screen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Screen is a great tool, and it allows you do to alot of neat things.  One of my favorites is binding commands to key strokes.  So all you have to do is hit F5 and it will start something in the background.  Such as a build command.  The problem is, you either get no output, or you get spam all over your screen.  Well I&#8217;ve finally found a way around that.  The answer lies in ANSI Privacy Messages.</p>
<p>In your .screenrc, make sure you have a place that will show messages.  If you start up screen and you see &#8220;New screen&#8230;&#8221; then you&#8217;ve got this.  Next add your script to your .screenrc</p>
<blockquote><p>bind -k k5 exec /home/pcon/bin/build_script.sh</p></blockquote>
<p>Now everything in your screen is ready to go.  Now, on to build_script.sh</p>
<blockquote><p>#!/bin/bash</p>
<p>echo -n -e &#8220;&#92;033^Starting Build&#92;033&#92;&#92;&#8221;</p>
<p># Do something here</p>
<p>echo -n -e &#8220;&#92;033^Ending Build&#92;033&#92;&#92;&#8221;</p></blockquote>
<p>That&#8217;s it.  Now your screen will display &#8220;Starting Build&#8221; and &#8220;Ending Build&#8221; on your display.  If the stuff in between happens too fast, you may only see your last message.  The key thing is that your message has to start with &#8220;&#92;033^&#8221;  and end with &#8220;&#92;033&#92;&#92;&#8221; otherwise you&#8217;ll loose your cursor.  And you have to have the -e on the echo so that it will interpret the octal codes correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2009/09/18/external-programs-that-update-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DVD player with xsessions</title>
		<link>http://blog.deadlypenguin.com/blog/2009/06/12/dvd-player-with-xsessions/</link>
		<comments>http://blog.deadlypenguin.com/blog/2009/06/12/dvd-player-with-xsessions/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 18:55:15 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[satellite]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=87</guid>
		<description><![CDATA[I&#8217;ve come across the need to simply the dvd playing process.  I&#8217;m having to set up a laptop to play a dvd and use a remote presenter control.  Now in the past I&#8217;ve just been in charge of this setup, &#8230; <a href="http://blog.deadlypenguin.com/blog/2009/06/12/dvd-player-with-xsessions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come across the need to simply the dvd playing process.  I&#8217;m having to set up a laptop to play a dvd and use a remote presenter control.  Now in the past I&#8217;ve just been in charge of this setup, and haven&#8217;t had to worry about explaining how to start it up for others.  This time, I need to make it as user friendly as possible.  So, I&#8217;ve decided to do this with a couple of bash scripts and a couple of xsessions.<br />
<strong>Goals</strong></p>
<ul>
<li>Generic user with a generic password to hand to the person in charge</li>
<li>Ability to play dvd stored locally.  (Called presentation_dvd)</li>
<li>Ability to play any dvd inserted.</li>
<li>Require no user input except to choose <em>presentation_dvd</em> or <em>dvd</em></li>
</ul>
<p><strong>Preperation</strong></p>
<p>To get ready, we need to do a couple of things</p>
<ul>
<li>Create a presenter user</li>
<li>Install xine and xine-lib-extras-freeworld</li>
<li>Copy our presentation_dvd to an iso<br />
<blockquote><p>dd if=/dev/dvd of=/home/presenter/presentation_dvd.iso</p></blockquote>
</li>
</ul>
<p><strong>Xesssions</strong></p>
<p>Xsessions are what defines your window manager.  It&#8217;s what tells X11 what to run when you say Session-&gt;Gnome or Session-&gt;fluxbox.  These files are stored in <em>/usr/share/xsessions</em>.</p>
<blockquote><p>[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=Presentation_DVD<br />
Comment=Start the presentation DVD<br />
Exec=/usr/local/bin/presentation_dvd<br />
Terminal=False</p>
<p>[Window Manager]<br />
SessionManaged=true</p></blockquote>
<p>This is our file in <em>/usr/share/xesssions/presentation_dvd.desktop</em> We then create one in <em>/usr/share/xesssions/dvd.desktop</em> and replace presentation_dvd with dvd.</p>
<p><strong>The Scripts</strong></p>
<p>Our /usr/local/bin/presentation_dvd looks like this:</p>
<blockquote><p><code>#!bin/bash<br />
amixer set Master playback 100%<br />
xine -f -g --no-splash dvd:/home/presenter/presentation_dvd.iso</code></p></blockquote>
<p>This will turn the volume up to 100% and then start xine on the iso.  To exit, just right click and say exit.  This will take you back to the login screen.</p>
<p>Now to handle any dvd with the <em>/usr/local/bin/dvd</em></p>
<blockquote><p><code>#!/bin/bash<br />
amixer set Master playback 100%<br />
xine -f -g<em> </em>--no-splash dvd://</code></p></blockquote>
<p>And the final touch, make them both executable</p>
<blockquote><p>chmod a+x /usr/local/bin/dvd /usr/local/bin/presentation_dvd</p></blockquote>
<p><em>NOTE:  The xine parameter is dash dash no dash splash.  The font I&#8217;m using doesn&#8217;t render two dashes well</em></p>
<p><em><br />
</em></p>
<p><strong>Usage</strong></p>
<p>From the login menu, choose your presenter user, and then choose the appropriate session at the bottom.  Then type in the password.  Like magic, everything should work.</p>
<p><strong>Potential problems</strong></p>
<p>If you don&#8217;t see your session in the list, you might have a typo in your xsession file</p>
<p>If one of the xine scripts don&#8217;t work, try logging into gnome and running the script from the command-line to see why.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2009/06/12/dvd-player-with-xsessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce.com and Subversion</title>
		<link>http://blog.deadlypenguin.com/blog/2009/04/29/salesforcecom-and-subversion/</link>
		<comments>http://blog.deadlypenguin.com/blog/2009/04/29/salesforcecom-and-subversion/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 19:31:10 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=72</guid>
		<description><![CDATA[From what I&#8217;ve been able to tell, there is no real version control built into Salesforce.com and this is a problem when pushing from a sandbox instance into a production instance.  To fix this problem (at least until Salesforce does &#8230; <a href="http://blog.deadlypenguin.com/blog/2009/04/29/salesforcecom-and-subversion/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>From what I&#8217;ve been able to tell, there is no real version control built into Salesforce.com and this is a problem when pushing from a sandbox instance into a production instance.  To fix this problem (at least until Salesforce does something), I think the best option is to use the Force.com plugin and the Subclipse plugin for Eclipse.  With both of these in place, it should make version control a reality.</p>
<ol>
<li>Install <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> for your platform (it&#8217;s eclipse-platform if you are using Fedora)</li>
<li>Install both the <a href="http://wiki.developerforce.com/index.php/Force.com_IDE_Installation_for_Eclipse_3.3.x" target="_blank">Force.com</a> and <a href="http://subclipse.tigris.org/" target="_blank">Subclipse</a> plugin (eclipse-subclipse)</li>
<li>Add your Force.com project to Eclipse (<a href="http://wiki.developerforce.com/index.php/An_Introduction_to_Force_IDE" target="_blank">Howto</a>)</li>
<li>Add your SVN repo to Eclipse.  (<a href="http://agile.csc.ncsu.edu/SEMaterials/tutorials/subclipse/index.html#section3_0" target="_blank">Howto</a>)</li>
<li>Share your Force.com project (Right-click on Project name -&gt; Team -&gt; Share Project -&gt; SVN -&gt; Choose repo)</li>
<li>Then after updating a file in the Force.com project, commit the update to SVN before deploying to the server ()</li>
</ol>
<p>Now if you want to use this in another Eclipse instance then, you&#8217;ll want to do the first two steps to prepare your Eclipse environment.  Then:</p>
<ol>
<li>Add the existing SVN repo to Eclipse (<a href="http://agile.csc.ncsu.edu/SEMaterials/tutorials/subclipse/index.html#section5_0" target="_blank">Howto</a>)</li>
<li>Right click on the Project Force.com -&gt; Project Properties   and update the username / password</li>
</ol>
<p>When using this in a collaborative setting, the following workflow should be followed whenever possible.</p>
<ol>
<li>Team -&gt; Update</li>
<li>Make changes to code</li>
<li>Team -&gt; Update</li>
<li>Make changes to resolve collisions if needed</li>
<li>Team -&gt; Commit</li>
<li>Force.com -&gt; Deploy to Server</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2009/04/29/salesforcecom-and-subversion/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>TF2 Server</title>
		<link>http://blog.deadlypenguin.com/blog/2009/04/24/tf2-server/</link>
		<comments>http://blog.deadlypenguin.com/blog/2009/04/24/tf2-server/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 14:27:11 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=79</guid>
		<description><![CDATA[Just setup a TF2 server following this article In Fedora, you need to do the following as root before running any of the commands from the article ln -s /usr/bin/gunzip /usr/bin/uncompress Now.  To figure out how the server.cfg]]></description>
			<content:encoded><![CDATA[<p>Just setup a TF2 server following <a href="http://tyspace.com/?p=27" target="_blank">this article</a></p>
<p>In Fedora, you need to do the following as root before running any of the commands from the article</p>
<blockquote><p>ln -s /usr/bin/gunzip /usr/bin/uncompress</p></blockquote>
<p>Now.  To figure out how the server.cfg</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2009/04/24/tf2-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boxee and AppleTV</title>
		<link>http://blog.deadlypenguin.com/blog/2009/03/10/boxee-and-appletv/</link>
		<comments>http://blog.deadlypenguin.com/blog/2009/03/10/boxee-and-appletv/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 03:52:45 +0000</pubDate>
		<dc:creator>pcon</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.deadlypenguin.com/blog/?p=61</guid>
		<description><![CDATA[Prior to starting up the AppleTV or even unboxing it, get your patchstick ready by following these instructions Unbox and setup the AppleTV to your LAN. Then, navigate to the setup-&#62;general-&#62;updates and make sure you STOP the update if you &#8230; <a href="http://blog.deadlypenguin.com/blog/2009/03/10/boxee-and-appletv/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://deadlypenguin.com/random/appletv.jpg"><img class="aligncenter" src="http://deadlypenguin.com/random/appletv.jpg" alt="AppleTV and Roku" width="360" height="288" /></a></p>
<ol>
<li>Prior to starting up the AppleTV or even unboxing it, get your patchstick ready by following <a href="http://code.google.com/p/atvusb-creator/" target="_blank">these instructions</a></li>
<li>Unbox and setup the AppleTV to your LAN.</li>
<li>Then, navigate to the setup-&gt;general-&gt;updates and make sure you <strong>STOP</strong> the update if you can.  The update won&#8217;t technically break anything, but there are some problems with the newest firmware.  If you can stop it it&#8217;s better</li>
<li>Insert your patchstick, and reboot the AppleTV<br />
<a href="http://deadlypenguin.com/random/loader.jpg"><img class="aligncenter" src="http://deadlypenguin.com/random/loader.jpg" alt="Linux loader" width="360" height="288" /></a></li>
<li>Once it&#8217;s done open up your favorite terminal, and get ready to ssh to make sure that AppleTV can run any updates.  The password is &#8216;<strong>frontrow</strong>&#8216;<br />
<blockquote><p>ssh frontrow@appletv<br />
sudo bash -c &#8216;echo &#8220;127.0.0.1 mesu.apple.com&#8221; &gt;&gt; /etc/hosts&#8217;</p></blockquote>
</li>
<li>From the menu select &#8216;XBMC/Boxee&#8217;-&gt;Updates and select the non-alpha boxee</li>
<li>Wait and wait some more</li>
<li>Download the darwinx86 iso from <a href="http://www.opensource.apple.com/darwinsource/images/" target="_blank">here</a> you can get a free login for this by following the links</li>
<li>Mount it up on the loop back and scp the /usr/bin/vim and /sbin/mount_nfs to the AppleTV</li>
<li>You will need to make sure you nfs export has the option <i>insecure</i> or the AppleTV won&#8217;t be able to mount it</li>
<li>Reboot one last time.  You can do this with &#8216;sudo /sbin/reboot now&#8217;</li>
<li>Choose boxee from the menu and launch it.  There are a couple of known bugs with the latest firmware and boxee version.</li>
</ol>
<ul>
<li>Boxee starts with a black screen.  The only real &#8216;fix&#8217; for that is to restart it a bunch until it starts up right.</li>
<li>Boxee freezes on the menu.  Remove the &#8216;/Users/frontrow/Library/Application Support/BOXEE/UserData/&#8217; folder.</li>
<li>For more information, go <a href="http://blog.boxee.tv/2008/11/23/boxee-on-apple-tv-23/" target="_blank">here</a></li>
</ul>
<p style="text-align: center"><a href="http://deadlypenguin.com/random/boxee.jpg"><img class="aligncenter" src="http://deadlypenguin.com/random/boxee.jpg" alt="Boxee Running" width="360" height="288" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deadlypenguin.com/blog/2009/03/10/boxee-and-appletv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

