<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.2" -->
<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/"
	>

<channel>
	<title>cthrall.com</title>
	<link>http://www.cthrall.com/blog</link>
	<description>Random Tech Thoughts</description>
	<pubDate>Fri, 13 Aug 2010 02:58:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>
	<language>en</language>
			<item>
		<title>Overload Kohana Logging</title>
		<link>http://www.cthrall.com/blog/?p=95</link>
		<comments>http://www.cthrall.com/blog/?p=95#comments</comments>
		<pubDate>Fri, 13 Aug 2010 02:58:12 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=95</guid>
		<description><![CDATA[Need to write Kohana logs somewhere other than the default location? Or send an e-mail or something?
You can use the system.log event to do this.
Put this in your controller:

function custom_log()
{
  error_log(Event::$data[0] . ' ' . Event::$data[1] . ' ' . Event::$data[2]);
}

Event::add('system.log', 'custom_log');

Now when you call Kohana::log, the message will get written out to the [...]]]></description>
			<content:encoded><![CDATA[<p>Need to write Kohana logs somewhere other than the default location? Or send an e-mail or something?</p>
<p>You can use the system.log event to do this.</p>
<p>Put this in your controller:</p>
<pre>
function custom_log()
{
  error_log(Event::$data[0] . ' ' . Event::$data[1] . ' ' . Event::$data[2]);
}

Event::add('system.log', 'custom_log');
</pre>
<p>Now when you call Kohana::log, the message will get written out to the PHP error log.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=95</wfw:commentRSS>
		</item>
		<item>
		<title>Convert Vista/Windows 7 Icon to XP Icon</title>
		<link>http://www.cthrall.com/blog/?p=94</link>
		<comments>http://www.cthrall.com/blog/?p=94#comments</comments>
		<pubDate>Wed, 11 Aug 2010 01:47:02 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=94</guid>
		<description><![CDATA[Starting in Vista, Windows supports 256&#215;256 icons. Icons can also be stored as compressed PNG images.
Unfortunately, XP does not support these icons, so if you want to support XP, you can&#8217;t use them. And your WPF app will throw an XamlParseException with an error message about the image format not being supported.
What if you have [...]]]></description>
			<content:encoded><![CDATA[<p>Starting in Vista, Windows supports 256&#215;256 icons. Icons can also be stored as compressed PNG images.</p>
<p>Unfortunately, XP does not support these icons, so if you want to support XP, you can&#8217;t use them. And your WPF app will throw an XamlParseException with an error message about the image format not being supported.</p>
<p>What if you have icons in the new format and want to use them on XP?</p>
<p>Well, here&#8217;s what I did and it worked:</p>
<ul>
<li>Download <a href="http://www.gimp.org/">the Gimp</a>.</li>
<li>Open your Vista/W7 icon file.</li>
<li>Save As a new icon file.</li>
<li>Uncheck all the &#8220;compressed PNG&#8221; checkboxes. Make sure to scroll down and get them all.</li>
</ul>
<p>There you have it.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=94</wfw:commentRSS>
		</item>
		<item>
		<title>Subversion and Mantis Integration on Windows</title>
		<link>http://www.cthrall.com/blog/?p=93</link>
		<comments>http://www.cthrall.com/blog/?p=93#comments</comments>
		<pubDate>Mon, 26 Jul 2010 14:50:04 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=93</guid>
		<description><![CDATA[We&#8217;re running Subversion (via Apache) and Mantis on Windows. I wanted to allow developers to resolve issues via commit comment. I read this great page about it, and used it as a starting point for Windows integration.
After making Mantis configuration changes as specified in that page, I threw together a SVN post-commit hook that I [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re running Subversion (via Apache) and Mantis on Windows. I wanted to allow developers to resolve issues via commit comment. I read <a href="http://alt-tag.com/blog/archives/2006/11/integrating-mantis-and-subversion/">this great page</a> about it, and used it as a starting point for Windows integration.</p>
<p>After making Mantis configuration changes as specified in that page, I threw together a SVN post-commit hook that I named post-commit.cmd. It looks like this:</p>
<pre>
@echo off
setlocal enableextensions

set SVN_PATH="c:Program Filessvn-win32-1.6.1bin"
set REPOS=%1
set REV=%2
set TEMPFILE=c:temp%REV%.txt

set MANTIS_PATH="c:Program FilesApache Software FoundationApache2.2htdocsmantis"

cd %MANTIS_PATH%scripts

%SVN_PATH%svnlook log -r %REV% %REPOS% > %TEMPFILE%

php checkin.php < %TEMPFILE% > c:post_commit.log
</pre>
<p>Obviously, update the paths to Subversion and Mantis.</p>
<p>Now, when somebody puts &#8220;issue #56&#8243; in a commit comment, a note gets added to the bug in Mantis. When a developer adds &#8220;fixes issue #56&#8243; in a commit comment, the issue also gets set to &#8220;resolved.&#8221;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=93</wfw:commentRSS>
		</item>
		<item>
		<title>Prompted for Credentials When Browsing by FQDN</title>
		<link>http://www.cthrall.com/blog/?p=92</link>
		<comments>http://www.cthrall.com/blog/?p=92#comments</comments>
		<pubDate>Fri, 04 Jun 2010 14:42:37 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=92</guid>
		<description><![CDATA[We have an internal SharePoint site that we recently started browsing to by FQDN. At about the same time, we started getting complaints from users that they were being prompted for credentials.
At first, we thought it was SharePoint, but then I found this article by Microsoft. It looks like WinHTTP doesn&#8217;t check your Trusted Sites [...]]]></description>
			<content:encoded><![CDATA[<p>We have an internal SharePoint site that we recently started browsing to by FQDN. At about the same time, we started getting complaints from users that they were being prompted for credentials.</p>
<p>At first, we thought it was SharePoint, but then I found <a href="http://support.microsoft.com/kb/943280">this article by Microsoft</a>. It looks like WinHTTP doesn&#8217;t check your Trusted Sites before prompting for credentials, even if you&#8217;ve checked &#8220;Automatic logon with current user name and password.&#8221;</p>
<p>I&#8217;m testing it now, and will update this post if I keep getting prompted.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=92</wfw:commentRSS>
		</item>
		<item>
		<title>Resizing Screenshots</title>
		<link>http://www.cthrall.com/blog/?p=91</link>
		<comments>http://www.cthrall.com/blog/?p=91#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:27:31 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=91</guid>
		<description><![CDATA[I&#8217;ve been working on an application that takes a screenshot from a device and displays it in a Windows Forms application that can be resized. Prior to today, we used a PictureBox that was set to StretchImage (the screenshot is surrounded by a picture of the device).
However, new versions of the device return a screenshot [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on an application that takes a screenshot from a device and displays it in a Windows Forms application that can be resized. Prior to today, we used a PictureBox that was set to StretchImage (the screenshot is surrounded by a picture of the device).</p>
<p>However, new versions of the device return a screenshot that is twice as large. Making the new screenshot small then stretching it resulted in a hard to read display.</p>
<p>First off, I changed the code to paint the screenshot in the PictureBox separately, so it wouldn&#8217;t get painted then stretched. Then, I started looking around at sharpening. I found <a href="http://stackoverflow.com/questions/903632/sharpen-on-a-bitmap-using-c">this really helpful article</a>, but the results weren&#8217;t really what I was looking for.</p>
<p>Then I found another post that pointed me towards settings in the Graphics class that can change the output. I used a simple WinForms app with a couple forms displaying the same bitmap with different Graphics settings to subjectively compare the output. This seems to result in the highest quality for text in a resized screenshot (assume g is an instance of Graphics below):</p>
<p><code><br />
g.SmoothingMode = SmoothingMode.None;<br />
g.PixelOffsetMode = PixelOffsetMode.None;<br />
g.CompositingQuality = CompositingQuality.HighQuality;<br />
g.InterpolationMode = InterpolationMode.HighQualityBicubic;<br />
</code>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=91</wfw:commentRSS>
		</item>
		<item>
		<title>IPSEC VPN Client for 64-bit Windows</title>
		<link>http://www.cthrall.com/blog/?p=90</link>
		<comments>http://www.cthrall.com/blog/?p=90#comments</comments>
		<pubDate>Mon, 22 Feb 2010 00:54:08 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=90</guid>
		<description><![CDATA[This is awesome! Here is a VPN client that&#8217;s compatible with a Cisco VPN server running IPSEC you can download for free that is working for me running 64-bit Windows 7.   Thank you ShrewSoft!

]]></description>
			<content:encoded><![CDATA[<p>This is awesome! <a href="http://www.shrew.net/">Here is a VPN client that&#8217;s compatible with a Cisco VPN server running IPSEC</a> you can download for free that is working for me running 64-bit Windows 7. <img src='http://www.cthrall.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thank you ShrewSoft!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=90</wfw:commentRSS>
		</item>
		<item>
		<title>Running Windows 7 on a Shuttle SN45G</title>
		<link>http://www.cthrall.com/blog/?p=89</link>
		<comments>http://www.cthrall.com/blog/?p=89#comments</comments>
		<pubDate>Sun, 21 Feb 2010 00:48:29 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=89</guid>
		<description><![CDATA[I upgraded my lowly Shuttle SN45G PC to Windows 7. It&#8217;s running an Athlon XP 2500+ CPU with just over 1G of RAM.
Amazingly, so far it works pretty well. The graphics card and network adapter worked out of the box, albeit with no support for Aero acceleration. To install the NVidia nForce 2 audio drivers, [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded my lowly Shuttle SN45G PC to Windows 7. It&#8217;s running an Athlon XP 2500+ CPU with just over 1G of RAM.</p>
<p>Amazingly, so far it works pretty well. The graphics card and network adapter worked out of the box, albeit with no support for Aero acceleration. To install the NVidia nForce 2 audio drivers, read these <a href="http://digg.com/microsoft/How_To_Vista_and_Nforce2_With_Full_Driver_Support">two</a> <a href="http://nf2.stuff.googlepages.com/">pages</a>.</p>
<p>To get my old NVidia RIVA TNT2 Model 64 GPU running, I followed the instructions <a href="http://kemovitra.blogspot.com/2009/01/nvidia-riva-tnt2-m64-driver-for-windows.html">on this page</a>. It worked!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=89</wfw:commentRSS>
		</item>
		<item>
		<title>DD-WRT Client Bridge</title>
		<link>http://www.cthrall.com/blog/?p=88</link>
		<comments>http://www.cthrall.com/blog/?p=88#comments</comments>
		<pubDate>Mon, 15 Feb 2010 17:46:05 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=88</guid>
		<description><![CDATA[Our Fios internet connection is on the opposite end of the house from my home office. This weekend, I got a wireless bridge running from the Fios connection to the office. This will allow me to use my Cisco desk phone over a VPN connection to work.
Here&#8217;s how I currently have it configured:
Verizon Fios wifi [...]]]></description>
			<content:encoded><![CDATA[<p>Our Fios internet connection is on the opposite end of the house from my home office. This weekend, I got a wireless bridge running from the Fios connection to the office. This will allow me to use my Cisco desk phone over a VPN connection to work.</p>
<p>Here&#8217;s how I currently have it configured:</p>
<p>Verizon Fios wifi router -wired-> Cisco ASA 5505 -wired-> Linksys WRT54GL -wifi-> Linksys WRT54G V.3</p>
<p>Both Linksys routers are running the latest version of <a href="http://www.dd-wrt.com/site/index">DD-WRT</a>. Installing the new firmware went smoothly on both routers. The one catch on the WRT54GL is I didn&#8217;t let it sit and finish booting, as the wiki instructs. You really have to give it a few minutes.</p>
<p>The WRT54GL is configured as an AP, and the WRT54G is set to be in client bridge mode. The ASA is plugged in to one of the switch ports on the WRT54GL. The result is, any devices connected to the WRT54G will be on the subnet hosted by the ASA.</p>
<p>The only downside I can find thus far is the DHCP and DNS (for the VPN only?) are not forwarded to clients that are physically connected to the WRT54G. When I configure my desktop to have a static IP that is served by the ASA, I have connectivity. When I try DHCP, I don&#8217;t get an IP. From what I can find on the net, some people claim it works for them, while there are descriptions of why it doesn&#8217;t work from others. I&#8217;ll dig deeper into this at some other time.</p>
<p>Since my work laptop connects to the WRT54GL via wifi, DHCP works fine there. And DNS does as well, although I&#8217;m assuming the reason I get DNS resolution for hosts on the extranet and not for hosts served by the VPN is my desktop is not on the work domain, and my laptop is.</p>
<p>Thanks to the DD-WRT team for producing a very impressive open source product!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=88</wfw:commentRSS>
		</item>
		<item>
		<title>Installing GD PHP Extension on a MacBook Pro</title>
		<link>http://www.cthrall.com/blog/?p=87</link>
		<comments>http://www.cthrall.com/blog/?p=87#comments</comments>
		<pubDate>Mon, 01 Feb 2010 14:08:30 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=87</guid>
		<description><![CDATA[I&#8217;ve got XCode installed on my MBP, so you&#8217;ll need that. Then, follow the instructions in this great post.
A couple notes:

You&#8217;ll need to download the Apache PHP mod 44-2 source tarball from the Apple site. This doesn&#8217;t match the PHP build version number in php_info(), but that&#8217;s ok.
Use the 64-bit instructions. Even though PHP info [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got XCode installed on my MBP, so you&#8217;ll need that. Then, follow the instructions <a href="http://www.kenior.ch/macintosh/adding-gd-library-for-mac-os-x-leopard">in this great post</a>.</p>
<p>A couple notes:</p>
<ul>
<li>You&#8217;ll need to download the Apache PHP mod 44-2 source tarball from the Apple site. This doesn&#8217;t match the PHP build version number in php_info(), but that&#8217;s ok.</li>
<li>Use the 64-bit instructions. Even though PHP info said I386, when I used the 32-bit instructions GD was enabled when I ran <code>php -i</code> from the command-line but not from php_info() in a browser.</li>
<li>Add <code>--disable-dependency-tracking</code> to the configure command line for the JPEG library.</li>
</ul>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=87</wfw:commentRSS>
		</item>
		<item>
		<title>VMWare ESXi on a Dell Precision T3400</title>
		<link>http://www.cthrall.com/blog/?p=86</link>
		<comments>http://www.cthrall.com/blog/?p=86#comments</comments>
		<pubDate>Tue, 05 Jan 2010 20:41:18 +0000</pubDate>
		<dc:creator>cthrall</dc:creator>
		
	<category>VMWare</category>
		<guid isPermaLink="false">http://www.cthrall.com/blog/?p=86</guid>
		<description><![CDATA[Back up anything you want to save, as these steps will make permanent changes.

Boot, if you see a RAID configuration screen, hit Ctrl-I to enter setup and remove all drives from the RAID array.
Reboot, enter BIOS setup and make sure your drive configuration is set to &#8220;RAID ATA.&#8221;
While you&#8217;re in the BIOS setup, enable virtualization [...]]]></description>
			<content:encoded><![CDATA[<p>Back up anything you want to save, as these steps will make permanent changes.</p>
<ol>
<li>Boot, if you see a RAID configuration screen, hit Ctrl-I to enter setup and remove all drives from the RAID array.</li>
<li>Reboot, enter BIOS setup and make sure your drive configuration is set to &#8220;RAID ATA.&#8221;</li>
<li>While you&#8217;re in the BIOS setup, enable virtualization in the CPU settings. This will let you create 64-bit virtual guests.</li>
<li><a href="http://communities.vmware.com/message/1048915#1048915">Follow these steps to install VMWare ESXi</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRSS>http://www.cthrall.com/blog/?feed=rss2&amp;p=86</wfw:commentRSS>
		</item>
	</channel>
</rss>
