<?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>kris.kalish.net &#187; Uncategorized</title>
	<atom:link href="http://kris.kalish.net/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://kris.kalish.net</link>
	<description>Musings in Geekery</description>
	<lastBuildDate>Wed, 09 Nov 2011 08:34:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Use Webmail as the Default &#8220;mailto&#8221; Handler in Windows</title>
		<link>http://kris.kalish.net/2011/08/use-webmail-as-the-default-mailto-handler-in-windows/</link>
		<comments>http://kris.kalish.net/2011/08/use-webmail-as-the-default-mailto-handler-in-windows/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 06:45:47 +0000</pubDate>
		<dc:creator>kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kris.kalish.net/?p=270</guid>
		<description><![CDATA[Note: A guide for the impatient is at the bottom. I was trying to configure Internet Explore to use Comcast webmail as the default handler for mailto links recently. As I&#8217;m not really a Windows user, I was appalled at the dreary selection of add-ons for IE and the inconvenience of Windows&#8217; &#8220;Default Programs&#8221; manager. [...]]]></description>
			<content:encoded><![CDATA[<p><i>Note: A guide for the impatient is at the bottom.</i></p>
<p>I was trying to configure Internet Explore to use Comcast webmail as the default handler for mailto links recently. As I&#8217;m not really a Windows user, I was appalled at the dreary selection of add-ons for IE and the inconvenience of Windows&#8217; &#8220;Default Programs&#8221; manager.  From &#8220;Default Programs&#8221; you would expect to be able to pick any application you want to be the &#8220;mailto&#8221; handler, but this is not the case. </p>
<p>I found <a href="http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx">an article describing how to add handlers for any type of URL</a>, and went from there to construct a hack that allows you to use any website as a mailto handler.</p>
<p>It appears the Windows/IE has the following pipeline for handling URLs when they are clicked:</p>
<ol>
<li>The text of the URL is analyzed to infer the protocol (http, ftp, etc)</li>
<li>The registry is searched to see if a handler exists</li>
<li>The handler is invoked in the way specified by the &#8220;open&#8221; key in registry</li>
</ol>
<p>To jump right in, lets set up our own mailto handler.</p>
<p>Start regedit and navigate to the following key: HKEY_CLASSES_ROOT\mailto\Shell\open\command</p>
<p>This key should have a value &#8220;(default)&#8221; that specifies a command to run when a mailto URL is clicked.  If you have outlook installed, it should look something like this:<br />
<code><br />
"C:\PROGRA~2\MICROS~1\Office14\OUTLOOK.EXE" -c IPM.Note /m "%1"<br />
</code></p>
<p>This is simply specifying the location of an executable and the arguments to pass to it.  In this case %1 is referring to the entire URL that was clicked.  So for example, if I were to click a link with the URL &#8220;mailto:bill@microsoft.com&#8221; the %1 would be replaced with the text &#8220;mailto:bill@microsoft.com&#8221;.</p>
<p>Our hack will be to write a batch file that will take this URL, remove the first seven characters (&#8220;mailto:&#8221;), and give the email address to our favorite webmail service in our favorite browser. </p>
<p>Supposing that C:\Users\Kris\handle-email.bat is the location of our custom script, changing the &#8220;(default)&#8221; value to the following would run the script when a mailto URL is clicked.<br />
<code><br />
C:\Users\Kris\handle-email.bat %1<br />
</code></p>
<p>This just leaves making the actual script. Create a file called handle-email.bat and place it somewhere out of the way.  Open it in your favorite text editor and paste the following:<br />
<code><br />
set address=%1<br />
set address=%address:~7%<br />
start iexplore "http://sz0085.wc.mail.comcast.net/zimbra/mail?view=compose&#038;to=%address%"<br />
</code></p>
<p>The first line assigns the arguments provided to the script to the variable called &#8220;address.&#8221; In our set up, this will be things like &#8220;mailto:ie@terriblebrowser.com&#8221;. The second line removes the first seven characters to get rid of the prefix &#8220;mailto:&#8221;. The last line starts IE so that it goes to the URL provided. In this example, it goes to Comcast&#8217;s compose message page and populates the &#8220;To:&#8221; field.  Similar &#8220;magic&#8221; URLs exist for gmail and Windows Live.</p>
<p><i>Other webmail service link formats</i>:<br />
<code></p>
<p>https://mail.google.com/mail/?view=cm&#038;fs=1&#038;to=some@address.com#compose</p>
<p></code></p>
<h3>For the impatient:</h3>
<p>Edit &#8220;(default)&#8221; in HKEY_CLASSES_ROOT\mailto\Shell\open\command to contain the following:<br />
<code><br />
C:\path\to\your\script.bat %1<br />
</code></p>
<p>Make the script:<br />
<code><br />
set address=%1<br />
set address=%address:~7%<br />
start iexplore "http://sz0085.wc.mail.comcast.net/zimbra/mail?view=compose&#038;to=%address%"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://kris.kalish.net/2011/08/use-webmail-as-the-default-mailto-handler-in-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tracking Memory Leaks in C++</title>
		<link>http://kris.kalish.net/2010/04/tracking-memory-leaks-in-c/</link>
		<comments>http://kris.kalish.net/2010/04/tracking-memory-leaks-in-c/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 03:32:30 +0000</pubDate>
		<dc:creator>kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c++]]></category>

		<guid isPermaLink="false">http://kris.kalish.net/?p=216</guid>
		<description><![CDATA[This may be common knowledge for a lot of you, but Valgrind is a dynamic code analysis tool that discovers memory leaks for you. It can tell you exactly where memory that leaked was allocated, from there you can use your intuition to decide where the memory should be freed. The greatest thing is how [...]]]></description>
			<content:encoded><![CDATA[<p>
This may be common knowledge for a lot of you, but <a href="http://valgrind.org">Valgrind</a> is a dynamic code analysis tool that discovers memory leaks for you.  It can tell you exactly where memory that leaked was allocated, from there you can use your intuition to decide where the memory should be freed.
</p>
<p>
The greatest thing is how easy to use it is!  I just removed half a dozen memory leaks from my undergraduate thesis project in about 35 minutes with no prior experience. The only &#8220;trick&#8221; to using Valgrind is ensuring that you compile your project with debugging flags turned on ( &#8220;-g&#8221; for gcc and g++). That will embed line number information in your executable so that Valgrind can generate useful output.
</p>
<p>
The <a href="http://valgrind.org/docs/manual/quick-start.html#quick-start.prepare">Valgrind Quick Start</a> page is by far the best introduction to Valgrind.</p>
]]></content:encoded>
			<wfw:commentRss>http://kris.kalish.net/2010/04/tracking-memory-leaks-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corrections</title>
		<link>http://kris.kalish.net/2009/09/corrections/</link>
		<comments>http://kris.kalish.net/2009/09/corrections/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 20:59:58 +0000</pubDate>
		<dc:creator>kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kris.kalish.net/?p=144</guid>
		<description><![CDATA[I fixed some problems with the post about Boost threads. The example program worked correctly for the most part, but only by accident. I had incorrectly assumed that the join() method started the thread. This is not the case. It&#8217;s a method that blocks until the thread is done. The correct solution would be to [...]]]></description>
			<content:encoded><![CDATA[<p>
I fixed some problems with the post about Boost threads. The example program worked correctly for the most part, but only by accident.  I had incorrectly assumed that the join() method started the thread.  This is not the case.  It&#8217;s a method that blocks until the thread is done.
</p>
<p>
The correct solution would be to make a &#8220;barrier&#8221; which has one method, wait().  When a barrier is constructed, it is initalized with a counter. Each thread calls wait() when it&#8217;s done, decrementing the counter.  When the counter reaches zero, all calls to wait() return. The example in the previous post about Boost threads now uses a barrier.</p>
]]></content:encoded>
			<wfw:commentRss>http://kris.kalish.net/2009/09/corrections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting Bandwidth in Linux</title>
		<link>http://kris.kalish.net/2009/07/limiting-bandwidth-in-linux/</link>
		<comments>http://kris.kalish.net/2009/07/limiting-bandwidth-in-linux/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 07:47:13 +0000</pubDate>
		<dc:creator>kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://kris.kalish.net/?p=126</guid>
		<description><![CDATA[Ever wanted to limit the bandwidth of a single command in Linux? It&#8217;s easy with trickle. You use it to launch the program that you want to restrict and it will provide a modified (restricted) version of sockets. No configuration&#8230; nothing. Here&#8217;s how to install and use it to limit the bandwidth given to Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>
Ever wanted to limit the bandwidth of a single command in Linux? It&#8217;s easy with <a href="http://monkey.org/~marius/pages/?page=trickle">trickle</a>.  You use it to launch the program that you want to restrict and it will provide a modified (restricted) version of sockets.  No configuration&#8230; nothing.
</p>
<p>
Here&#8217;s how to install and use it to limit the bandwidth given to Firefox to 300 KB/sec on Ubuntu:
</p>
<p><code>sudo apt-get install trickle<br />
trickle -d 300 firefox<br />
</code></p>
<p>
Ridiculously easy right?</p>
]]></content:encoded>
			<wfw:commentRss>http://kris.kalish.net/2009/07/limiting-bandwidth-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sweet Bicycle Gear (LightLane)</title>
		<link>http://kris.kalish.net/2009/07/sweet-bicycle-gear-lightlane/</link>
		<comments>http://kris.kalish.net/2009/07/sweet-bicycle-gear-lightlane/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 04:11:08 +0000</pubDate>
		<dc:creator>kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kris.kalish.net/?p=121</guid>
		<description><![CDATA[So, I ride a bicycle a lot and nothing feels quite as uncertain as riding in the dark with a dinky flashing light on your back as your only protection. This little guy (which is still just a prototype) draws lines on either side of you forming a &#8220;bike lane&#8221; around you. I guess the [...]]]></description>
			<content:encoded><![CDATA[<p>
So, I ride a bicycle a lot and nothing feels quite as uncertain as riding in the dark with a dinky flashing light on your back as your only protection.  This <a href="http://www.lightlanebike.com">little guy</a> (which is still just a prototype) draws lines on either side of you forming a &#8220;bike lane&#8221; around you.  I guess the idea is that if there&#8217;s a line to be seen then drivers will obey it.
</p>
<p>
Here is the <a href="http://www.lightlanebike.com">LightLane Website</a>. <br/><br />
The video on the site is broken so you can view it here:  <a href="http://www.youtube.com/watch?v=WOU563OvpUY">http://www.youtube.com/watch?v=WOU563OvpUY</a>
</p>
<p>
Unfortunately, it isn&#8217;t for purchase yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://kris.kalish.net/2009/07/sweet-bicycle-gear-lightlane/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

