<?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>ForestMist</title>
	<atom:link href="http://forestmist.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://forestmist.org</link>
	<description></description>
	<lastBuildDate>Tue, 11 Oct 2011 03:17:11 +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>WordPress Cookieless Domains</title>
		<link>http://forestmist.org/2011/10/wordpress-cookieless-domains/</link>
		<comments>http://forestmist.org/2011/10/wordpress-cookieless-domains/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 21:41:25 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cookieless]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Performance Optimization]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1450</guid>
		<description><![CDATA[First off, cookieless domains are your friends for content distribution. Why? Because every time a web browser talks to a server it sends a copy of all its cookies for that domain. As you can imagine this is quite ridiculous if your client is requesting an image, CSS, JS or other static resource which can [...]]]></description>
			<content:encoded><![CDATA[<div class="story-image" style="background-image: url(http://forestmisty.org/wp-content/uploads/2011/10/wordpress-cookieless-domain.jpg);"><a href="http://forestmisty.org/wp-content/uploads/2011/10/wordpress-cookieless-domain.jpg"></a></div>
<p>First off, cookieless domains are your friends for content distribution. Why? Because every time a web browser talks to a server it sends a copy of all its cookies for that domain. As you can imagine this is quite ridiculous if your client is requesting an image, CSS, JS or other static resource which can never use that cookie information. These wasted upload bits are totally unnecessary so lets get rid of them with the help of a cookieless domain.</p>
<h2>Sub or New Domain?</h2>
<p>You might think there is a magical &#8216;no cookies&#8217; option on your server but there isn&#8217;t. A cookieless domain is simply one that has never set a cookie. This means two options; create a sub domain (like s.forstmist.org) or create a new domain name.</p>
<p>At first glance a sub domain seems nice and simple but there is a caveat. If you redirect your visitors from a sub domain (www.forestmist.org) to your root domain (forestmist.org) you&#8217;ll end up with cookies on your root domain. These root cookies are automatically sent along with any requests to <em>all</em> sub domains. That&#8217;s right, having cookies on your root domain taints <em>all</em> your sub domains from becoming cookieless domains. This is not a concern if you channel all your visitors to a www sub domain since any cookies there will not be available to the root domain and therefore won&#8217;t taint other sub domains.</p>
<p>For short domain name lovers, registering a new domain for serving static content is a no brainer. I definitely fall into this category so I registered forestmisty.org which I shall use as an example in the rest of this guide.</p>
<p><span class="Apple-style-span" style="font-size: 20px;"><strong>.htaccess Redirect</strong></span></p>
<p>With the new misty domain setup and pointing to my web server everything was working great. Requests to static images weren&#8217;t passing cookie information but what if someone went to the root of forestmisty.org? What if a broken link sent them to a 404? WordPress would handle the request and that means potential cookies from it or Google Analytics. Yikes!</p>
<p>What would be nice is if we can allow any requests for forestmisty.org/wp-content/ but redirect anything else back to forestmist.org. We can do exactly that with the following .htaccess commands.</p>
<pre>RewriteEngine on
RewriteCond %{HTTP_HOST} ^forestmisty.org$ [NC]
RewriteCond %{REQUEST_URI} !^/wp-content/?(.*)$ [NC]
RewriteRule ^(.*)?$ http://forestmist.org/$1 [R=301,L]</pre>
<p>The first line enables the Apache rewrite engine.<br />
The second line says anytime a request comes in for &#8216;forestmisty.org&#8217; continue to the next line.<br />
The third line says if the request is NOT for &#8216;/wp-content/&#8230;&#8217; continue to the next line.<br />
The forth line says if we made it this far redirect the original request to forestmist.org including any extra query information like /favicon.ico, /creative-resume, etc&#8230;</p>
<p>By the way&#8230;<br />
^ means the start of a string.<br />
$ means the end of a string.<br />
? means the preceding character or collection in parenthesis is optional.<br />
. means any one character.<br />
* means the preceding character can occur 0 or more times.<br />
$1 means insert whatever was inside the first set of parenthesis to the left.<br />
[NC] means not case sensitive.<br />
[R=301] means do a 301 redirect.<br />
[L] means the last rule so don&#8217;t bother processing the rest of the .htaccess file.</p>
<p>Now we can rest assured that requests to our new cookieless domain will stay cookie free by only servering up what are almost always static file requests from the /wp-content folder.</p>
<h2>Configure WordPress</h2>
<p>Our new domain is setup and protected pretty well thanks to our .htaccess file so now it&#8217;s time for WordPress to join the fray. Specially, WordPress needs to have any /wp-content  links rewritten to point to the same location on our cookie free domain.</p>
<ul>
<li>Download, install and activate the excellent <a href="https://github.com/wmark/CDN-Linker/downloads">CDN Linker</a> by <a href="http://mark.ossdl.de/">W-Mark Kubacki</a>.</li>
<li>Login to WordPress</li>
<ul>
<li>Settings » CDN Linker</li>
<ul>
<li>Enter your new cookieless domain for CDN URL.</li>
<li>Change your &#8216;Include Dirs&#8217; line to read &#8216;wp-content&#8217; if you setup your .htaccess file like mine.</li>
<li>Save Changes</li>
</ul>
</ul>
</ul>
<p>Load your home page and view source. You should see your new cookieless domain being referenced quite often. Yay!</p>
<h2>Success</h2>
<p>With a little bit of effort our server is less stressed, our clients are loading faster and hopefully you&#8217;ve got a silly grin on your face.</p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/10/wordpress-cookieless-domains/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Freedom</title>
		<link>http://forestmist.org/2011/10/freedom/</link>
		<comments>http://forestmist.org/2011/10/freedom/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 12:47:33 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Freedom]]></category>
		<category><![CDATA[Freelancing]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1424</guid>
		<description><![CDATA[One of my daily destinations is a guiding web page called New Life. A very simple design containing five key concepts integral to my new self. These are Sleep, Fancy Dresser, Grooming, Focus and Freedom. Of all these, freedom, the most etherial has shown itself of late. For brief interludes yes but a perfumed breeze [...]]]></description>
			<content:encoded><![CDATA[<div class="story-image" style="background-image: url(http://forestmisty.org/wp-content/uploads/2011/10/dodge-challenger-on-runway-660x400.jpg);"><a href="http://forestmisty.org/wp-content/uploads/2011/10/dodge-challenger-on-runway.jpg"></a></div>
<p>One of my daily destinations is a guiding web page called <em>New Life</em>. A very simple design containing five key concepts integral to my new self. These are Sleep, Fancy Dresser, Grooming, Focus and Freedom. </p>
<p>Of all these, freedom, the most etherial has shown itself of late. For brief interludes yes but a perfumed breeze of moisture is far more than sufficient for a <a href="http://en.wikipedia.org/wiki/Fremen">fremen</a>. Invigorated and renewed I find it easy to continue the journey knowing that no matter what happens, I chose the right path.</p>
<p>Much of these feelings are thanks to my new freelancing lifestyle. I choose what I work on, who I work with and have no obligations as a provider until I choose to accept them. Thanks to careful selecting, everything I work on is a tremendous learning font. Each hand crafted creation empowering me with abilities needed for my lifetime goals. No effort wasted, a perfect journey!</p>
<p>When I was a child freedom meant my huffy bicycle. Now that I am older, more nuanced and most importantly, know myself, freedom is so much more. Still, a simple picture of open skies, a classic muscle car and an airport runway evoke everything I need to ascend into the feeling of freedom.</p>
<p>Freedom must be different for each individual but for me, I know what it is, I have tasted it and I will work for it. When it arrives, we&#8217;ll go for a drive together. Two old friends reunited at last and with no guilt for the past.</p>
<p>The open road calls. Won&#8217;t you join me?</p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/10/freedom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resignation from Mercy</title>
		<link>http://forestmist.org/2011/07/resignation-from-mercy/</link>
		<comments>http://forestmist.org/2011/07/resignation-from-mercy/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 21:05:10 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1370</guid>
		<description><![CDATA[Resignations seem like one of those taboo subjects that people shy away from so here is one I wrote today. Very much in my own personal style and flavoured with naval metaphors. Yum! Letter of Resignation This letter is official notice of my resignation. My last day will be July 26th, 2011. I came to [...]]]></description>
			<content:encoded><![CDATA[<p>Resignations seem like one of those taboo subjects that people shy away from so here is one I wrote today.</p>
<p>Very much in my own personal style and flavoured with naval metaphors. Yum!</p>
<h2>Letter of Resignation</h2>
<p>This letter is official notice of my resignation. My last day will be July 26th, 2011.</p>
<p>I came to Mercy as part of an elite team of handpicked individuals under the leadership of the great Fernando Martinez. The goal, to turn Mercy around and become a shining beacon of the latest technology.  It worked too. We had virtual servers, full system encryption, intrusion protection and more years before anyone else. A golden age of tech.</p>
<p>Rough times were coming though. Economic hardships, budget cuts, management changes and other hardships. Fernando and the team saw that they would be forced to make compromises if they stayed so they rightly moved on to new projects and challenges outside of Mercy. A few of us stayed though. For very different reasons I’m sure.</p>
<p>For me, the mission wasn’t complete yet. I would be crafty, work harder than ever before,  use open source software and do everything in my power to keep Mercy cutting edge. It didn’t work out quite as planned. Information Systems lost people and resources while gaining more responsibility. Soon it was all that we could do but tend to a once beautiful ship, tossed and broken, lost in the high seas with no shore in sight.</p>
<p>Fast forward to today and the ship is docked in the kingdom of the HCA. She is being patched, has new crew and officers getting ready to sail to new lands.</p>
<p>My modified quest is now complete and I’m very proud of my time here. I’m especially fond of all the smart people I’ve worked, played and lived with. You shall be remembered.</p>
<p>Soon I shall be off to new Freelancing adventures and doing what I love the most. Working with technology and making people happy.</p>
<p><em>May the wind always be at your back and your crew by your side!</em></p>
<p><em> </em></p>
<p>^_^</p>
<p><strong>Daniel Gagan<br />
</strong>PS &#8211; Fun fact, I was born on July 26th at Mercy, hired years later on the same day and now the circle will be complete as my last day will be that very special date.</p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/07/resignation-from-mercy/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>PHP 5 &#8211; Sort by Folder</title>
		<link>http://forestmist.org/2011/06/php-5-sort-by-folder/</link>
		<comments>http://forestmist.org/2011/06/php-5-sort-by-folder/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 23:01:50 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP 5]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1295</guid>
		<description><![CDATA[Recently, I needed to display a list of files with PHP. My only caveat was that I wanted to do so using newer methods of PHP 5 where possible. I was delighted to find scandir. Problem was, scandir returns files mixed with folders and that would upset my flock of easily frightened Windows users. So a quick&#8230; er [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I needed to display a list of files with PHP. My only caveat was that I wanted to do so using newer methods of PHP 5 where possible.</p>
<p>I was delighted to find <a href="http://php.net/manual/en/function.scandir.php">scandir</a>. Problem was, scandir returns files mixed with folders and that would upset my flock of easily frightened Windows users.</p>
<p>So a quick&#8230; er medium&#8230; ok fine,  an exasperating search on Google and only outdated, complex and inefficient samples were to be found. <a href="http://www.youtube.com/watch?v=1Lr_TVZnuxs">PUFF</a>!</p>
<p>So, here is the version I came up with.</p>
<div style="text-align: center"><a class="css3-button" href="http://forestmist.org/share/code/php-sort-by-folder/demo/">Demo<span></span></a></div>
<h2>Downloads</h2>
<ul>
<li><a href="/share/code/php-sort-by-folder/Sort%20by%20Folder.zip"><strong>Sort by Folder</strong></a> is optimized for easier PHP comprehension.</li>
<li><a href="http://forestmist.org/share/code/php-sort-by-folder/Sort%20by%20Folder%20(with%20HTML).zip"><strong>Sort by Folder (with HTML)</strong></a> contains extra code which adds more information and cleaner formatting to the generated HTML.</li>
</ul>
<h2>How it works</h2>
<p>The most crucial part of all the code you will see inside the demo is the PHP getObjects() function. Without this everything else would be moot so lets go over it in a bit more detail.</p>
<pre class="brush: php; title: ; notranslate">
function getObjects($path) {
    $path .= '/';
    $array = scandir($path); // returns an array of files and folders sorted alphabetically
    $array = array_diff($array, array('.', '..', '.DS_Store', 'Thumbs.db')); // filter out things we don't want

    $return_array = array();

    foreach($array as $item) {
        if(is_dir($path . $item)) {
            $return_array[$item] = getObjects($path . '/' . $item);
        }
    }

    $count = 0;
    foreach($array as $item) {
        if(!is_dir($path . $item)) {
            $return_array[$item] = $item;
            $count++;
        }
    }
    if($count == 0) {
        $return_array[''] = '';
    }

    return $return_array;
}
</pre>
<p><strong>Line 3</strong><br />
Scandir returns an array of mixed folders and files for the path requested. This does not include sub directories.</p>
<p><strong>Line 4</strong><br />
Filter out any undesirables. That means the current &#8216;.&#8217; and parent directory &#8216;..&#8217; although we don&#8217;t want any Mac &#8216;.DS_Store&#8217; or WIndows &#8216;Thumbs.db&#8217; files either.</p>
<p><strong>Line 6</strong><br />
We create a new array called $return_array which will be built up with all the folders and files in the order we want them. Folders first, then files. Both alphabetically.</p>
<p><strong>Line 8-12</strong><br />
Here we loop through each item in our filtered results from scandir. If the item is a directory we set the results of $return_array[$item] to a recursive call of the very same function we are already in. Traveling deeper each recursive call, that means we can handle seemingly infinite directory structures. Neat.</p>
<p>This first loop through <em>only</em> cares about directories which is exactly what puts them first in our $return_array. Files will come next.</p>
<p><strong>Line 14</strong><br />
We set a variable $count to 0 to keep track of how many files we find in the next foreach loop.</p>
<p><strong>Line 15-19</strong><br />
In this second loop we check to make sure the items are not directories and if so return those items while incrementing the $count variable.</p>
<p><strong>Line 21-23</strong><br />
Now that we are finished looping for files we can check our $count variable. If 0 then set $return_array to &#8221;. This can useful later in case we want to do something special for directories without files.</p>
<p><strong>Line 25</strong><br />
Finally, we return whatever we have found. In most cases this means returning an $array to another instance of the function although ultimately the original one will return a completed array to the PHP call outside our function that started it all.</p>
<p>In the demo we can now loop through this nicely ordered array and write out some HTML and CSS, add a sprinkle of JavaScript and we have a real working web app.</p>
<div style="position: absolute; margin-left: -96px;"><a href="http://www.flickr.com/search/?q=elephpant&#038;s=rec"><img src="http://forestmisty.org/wp-content/uploads/2011/06/php-elephant.png" width="65" height="88" style="border-width: 0px; moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;"><img src="http://forestmisty.org/wp-content/uploads/2011/06/php-elephant-nose.png" width="95" height="89" style="border-width: 0px; moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; position: absolute; margin-left: -66px;"></a></div>
<h2>Epilogue</h2>
<p>Once you get your head around recursive loops things become much simpler. Plus you get to worry more about optimizing your code since each loop can be run so many times. It&#8217;s a good problem to have, really.</p>
<p>Anyway, I certainly hope this helps you in your next endeavor. I know I certainly would be lost without all the wonderful code and tutorials shared by others.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/06/php-5-sort-by-folder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Leaving World of Warcraft</title>
		<link>http://forestmist.org/2011/05/leaving-world-of-warcraft/</link>
		<comments>http://forestmist.org/2011/05/leaving-world-of-warcraft/#comments</comments>
		<pubDate>Thu, 26 May 2011 00:00:49 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[World of Warcraft]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1255</guid>
		<description><![CDATA[I enjoy obsession. It heightens the experience, unlocks edge abilities and provides clarity of purpose. Like any state, it can be taken too far but with understanding it can be transformed from affliction to strength. I started World of Warcraft in the beta, many years ago. Before that the strategy games and in one particular [...]]]></description>
			<content:encoded><![CDATA[<div class="story-image" style="background-image: url(http://forestmisty.org/wp-content/uploads/2011/05/Pretty-Waterfall-660x400.jpg);"><a href="http://forestmisty.org/wp-content/uploads/2011/05/Pretty-Waterfall.jpg"></a></div>
<p>I enjoy obsession. It heightens the experience, unlocks edge abilities and provides clarity of purpose. Like any state, it can be taken too far but with understanding it can be transformed from affliction to strength.</p>
<p>I started World of Warcraft in the beta, many years ago. Before that the strategy games and in one particular modem game even told my future wife I loved her for the first time. Warcraft as you see is very much a part of my history.</p>
<p>The game totally catered to my personality. Obsession with game mechanics, leveling, gearing up and endless side goals took their toll. With increasing focus came new levels of things to tweak, endless rewards for a brain that liked certain buttons pushed.</p>
<p>Even worse that the addiction to the game was the reliance on the game in order to socialize with my friends. It didn&#8217;t matter if I got bored of the game, how could I leave my friends? So I would stay a bit longer… maybe it would get better.</p>
<p>But it didn&#8217;t. My level of obsession meant overplaying and burning out. It happened many times. Enough that people would joke, &#8220;oh, when are you coming back&#8221; and &#8220;oh, when are you leaving again&#8221;.</p>
<p>The problem with &#8220;quitting&#8221; WoW was that I wasn&#8217;t. I was postponing, delaying and pausing. Like a reformed drunk who still keeps his liquor cabinet stocked, secured with the flimsiest of locks. Always there… waiting for that tiny moment of failure.</p>
<p>So after a time, I would feel good again. I could try World of Warcraft again but this time I&#8217;d be reasonable. Maybe only an hour a day.</p>
<p>A month later and I&#8217;d be raiding, grinding, dying in real life while my avatars gained everything. Seven to eight hours a day and more on the weekends. A horrible cycle I was deathly aware of yet powerless to break out of.</p>
<p>I&#8217;d improved so many aspect of my life. A tireless optimizer born from a dysfunctional past. Why couldn&#8217;t I break free of WoW? I had made such wonderful gains during my frequent excursions. I wanted to do more, so much more.</p>
<p>The <a title="Leaving World of Warcraft ~ Prelude" href="http://forestmist.org/2011/05/leaving-wow-prelude/">revelation</a> that followed was completely devastating.</p>
<p>After recovering from the initial concept everything became clear. A proper conclusion to WoW. The ending I never had before. Such a simple gesture would set me free.</p>
<p>Getting my virtual affairs in order was a calming. A wonderful time to reflect on all I had done. Soon after, I made sure everyone knew my plans. I would be deleting all my characters. I would not be coming back to World of Warcraft. Reactions were, as you might expect, mixed.</p>
<p>Some people were supportive, others baffled and a few were oddly quiet. I recognize the last state as a valid tactic for dealing with pain so no hard feelings.</p>
<p>It became an event. Come raid with Poof one last time. Come PvP with Foof to celebrate our time together. Come take a screenshot and say goodbye. It was a lovely time of talking, merriment and a celebration of adventures together.</p>
<p>Each one of my characters received their own special ending. Each one a part of my personality and deserving of their own finale. Screenshots of these moments bring me great joy when I reminisce.</p>
<p>Looking back no longer evokes a time wasted, it conjures pleasant memories, shared experiences and pride for all the people I met. So many things we did and so many good times we had.</p>
<p>Looking forward, my gaming experiences do not weaken like I had feared. In fact, they strengthen me.</p>
<p>When you see me coming, I could be Poof the Druid, Foof the Warrior, Old Snake, Commander Shepard or any number of personas that are part of me.</p>
<p>I am a hero, I always was and now that I know, I always will be.</p>
<p>Sincerely,</p>
<p><em>Poof · Foof · Soof · Daniel · Odn · Shepard · Spock · Sgt Dildo · ForestMist · Neptuna · Old Snake</em></p>

<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/soof-dancing-in-the-moonlight/' title='Soof dancing in the moonlight'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Soof-dancing-in-the-moonlight-150x150.jpg" class="attachment-thumbnail" alt="Soof dancing in the moonlight" title="Soof dancing in the moonlight" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-fish-form-vs-golem/' title='Foof - Fish Form vs Golem'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Fish-Form-vs-Golem-150x150.jpg" class="attachment-thumbnail" alt="Foof - Fish Form vs Golem" title="Foof - Fish Form vs Golem" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-fish-form-vs-orca/' title='Foof - Fish Form vs Orca'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Fish-Form-vs-Orca-150x150.jpg" class="attachment-thumbnail" alt="Foof - Fish Form vs Orca" title="Foof - Fish Form vs Orca" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-inflight-vomit/' title='Foof - Inflight Vomit'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Inflight-Vomit-150x150.jpg" class="attachment-thumbnail" alt="Foof - Inflight Vomit" title="Foof - Inflight Vomit" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-looking-good-for-once/' title='Foof - Looking Good for Once'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Looking-Good-for-Once-150x150.jpg" class="attachment-thumbnail" alt="Foof - Looking Good for Once" title="Foof - Looking Good for Once" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-molten-core-hottub/' title='Foof - Molten Core Hottub'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Molten-Core-Hottub-150x150.jpg" class="attachment-thumbnail" alt="Foof - Molten Core Hottub" title="Foof - Molten Core Hottub" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-offroad-kodo/' title='Foof - Offroad Kodo'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Offroad-Kodo-150x150.jpg" class="attachment-thumbnail" alt="Foof - Offroad Kodo" title="Foof - Offroad Kodo" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-ogre-dance-party/' title='Foof - Ogre Dance Party'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Ogre-Dance-Party-150x150.jpg" class="attachment-thumbnail" alt="Foof - Ogre Dance Party" title="Foof - Ogre Dance Party" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-showertime/' title='Foof - Showertime'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-Showertime-150x150.jpg" class="attachment-thumbnail" alt="Foof - Showertime" title="Foof - Showertime" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-and-friends-guild-vs-guild-pvp-party/' title='Foof and Friends - Guild vs Guild PvP Party'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-and-Friends-Guild-vs-Guild-PvP-Party-150x150.jpg" class="attachment-thumbnail" alt="Foof and Friends - Guild vs Guild PvP Party" title="Foof and Friends - Guild vs Guild PvP Party" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foof-and-friends-in-arathi-basin/' title='Foof and Friends in Arathi Basin'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foof-and-Friends-in-Arathi-Basin-150x150.jpg" class="attachment-thumbnail" alt="Foof and Friends in Arathi Basin" title="Foof and Friends in Arathi Basin" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/foop-perfect-landing/' title='Foop - Perfect Landing'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Foop-Perfect-Landing-150x150.jpg" class="attachment-thumbnail" alt="Foop - Perfect Landing" title="Foop - Perfect Landing" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/new-guildmaster-ceremony/' title='New Guildmaster Ceremony'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/New-Guildmaster-Ceremony-150x150.jpg" class="attachment-thumbnail" alt="New Guildmaster Ceremony" title="New Guildmaster Ceremony" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/oohus-pet-mr-belevedere-noms-apples/' title='Oohu&#039;s pet Mr Belevedere Noms Apples'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Oohus-pet-Mr-Belevedere-Noms-Apples-150x150.jpg" class="attachment-thumbnail" alt="Oohu&#039;s pet Mr Belevedere Noms Apples" title="Oohu&#039;s pet Mr Belevedere Noms Apples" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-baby-bear-momma-bear-and-poppa-bear/' title='Poof - Baby Bear, Momma Bear and Poppa Bear'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Baby-Bear-Momma-Bear-and-Poppa-Bear-150x150.jpg" class="attachment-thumbnail" alt="Poof - Baby Bear, Momma Bear and Poppa Bear" title="Poof - Baby Bear, Momma Bear and Poppa Bear" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-flying-chicken/' title='Poof - Flying Chicken'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Flying-Chicken-150x150.jpg" class="attachment-thumbnail" alt="Poof - Flying Chicken" title="Poof - Flying Chicken" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-mechanohog-jump/' title='Poof - Mechanohog Jump'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Mechanohog-Jump-150x150.jpg" class="attachment-thumbnail" alt="Poof - Mechanohog Jump" title="Poof - Mechanohog Jump" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-young-engineer/' title='Poof - Young Engineer'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Young-Engineer-150x150.jpg" class="attachment-thumbnail" alt="Poof - Young Engineer" title="Poof - Young Engineer" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-and-friends-guild-vs-guild-pvp-party/' title='Poof and Friends - Guild vs Guild PvP Party'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-and-Friends-Guild-vs-Guild-PvP-Party-150x150.jpg" class="attachment-thumbnail" alt="Poof and Friends - Guild vs Guild PvP Party" title="Poof and Friends - Guild vs Guild PvP Party" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-and-reydsun-at-the-bank/' title='Poof and Reydsun at the Bank'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-and-Reydsun-at-the-Bank-150x150.jpg" class="attachment-thumbnail" alt="Poof and Reydsun at the Bank" title="Poof and Reydsun at the Bank" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-flying-squid-at-night/' title='Poof Flying Squid at Night'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Flying-Squid-at-Night-150x150.jpg" class="attachment-thumbnail" alt="Poof Flying Squid at Night" title="Poof Flying Squid at Night" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poof-on-a-plane/' title='Poof on a plane'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-on-a-plane-150x150.jpg" class="attachment-thumbnail" alt="Poof on a plane" title="Poof on a plane" /></a>
<a href='http://forestmist.org/2011/05/leaving-world-of-warcraft/poofs-eggs/' title='Poof&#039;s Eggs'><img width="150" height="150" src="http://forestmisty.org/wp-content/uploads/2011/05/Poofs-Eggs-150x150.jpg" class="attachment-thumbnail" alt="Poof&#039;s Eggs" title="Poof&#039;s Eggs" /></a>

]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/05/leaving-world-of-warcraft/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Leaving World of Warcraft ~ Prelude</title>
		<link>http://forestmist.org/2011/05/leaving-wow-prelude/</link>
		<comments>http://forestmist.org/2011/05/leaving-wow-prelude/#comments</comments>
		<pubDate>Sat, 07 May 2011 22:14:26 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Self Improvement]]></category>
		<category><![CDATA[World of Warcraft]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1235</guid>
		<description><![CDATA[One of the pleasures of maturing is an increased awareness of self. Relaxation, meditation, life experience and even strenuous physical exercise all garner more understanding. Through them you&#8217;ll learn your strengths, weaknesses and core desires. After that, a calming sense of self which aids you in all your tasks. Gains are usually incremental but occasionally [...]]]></description>
			<content:encoded><![CDATA[<div class="story-image" style="background-image: url(http://forestmisty.org/wp-content/uploads/2011/05/Poof-Flight-Form-660x400.jpg);"><a href="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Flight-Form.jpg"></a></div>
<p>One of the pleasures of maturing is an increased awareness of self.</p>
<p>Relaxation, meditation, life experience and even strenuous physical exercise all garner more understanding. Through them you&#8217;ll learn your strengths, weaknesses and core desires. After that, a calming sense of self which aids you in all your tasks.</p>
<p>Gains are usually incremental but occasionally something spectacular will happen.</p>
<hr />
<p><a href="http://forestmisty.org/wp-content/uploads/2011/05/Sleepy-Bear.jpg"><img class="alignnone size-full wp-image-1245" title="Sleepy Bear" src="http://forestmisty.org/wp-content/uploads/2011/05/Sleepy-Bear.jpg" alt="" width="585" height="347" /></a></p>
<p>Poof lay still, the springy couch pushing back up against his rather long body. His mind was drifting quite pleasurably, thoughts flowing fast, free and without judgement. An addictive state which he was well aware of enjoying.</p>
<p>The pace did seem to be accelerating though. &#8220;<em>Ah, well</em>&#8220;, he thought. The all consuming mental fire that could come next was also enjoyable even though it would leave him consumed and tired.</p>
<p><a href="http://youtu.be/lMHAZwR-BdQ">Something was wrong</a> though and in a blinding flash… a revelation. Too clear to unsee, too simple to deny, all at once beautiful and abhorred.</p>
<p>&#8220;<em>No!</em>&#8221; he gasped as his torso shot up from the couch. He couldn&#8217;t breathe. Time seemed to drag on then after a short eternity…  a breath… then another.</p>
<p>Normality slowly, painfully returned as he spat &#8220;<em>no</em>&#8221; several more times. Each utterance with less venom than the last. It seemed to satiate him. A last act of rebellion against destiny revealed.</p>
<p>He knew that to have a chance, a real chance at life he would have to set in motion the unthinkable.</p>
<p>&#8220;<em>Poof must die</em>&#8221; he said with the gravitas of a thousand Sean Connerys.</p>
<p><a href="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Burning-With-Rage.jpg"><img class="alignnone size-large wp-image-1241" title="Poof Burning With Rage" src="http://forestmisty.org/wp-content/uploads/2011/05/Poof-Burning-With-Rage-700x289.jpg" alt="" width="567" height="234" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/05/leaving-wow-prelude/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Perfect MacBook</title>
		<link>http://forestmist.org/2011/02/the-perfect-macbook/</link>
		<comments>http://forestmist.org/2011/02/the-perfect-macbook/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 08:24:09 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Perfection]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1207</guid>
		<description><![CDATA[Jason: I don&#8217;t ah, mean anything by this, but is there any particular reason why it&#8217;s black? Roscoe: Sure, I wanted it to be perfect. There is a scent on the wind, a crisp sweetness that can only be new Apples. Refreshed MacBook Pros most likely but with Apple you never quite know. I used to find their [...]]]></description>
			<content:encoded><![CDATA[<div class="story-image" style="background-image: url(http://forestmisty.org/wp-content/uploads/2011/02/Ice-Pirates-MacBook-660x400.jpg);"><a href="http://forestmisty.org/wp-content/uploads/2011/02/Ice-Pirates-MacBook.jpg"></a></div>
<p style="text-align: center;"><em><span style="color: #808080;">Jason:</span> I don&#8217;t ah, mean anything by this, but is there any particular reason why it&#8217;s black?<br />
</em><em><span style="color: #808080;">Roscoe:</span> Sure, I wanted it to be perfect.</em></p>
<p>There is a scent on the wind, a crisp sweetness that can only be new Apples. Refreshed MacBook Pros most likely but with Apple you never quite know. I used to find their secrecy frustrating but lately I find it refreshing. In these days of massive and constant information leakage its nice to have a respite and ponder the possibilities of what will be unveiled.</p>
<p>What would be the perfect MacBook? It&#8217;s personal and slightly different for everyone. That is one of the beauties of the age we live in. More choice, customization and options than any of our ancestors. It&#8217;s a powerfully overwhelming aphrodisiac of possibilities and one I think is easy to take for granted.</p>
<p>That being said, I think my perfect MacBook would have the following deviations from the current model.</p>
<ul>
<li>Black (because I want it to be perfect like Roscoe&#8217;s robot in <a href="http://www.youtube.com/watch?v=7AJsXMIPeqM">Ice Pirates</a>)</li>
<li>2 Hard Drives (1 SSD, 1 regular)</li>
<li>No Internal Optical Drive</li>
<li>HDMI Port</li>
</ul>
<p>Will the refresh have any of the above&#8230; hmm, I hear there <a href="http://www.tuaw.com/2011/02/21/macbook-pro-rumors-ssd-boot-drive-standard-bigger-trackpad-li/">might be a hybrid drive</a> that keeps the OS in solid-state storage, that certainly sounds juicy. Other items, doubtful. Still, it&#8217;s nice to imagine perfection even if isn&#8217;t easy to obtain.</p>
<p>If you imagine yourself wining the lottery you can further imagine affording a juicy dip into the wells of <a href="http://www.colorwarepc.com/p-224-macbook-pro-15-inch.aspx">Colorware</a> but alas, that is two fantasies glancing at each other across the bar of the mind.</p>
<p>It is far better to flirt with most dreams so you may marshal your abilities to bring life to the few that can become more than mere fantasy.</p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/02/the-perfect-macbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ForestMist Regeneration</title>
		<link>http://forestmist.org/2011/02/forestmist-regeneration/</link>
		<comments>http://forestmist.org/2011/02/forestmist-regeneration/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 07:17:41 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Redesign]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1201</guid>
		<description><![CDATA[I&#8217;ve been making some big changes in my personal life so I felt my website needed to reflect that. Something new, clean and more optimized. It&#8217;s no Muramasa but it&#8217;s definitely a stepping stone towards something even more fantastical. Plans within plans my friend. I think it came out pretty nice. Works perfect in nice browsers like Chrome, FireFox, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been making some big changes in my personal life so I felt my website needed to reflect that. Something new, clean and more optimized. It&#8217;s no <a href="http://en.wikipedia.org/wiki/Muramasa">Muramasa</a> but it&#8217;s definitely a stepping stone towards something even more fantastical. Plans within plans my friend.</p>
<p><a href="http://forestmisty.org/wp-content/uploads/2011/02/ForestMist-Regeneration-2011-02.png"><img class="alignnone size-large wp-image-1202" title="ForestMist-Regeneration-2011-02" src="http://forestmisty.org/wp-content/uploads/2011/02/ForestMist-Regeneration-2011-02-700x414.png" alt="" width="567" height="336" /></a></p>
<p>I think it came out pretty nice. Works perfect in nice browsers like Chrome, FireFox, Safari, Opera and even works well in IE 6, 7 and 8. The nicer browsers will have subtle shadows, rounded corners, bit cleaner lines between items but really that could be considered progressive enhancement. The site is perfectly readable in old busted browsers too. Good job if I do say so myself.</p>
<p>I learned a lot on this project, more so than I had imagined but then again&#8230; good projects always prepare you for the next challenge. I&#8217;m proud to have stuck with it over the course of many days it took.</p>
<p>xoxo</p>
<p>-Daniel</p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2011/02/forestmist-regeneration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sloppy Solder Saves Shaver!</title>
		<link>http://forestmist.org/2010/05/sloppy-solder-saves-shaver/</link>
		<comments>http://forestmist.org/2010/05/sloppy-solder-saves-shaver/#comments</comments>
		<pubDate>Mon, 24 May 2010 04:45:10 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Repair]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1165</guid>
		<description><![CDATA[I&#8217;ve had a Remington Shortcut for quite some time now but lately its been running out of juice after only a few minutes. The blades are in great shape so I thought maybe I could just replace the batteries. In the worst case I&#8217;d have fun taking it apart and in the best case I&#8217;d have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://forestmisty.org/wp-content/uploads/2010/05/Remington-Shortcut-Custom-Fix.jpg"><img class="size-large wp-image-1170 alignnone" title="Remington Shortcut with Eneloop Batteries" src="http://forestmisty.org/wp-content/uploads/2010/05/Remington-Shortcut-Custom-Fix-700x345.jpg" alt="" width="588" height="289" /></a></p>
<p>I&#8217;ve had a <a href="http://www.remington-products.com/manuals/ib_scc100.pdf">Remington Shortcut</a> for quite some time now but lately its been running out of juice after only a few minutes. The blades are in great shape so I thought maybe I could just replace the batteries. In the worst case I&#8217;d have fun taking it apart and in the best case I&#8217;d have a working shaver again.</p>
<p>One of the original batteries looked a bit corroded around a connector and in hindsight I think this was the main problem. I ended up replacing the generic cells with my favorite Eneloops anyway. Rechargeable and hardly any discharge even over a year of storage. Lovely lovely batteries.</p>
<p>I haven&#8217;t soldered in years (and it shows) but I had a lot of fun fixing the shaver. It works great now too. Actually, better. The recharging indicator is once again working and my small tweak to disable the edge clipper mechanism means less resistance on the motor.</p>
<p>Taking apart things to learn how they work is great fun. Sometimes you can even put them back together again. <img src='http://forestmist.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2010/05/sloppy-solder-saves-shaver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Add a password reset feature to Halogen eAppraisal</title>
		<link>http://forestmist.org/2010/04/add-a-password-reset-feature-to-halogen-eappraisal/</link>
		<comments>http://forestmist.org/2010/04/add-a-password-reset-feature-to-halogen-eappraisal/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 05:45:19 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Encryption]]></category>

		<guid isPermaLink="false">http://forestmist.org/?p=1058</guid>
		<description><![CDATA[One really important feature missing from Halogen eAppraisal is the ability for users to reset their own passwords. Seems like such a basic feature but even their friendly support folks confirmed that there was no addon or plan to release the feature in a future version. Weird! No matter though, let&#8217;s make our own. Investigation I spent [...]]]></description>
			<content:encoded><![CDATA[<p>One really important feature missing from Halogen eAppraisal is the ability for users to reset their own passwords.</p>
<p>Seems like such a basic feature but even their friendly support folks confirmed that there was no addon or plan to release the feature in a future version. Weird!</p>
<p>No matter though, let&#8217;s make our own.</p>
<h2>Investigation</h2>
<p>I spent untold amounts of time clawing through unfamiliar Java code. A occasional scrap was enough to forge my determination but nothing really made sense yet. Too many files, too many directories but maybe if I just kept trying&#8230;</p>
<p><a href="http://www.youtube.com/watch?v=8HE9OQ4FnkQ">A-ha</a>!</p>
<p>Hidden deep within the lair of &lt;Tomcat&gt;\webapps\Halogen\WEB-INF\classes\com\halogensoftware\common\security\ is a file called &#8216;Utility.class&#8217;. Inside, a string that resembles the worst regular expression ever created.</p>
<p style="padding-left: 30px;">^a`Z{b1Y}c2X[d3W]e4V|f5U\g6T:h7S;i8R&#8221;j9Q&#8217;k0P&lt;l-O&gt;m=N?n~M,o!L.p@K/q#Jr$Is%Ht^Gu&amp;Fv*Ew(Dx)Cy_Bz+A</p>
<p>I was sure this string was used to encrypt the passwords stored in the database but I needed a way to confirm that so&#8230;</p>
<p>Using a test account I set the password to the number 1 which was encrypted as the letter Y. Password 11 became Y}. Password 111 became Y}c.</p>
<p>Ah, so simple!</p>
<p>If your password was the ^ symbol it would find it in the string above and then move right one space and choose the letter &#8220;a&#8221; as your encrypted password. If your password was ^^ then the the first encrypted character would be &#8220;a&#8221; again but the second one would shift two places to the right and store the ` symbol</p>
<p>Here are a few more example conversions.</p>
<ul>
<li>^^^ becomes a`Z</li>
<li>wT7w becomes (hi)</li>
<li>A+z becomes ^^^</li>
</ul>
<p>Notice that in the last example we&#8217;ve simply looped around once we hit the right side of the hash string.</p>
<p>Now that we know how it works let&#8217;s build our own utility in ASP that we can use to reset anyone&#8217;s password.</p>
<h2>The Solution</h2>
<p>Besides the obvious DSN string, you&#8217;ll want to carefully consider how you validate your users.</p>
<p>The setup I used at work talked to a Human Resources database and would validate no less than three pieces of information before even attempting a reset. I urge you dear reader to do the same.</p>
<pre class="brush: vb; title: ; notranslate">
sID = Request.Form(&quot;id&quot;)
sPassword = Request.Form(&quot;password&quot;)

Set oConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
oConn.Open &quot;DSN String for the Halogen eAppraisal Database&quot;

Set oRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
oRS.Open &quot;SELECT TOP 1 * FROM [view-user_info] WHERE username = '&quot; &amp; sID &amp; &quot;'&quot;, oConn, 0, 3 'adOpenForwardOnly, adLockOptimistic

If not oRS.EOF then
	sKeyCode = &quot;a`Z{b1Y}c2X[d3W]e4V|f5U\g6T:h7S;i8R&quot;&quot;j9Q'k0P&lt;l-O&gt;m=N?n~M,o!L.p@K/q#Jr$Is%Ht^Gu&amp;Fv*Ew(Dx)Cy_Bz+A&quot;
	sKeyCodeLength = Len(sKeyCode)
	x = 1
	sBadChar = 0
	Do until x &gt; Len(sPassword)
		sChar = Mid(sPassword, x, 1)

		If InStr(sKeyCode, sChar) then
			sKeyCodePos = InStr(sKeyCode, sChar) + x
			If sKeyCodePos &gt; sKeyCodeLength then
				'Need to loop around the beginning
				Do until sKeyCodePos &lt;= sKeyCodeLength
					sKeyCodePos = sKeyCodePos - sKeyCodeLength
				loop
			End If
			sEncodeChar = Mid(sKeyCode, sKeyCodePos, 1)
			sEncodePassword = sEncodePassword + sEncodeChar
		Else
			'Could not find a character in sKeyCode
			sBadChar = sBadChar + 1
		End If
		x = x + 1
	loop

	If sBadChar &gt; 0 then
		Response.Write &quot;&lt;p&gt;&lt;strong&gt;Unsupported characters were used to try to set the encrypted password. New password was not saved.&lt;/strong&gt;&lt;/p&gt;&quot;
	Else
		oRS(&quot;password&quot;) = sEncodePassword
		oRS(&quot;password_change_date&quot;) = NULL
		oRS.Update
		Response.Write &quot;&lt;p&gt;The password for your account &quot; &amp; sID &amp; &quot; has been reset.&lt;/p&gt;&quot;
	End If
Else
	Response.Write &quot;&lt;p&gt;&lt;strong&gt;A corresponding account for the user &quot; &amp; sID &amp; &quot; does not exist. Please contact support.&lt;/strong&gt;&lt;/p&gt;&quot;
End If

oRS.Close
oConn.Close
Set oRS = nothing
Set oConn = nothing
</pre>
<p>Questions welcome so feel free to comment below.</p>
<p>See ya later, space cowboy.</p>
]]></content:encoded>
			<wfw:commentRss>http://forestmist.org/2010/04/add-a-password-reset-feature-to-halogen-eappraisal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

