<?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>DanKohn.com</title>
	<atom:link href="http://www.dankohn.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dankohn.com</link>
	<description>Freedom of the press belongs to those who own one. - A.J. Liebling</description>
	<lastBuildDate>Tue, 10 Jun 2008 21:57:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>The Linux desktop needs to be pre-installed</title>
		<link>http://www.dankohn.com/archives/349</link>
		<comments>http://www.dankohn.com/archives/349#comments</comments>
		<pubDate>Tue, 10 Jun 2008 21:57:57 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.dankohn.com/archives/349</guid>
		<description><![CDATA[I believe that regular users (i.e., non-developers) are unlikely to start using Linux on the desktop until they can get it pre-installed. The reality is that all OS upgrades are a nightmare. Lots of people had horrible failures when trying to upgrade from XP to Vista, and even the Tiger to Leopard upgrade on OS [...]]]></description>
				<content:encoded><![CDATA[<p>I believe that regular users (i.e., non-developers) are unlikely to start using Linux on the desktop until they can get it pre-installed.  The reality is that all OS upgrades are a nightmare.  Lots of people had horrible failures when trying to upgrade from XP to Vista, and even the Tiger to Leopard upgrade on OS X required many users to reformat their hard drives.  Given that Linux is a completely independent OS (and, unlike OS X, needs to work across a wide range of hardware), it&#8217;s no surprise that upgrading to Linux is so (deservedl) daunting.</p>
<p>That&#8217;s why I&#8217;m excited about news about the new &#8220;tweener&#8221; category of mini-laptops coming pre-installed with Linux, such as this <a href="http://news.cnet.com/8301-10784_3-9960210-7.html">article</a> about Acer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/349/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Roomba positioning challenges</title>
		<link>http://www.dankohn.com/archives/347</link>
		<comments>http://www.dankohn.com/archives/347#comments</comments>
		<pubDate>Sun, 26 Jun 2005 20:38:20 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Technology and Science]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/347</guid>
		<description><![CDATA[The Roomba iRobot looks like an incredibly fun product, though it&#8217;s reviews as a vacuum cleaner have been mediocre. I love, though, that the same technology has military uses: &#8220;The Army has deployed PackBot, a reconnaissance robot from iRobot, to scope out caves and other dangerous locales in Afghanistan and Iraq.&#8221; Clearly, someone has not [...]]]></description>
				<content:encoded><![CDATA[<p>The <a href="http://www.irobot.com/">Roomba</a> iRobot looks like an incredibly fun product, though it&#8217;s reviews as a vacuum cleaner have been mediocre.  I love, though, that the same technology has military <a href="http://news.com.com/Trick+out+your+Roomba/2100-1041_3-5759619.html">uses</a>: &#8220;The Army has deployed PackBot, a reconnaissance robot from iRobot, to scope out caves and other dangerous locales in Afghanistan and Iraq.&#8221;</p>
<p>Clearly, someone has not read enough science fiction/horror, or they would worry about mixups between the vacuum cleaner firmware and the blow up the Taliban firmware.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/347/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing filtered mailing lists on Bloglines</title>
		<link>http://www.dankohn.com/archives/345</link>
		<comments>http://www.dankohn.com/archives/345#comments</comments>
		<pubDate>Sun, 17 Apr 2005 17:50:28 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/345</guid>
		<description><![CDATA[There are a lot of mailing lists out there that occasionally discuss an area of interest, but don&#8217;t necessarily have a great signal-to-noise ratio. I generally want to filter them by either sender or for keywords in the body, and trash the rest of the messages. I also prefer to have the filtered messages forwarded [...]]]></description>
				<content:encoded><![CDATA[<p>There are a lot of mailing lists out there that occasionally discuss an area of interest, but don&#8217;t necessarily have a great signal-to-noise ratio.  I generally want to filter them by either sender or for keywords in the body, and trash the rest of the messages.  I also prefer to have the filtered messages forwarded to a <a href="http://www.bloglines.com">Bloglines</a> email subscription, where they fit in nicely with the rest of my RSS feeds.  (The only downside to this approach is that Bloglines doesn&#8217;t thread messages, but that tends not to be important since I&#8217;m just pulling out certain messages anyway.)</p>
<p>Here are the procmail scripts that let me do this.  Note that Bloglines should really add this filtering capability directly as part of the their aggregation services.<br />
<span id="more-345"></span><br />
I&#8217;m watching the development of the new <a href="kerneltrap.org/mailarchive/15/overview/thread">git</a> source code management system by the Linux kernel hackers.</p>
<p>This rule fires on mail from that list, forwards mail from any of 3 posters who tend to be particularly insightful, and trashes the rest:</p>
<pre>
:0
* ^X-Mailing-List:.*git@vger\.kernel\.org
  {
   :0
   * ^From:.*torvalds@osdl\.org|\
     ^From:.*junkio@cox\.net|\
     ^From:.*pasky@ucw\.cz
   ! dankohn.1234567@bloglines.com

   :0
   /dev/null
  }
</pre>
<p>This one looks for certain words in the body of messages to a Yahoo Group and forwards them to two different Bloglines accounts:</p>
<pre>
:0
* ^List-Unsubscribe:.*&lt;mailto:groupname-unsubscribe@yahoogroups\.com&gt;
  {
   :0
   * B ?? word1|word2|word3
   ! dankohn.7654321@bloglines.com, otherperson.9876543@bloglines.com

   :0
   /dev/null
  }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/345/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google AdSense doesn&#8217;t honor their policy on inappropriate content</title>
		<link>http://www.dankohn.com/archives/344</link>
		<comments>http://www.dankohn.com/archives/344#comments</comments>
		<pubDate>Wed, 06 Apr 2005 17:26:37 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/344</guid>
		<description><![CDATA[First, let me make clear that I think Google AdSense is one of the most extraordinary services on the web and is hugely important in making large parts of the web sustainable over time. It&#8217;s a new service that they&#8217;re constantly enhancing, and so I expect them to fix this problem eventually. The issue today, [...]]]></description>
				<content:encoded><![CDATA[<p>First, let me make clear that I think Google AdSense is one of the most extraordinary services on the web and is hugely important in making large parts of the web sustainable over time.  It&#8217;s a new service that they&#8217;re constantly enhancing, and so I expect them to fix this problem eventually.  The issue today, though, is that Google AdSense displays ads that are inappropriate and even dangerous given the page&#8217;s content, and offers no way to fix the problem.</p>
<p>I administer <a href="http://www.pwsnotes.org">PWS Notes</a>, which is an informational and support site about the rare genetic disorder Prader-Willi Syndrome (PWS).  The site provides a variety of useful information about treatments, medical research, support groups, etc.  In 2000, PWS sufferers were granted FDA approval for use of Human Growth Hormone (HGH) to help treat the severe obesity associated with the disease.  Therefore, there are pages on the site about <a href="http://www.pwsnotes.org/HGH">HGH</a>, and  over time, many pages are likely to mention it, such as <a href="http://www.pwsnotes.org/User:PWSMom">this one</a> about a child&#8217;s progress.  All proceeds from Google AdSense are being donated to the <a href="http://www.pwsresearch.org/">Foundation for Prader-Willi Research</a>.</p>
<p>The problem is that every Google ad regarding HGH appears to be a fairly fraudulent pitch for herbal supplements that they say &#8220;release&#8221; or &#8220;activate&#8221; HGH.  In fact, these advertised products have nothing to do with HGH, which is a very powerful but also quite dangerous drug that is controlled by the FDA.  The issue is the Google ads may confuse (in fact, are designed to confuse) naïve parents to think that these cheap (and, frankly, worthless) herbal supplements are any replacement for physician-prescribed HGH.  You can see the ads <a href="http://www.google.com/custom?domains=pwsnotes.org&#038;q=hgh&#038;sitesearch=pwsnotes.org&#038;sa=Search&#038;client=pub-9708820424478043&#038;forid=1&#038;ie=UTF-8&#038;oe=UTF-8&#038;safe=active&#038;cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BLH%3A96%3BLW%3A81%3BL%3Ahttp%3A%2F%2Fwww.pwsnotes.org%2Fskins%2Fcommon%2Fimages%2Fpws.png%3BS%3Ahttp%3A%2F%2F%3BLP%3A1%3BFORID%3A1%3B&#038;hl=en">here</a>.  Although ads for worthless herbal supplements are legal, they are potentially dangerous in this context.</p>
<p>What Google needs is a tool so that I can set www.pwsnotes.org with a &#8220;-HGH, -GH and -&#8217;growth hormone&#8217;&#8221; regarding Adwords, so that no HGH products will be advertised there.  I believe this would be an example of &#8220;<a href="https://www.google.com/support/adsense/bin/answer.py?answer=9716&#038;ctx=en:contact">Sensitive content filters</a>:  At times, certain ads may not be appropriate to run on all pages. For example, Google automatically filters out ads that would be inappropriate on a news page about a catastrophic event.&#8221; However, the only tool Google offers is block out specific URLs of advertisers.  I did this for 60 of them (4 at a time), but there appears to be an unlimited supply of advertisers, due largely to affiliate sites.</p>
<p>The temporary solution was for me to modify the wiki code to not show any ads on the HGH page.  However, this isn&#8217;t a real fix, because other pages already mention HGH (and it&#8217;s a wiki, so they change over time), and any of those pages may get the same problematic ads.</p>
<p>The temporary fix was a change to my <a href="http://www.dankohn.com/archives/000338.html">previous directions</a>:</p>
<p><code><br />
-&lt;?php include("adsense.php") ?&gt;<br />
+&lt;?php if ($_SERVER['REQUEST_URI'] != "/HGH") include("adsense.php") ?&gt;<br />
</code></p>
<p>Google&#8217;s only reponse was a form letter.<br />
<span id="more-344"></span></p>
<blockquote><p>
Hello Dan,</p>
<p>Thank you for your email. </p>
<p>Regarding the ads themselves, thank you very much for bringing this issue to our attention. Our AdWords specialists review every ad for adherence to AdWords program policies. If the ads in question are in violation of AdWords policies, it will be removed. We appreciate you taking the time to let us know about your concerns.</p>
<p>Regarding filtering, currently, you may not individually filter out specific ads or types of ads. The only way to filter ads from your site is by blocking all ads from that advertiser&#8217;s site. In the future, however, we may enhance this functionality so publishers can retain even more editorial control while still offering diverse advertising content.   </p>
<p>To assist you, you may want to check out our Preview Tool. The Google AdSense preview tool is an addition to the right-click menu for Windows Internet Explorer 6.x which allows you to preview the ads that may show on any web page.</p>
<p>Using the AdSense preview tool, you can visit the destination of an ad to view its content or to add it to your filter list. Clicks and impressions from the preview tool are not applied to the advertiser&#8217;s account. You can click through to the target site without worrying about invalid clicks being generated on your account, and without costing the advertiser for your test clicks.</p>
<p>For additional information, or to download the AdSense preview tool,<br />
please visit https://www.google.com/support/adsense/bin/topic.py?topic=160.</p>
<p>We appreciate your feedback and welcome any additional suggestions on ways we can improve Google AdSense for you.</p>
<p>Please feel free to reply to this email if you have additional questions or concerns.</p>
<p>We&#8217;d also like to encourage you to let us know how we can improve our<br />
customer support. Please take a few minutes to fill out our brief survey at http://www.insightexpress.com/s/Google.asp?uid=0&#038;resetposition=true. </p>
<p>Your input is greatly appreciated.</p>
<p>Sincerely, </p>
<p>Chris<br />
The Google AdSense Team
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/344/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cisco VPN fails after suspend/resume and causes Matlab execution failures</title>
		<link>http://www.dankohn.com/archives/343</link>
		<comments>http://www.dankohn.com/archives/343#comments</comments>
		<pubDate>Mon, 04 Apr 2005 20:30:08 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/343</guid>
		<description><![CDATA[My wife&#8217;s new Toshiba Tecra M3 was hobbled by two major Cisco VPN bugs. The first problem is caused by a bad interaction between the Cisco VPN client and the Intel Wi-Fi driver, which fails to work when resuming from a suspend. The second is that the newest Cisco VPN drivers cause random Matlab execution [...]]]></description>
				<content:encoded><![CDATA[<p>My wife&#8217;s new Toshiba Tecra M3 was hobbled by two major Cisco VPN bugs.  The first problem is caused by a bad interaction between the Cisco VPN client and the Intel Wi-Fi driver, which fails to work when resuming from a suspend.  The second is that the newest Cisco VPN drivers cause random Matlab execution failures while the VPN is connected.  I fixed both bugs and thought others might find the solutions useful.  However, Windows Explorer still crashes occassionally, so I&#8217;m very interested in a new Cisco VPN Client release that fixes both bugs without any side effects.  Having to deal with issues like this is a fairly damning indictment of the whole QA process theoretically employed by the 3 biggest tech companies: Cisco, Intel, and Microsoft.  Each bug separately was a nightmare to diagnose (who would think at first that the Matlab problems could be caused by the VPN?).<br />
<span id="more-343"></span><br />
SUSPEND/RESUME BUG</p>
<p>The suspend/resume error occurs between the last 5 versions (4.0.4 through 4.6.02.0011) of the Cisco VPN client and the Intel(R) PRO/Wireless 2915ABG built-in Wi-Fi running Network Connection Driver 9.0.1.9, dated 2004-10-29.  This is the latest Wi-Fi driver for the Toshiba Tecra M3 running Windows XP SP2.  I can consistently connect to the VPN with this software.  But when I then suspend and resume the laptop, the Wi-Fi no longer works, and therefore the VPN is unable to reconnect.  Specifically, the Wi-Fi can see and get on a local network, and it can pass traffic within the subnet to itself, the router, and another computer.  But it is not able to communicate beyond the router, including not being able to do any DNS lookups.  Choosing Repair for the connection, using ipconfig /release and /renew, and choosing a different network all fail to work.</p>
<p>The problem is caused by corruption in the route tables, which store the Default Gateway.  When the VPN is active, this gateway is correctly set to the VPN server, which is 199.9.0.41 in my case.  The problem is that when the laptop comes back from a suspend/resume, the VPN Client loses the connection, but it does not restore the Default Gateway to the IP address of my local router, which is 192.168.200.1.  At that point, all network connections besides pinging nodes on my local subnet fail, since the computer can&#8217;t talk through the router.  VPN reconnection also fails since the VPN server is no longer accessible either.</p>
<p>The quick fix (which is also useful as a fallback), is to create a batch file with two commands (or to just run them from a command window).  &#8220;route -f&#8221; deletes the (incorrect) Default Gateway from the route table.  &#8220;ipconfig /renew&#8221; reconfirms the IP address with the Wi-Fi router, and also restores the correct gateway to the route table.  You can create a batch file by right-clicking on the Desktop, selecting New Text File, naming it &#8220;networkfix.bat&#8221; and hitting enter, right-clicking the file and selecting edit, enter the two commands on two lines, and close and save.  Run it by double-clicking.</p>
<p>The more permanent fix is to lower the interface metric for the Wi-Fi so that its Default Gateway is ranked higher.  However, this seems to occasionally result in Windows Explorer crashing after a suspend/resume.  (If Explorer crashes, hit Ctrl-Alt-Del, choose Task Manager, select File: New Task (Run&#8230;), type Explorer, and hit enter.)  Interface metric is a measure of cost, so lower is better.  The default is 30.  When the Cisco VPN is connected to the VPN server, it sets the metric to 1, which is the highest priority.  After disconnection, when the Cisco VPN incorrectly adds the VPN server as a gateway, it sets the metric to 10.  So, by setting the Wi-Fi router metric to 5, we can have it be lower priority than the VPN gateway when connected to the VPN but higher when we are not, which is the correct behavior.  To do this, right-click the Wi-Fi icon on the System tray, choose Status, click Properties, select Internet Protocol (TCP/IP), click Properties, click Advanced, unclick Automatic metric, enter 5, and hit OK twice and Close once.  More details, including the route tables, are below.</p>
<p>The real fix is for Cisco and Intel to get their drivers to work together.  And, of course, Microsoft should not be using a driver architecture that occasionally causes Windows Explorer to crash.</p>
<p>MATLAB/CISCO VPN BUG</p>
<p>The Matlab problem occurs with the two newest Cisco VPN Client versions, 4.6.01.0019 and 4.6.02.0011, and Matlab 7.0.4.365 (R14SP2).  Matlab will fail to execute while they are connected, and even worse, will throw a variety of different errors each time it is run.  The Matlab runs complete correctly when the Cisco VPN Client is running but disconnected.  The problem was fixed by uninstalling the buggy versions and then installing Cisco VPN 4.0.5(B), and also does not occur with versions 4.0.5 and 4.0.4.  I&#8217;ve never seen a network driver bug cause random errors in a regular program, particularly one that shouldn&#8217;t even be accessing the network.</p>
<p>Here are the Matlab errors from 3 sequential runs where Cisco VPN 4.6.02.0011 was connected:</p>
<p>Run 1:<br />
??? Subscript indices must either be real positive integers or logicals.</p>
<p>Error in ==> sortrows>sort_back_to_front at 162<br />
    ndx = ndx(ind);</p>
<p>Error in ==> sortrows at 123<br />
	    ndx = sort_back_to_front(x_sub);</p>
<p>Error in ==> griddata at 75<br />
sxyz = sortrows([x y z],[2 1]);</p>
<p>Error in ==> put_ncom at 157<br />
   zic(:,:,k)=griddata(lon_roms,lat_roms,zi2(:,:,k),lon6,lat6,&#8217;nearest&#8217;);</p>
<p>Run 2:<br />
??? NaN&#8217;s cannot be converted to logicals.</p>
<p>Error in ==> interp1 at 142<br />
   if eqsp</p>
<p>Error in ==> put_ncom at 180<br />
si_z(ii,jj,:)=interp1(z_in,s_in,z_out,&#8217;nearest&#8217;,'extrap&#8217;);</p>
<p>Run 3:<br />
??? Attempted to access cmsk(-2.14748e+009,55); index must be a positive integer or logical.</p>
<p>Error in ==> creep at 37<br />
            if (cmsk(i,j) < 0.5) </p>
<p>Error in ==> put_ncom at 164<br />
[sic2(:,:,k)]=creep(sic(:,:,k),n_lon,n_lat,iter);</p>
<p>ROUTE TABLES FOR SUSPEND/RESUME BUG</p>
<p>The route tables are on the Usenet <a href="http://groups-beta.google.com/group/comp.dcom.sys.cisco/browse_frm/thread/e304341499daf83f/eb0b39fa5d7ed6c4#eb0b39fa5d7ed6c4">posting</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/343/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Training SpamAssassin with a LearnAsSpam IMAP folder</title>
		<link>http://www.dankohn.com/archives/342</link>
		<comments>http://www.dankohn.com/archives/342#comments</comments>
		<pubDate>Sat, 19 Mar 2005 18:22:38 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/342</guid>
		<description><![CDATA[I&#8217;ve found that many installations of SpamAssassin work well, but end-users don&#8217;t optimize them to train their Bayesian filters on false negatives (i.e., spams that get through). A LearnAsSpam IMAP folder is a great solution for this, which even works with Exchange users (they just need IMAP turned on at the server). I wrote up [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve found that many installations of SpamAssassin work well, but end-users don&#8217;t optimize them to train their Bayesian filters on false negatives (i.e., spams that get through).  A LearnAsSpam IMAP folder is a great solution for this, which even works with Exchange users (they just need IMAP turned on at the server).</p>
<p>I wrote up directions for installing this on the SpamAssassin <a href="http://wiki.apache.org/spamassassin/SingleUserUnixInstall#head-bea6b8dc4f219edd3b9976e8f922a8f1c0603125">wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/342/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Link to NYT Single Page format</title>
		<link>http://www.dankohn.com/archives/341</link>
		<comments>http://www.dankohn.com/archives/341#comments</comments>
		<pubDate>Sat, 19 Mar 2005 05:22:25 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/341</guid>
		<description><![CDATA[It&#8217;s a trivial annoyance, but I&#8217;ve never liked that the default for viewing NYT articles is a multi-page format. Whenever I start an article, I always click on the Single Page icon so that I can digest the rest of the article without waiting for any page reloads. Now, with the the Firefox extension Greasemonkey, [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s a trivial annoyance, but I&#8217;ve never liked that the default for viewing NYT articles is a multi-page format.  Whenever I start an article, I always click on the Single Page icon so that I can digest the rest of the article without waiting for any page reloads.  Now, with the the Firefox extension <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a>, this is done for me.  I still prefer Single Page view to Print view, because it includes pictures and occasionally links to popup sidebars.  Besides, with <a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;id=10">Adblock</a> installed, I never see any advertisements.</p>
<p>Here&#8217;s the <a href="http://www.dankohn.com/software/nytsinglepage.user.js">script</a>, which is based on one for Print pages from <a href="http://neugierig.org/software/greasemonkey/">Evan Martin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/341/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Google AdSense to MediaWiki 1.4</title>
		<link>http://www.dankohn.com/archives/340</link>
		<comments>http://www.dankohn.com/archives/340#comments</comments>
		<pubDate>Fri, 18 Mar 2005 01:34:17 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/340</guid>
		<description><![CDATA[More publishers are becoming familiar with AdSense as a revolutionary business technology for monetizing eyeballs (i.e., for generating revenue from the viewers that spend time perusing your site). Here are the directions for adding AdSense to your MediaWiki 1.4 installation. You can see the results at PWS Notes, a wiki on a rare genetic disorder [...]]]></description>
				<content:encoded><![CDATA[<p>More publishers are becoming familiar with AdSense as a revolutionary business technology for monetizing eyeballs (i.e., for generating revenue from the viewers that spend time perusing your site).  Here are the directions for adding AdSense to your MediaWiki 1.4 installation.  You can see the results at <a href="http://www.pwsnotes.org/Main_Page">PWS Notes</a>, a wiki on a rare genetic disorder that I administer for my sister-in-law.  I&#8217;m only using text ads and I place them under the rest of the options in the navigation column, so as to be fairly unobtrusive.</p>
<p>This info was inspired by these <a href="http://mail.wikipedia.org/pipermail/mediawiki-l/2004-August/001087.html">directions</a>, which work for Mediawiki 1.3 but not for 1.4.  Note that if you use the <a href="http://www.dankohn.com/archives/000337.html">highly recommended</a> Firefox extension <a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&amp;version=1.0&amp;os=Windows&amp;id=10">Adblock</a>, you need to hit Shift-Ctrl-B first to disable it and see the Google ads.<br />
<span id="more-340"></span><br />
First, sign up for <a href="https://www.google.com/adsense/">AdSense</a>; Google takes 2-3 days to review your site.  Now, the changes we are going to make are to the Monobook skin.  We should really make the changes to every skin, but I believe so few users change the default skin that it&#8217;s not really worth the trouble.</p>
<p>In skins/MonoBook.php, we&#8217;re going to replace the MediaWiki based search box with an include call to the file containing the Google search box, and we&#8217;re going to add an include for the AdSense HTML/Javascript.  This diff shows what was removed (with a leading -) and what was added (with a +).:</p>
<p><code><br />
--- MonoBook.php.orig Thu Mar 17 21:08:46 2005<br />
+++ MonoBook.php Thu Mar 17 19:34:52 2005<br />
@@ -125,23 +125,9 @@<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
- &lt;div id="p-search" class="portlet"&gt;<br />
-   &lt;h5&gt;&lt;label for="searchInput"&gt;&lt;?php $this-&gt;msg('search') ?&gt;&lt;/label&gt;&lt;/h5&gt;<br />
-   &lt;div class="pBody"&gt;<br />
-     &lt;form name="searchform" action="&lt;?php $this-&gt;text('searchaction') ?&gt;" id="searchform"&gt;<br />
-       &lt;input id="searchInput" name="search" type="text"<br />
-         &lt;?php if($this-&gt;haveMsg('accesskey-search')) {<br />
-           ?&gt;accesskey="&lt;?php $this-&gt;msg('accesskey-search') ?&gt;"&lt;?php }<br />
-         if( isset( $this-&gt;data['search'] ) ) {<br />
-           ?&gt; value="&lt;?php $this-&gt;text('search') ?&gt;"&lt;?php } ?&gt; /&gt;<br />
-       &lt;input type='submit' name="go" class="searchButton" id="searchGoButton"<br />
-         value="&lt;?php $this-&gt;msg('go') ?&gt;"<br />
-         /&gt; &lt;input type='submit' name="fulltext"<br />
-         class="searchButton"<br />
-         value="&lt;?php $this-&gt;msg('search') ?&gt;" /&gt;<br />
-     &lt;/form&gt;<br />
-   &lt;/div&gt;<br />
- &lt;/div&gt;<br />
+<br />
+&lt;?php include("sitesearch.php") ?&gt;<br />
+<br />
&lt;div class="portlet" id="p-tb"&gt;<br />
&lt;h5&gt;&lt;?php $this-&gt;msg('toolbox') ?&gt;&lt;/h5&gt;<br />
&lt;div class="pBody"&gt;<br />
@@ -163,6 +149,9 @@<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
+<br />
+&lt;?php include("adsense.php") ?&gt;<br />
+<br />
&lt;?php if( $this-&gt;data['language_urls'] ) { ?&gt;&lt;div id="p-lang" class="portlet"&gt;<br />
&lt;h5&gt;&lt;?php $this-&gt;msg('otherlanguages') ?&gt;&lt;/h5&gt;<br />
&lt;div class="pBody"&gt;<br />
</code></p>
<p>Now, here are the contents of sitesearch.php:</p>
<p><code><br />
&lt;div id="p-search" class="portlet"&gt;<br />
&lt;h5&gt;&lt;label for="searchInput"&gt;Search&lt;/label&gt;&lt;/h5&gt;<br />
&lt;div class="pBody"&gt;<br />
&lt;!-- SiteSearch Google --&gt;<br />
&lt;form method="get" action="http://www.google.com/custom" target="_top"&gt;<br />
&lt;table border="0" bgcolor="#ffffff"&gt;<br />
&lt;tr&gt;&lt;td nowrap="nowrap" valign="top" align="left" height="32"&gt;<br />
&lt;a href="http://www.google.com/"&gt;<br />
&lt;img src="http://www.google.com/logos/Logo_25wht.gif"<br />
border="0" alt="Google"&gt;&lt;/img&gt;&lt;/a&gt;<br />
&lt;br/&gt;<br />
&lt;input type="hidden" name="domains" value="pwsnotes.org"&gt;&lt;/input&gt;<br />
&lt;input type="text" name="q" size="15" maxlength="255" value=""&gt;&lt;/input&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td nowrap="nowrap"&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;<br />
&lt;input type="radio" name="sitesearch" value=""&gt;&lt;/input&gt;<br />
&lt;font size="-1" color="#000000"&gt;Web&lt;/font&gt;<br />
&lt;/td&gt;<br />
&lt;td&gt;<br />
&lt;input type="radio" name="sitesearch" value="pwsnotes.org"<br />
checked="checked"&gt;&lt;/i<br />
nput&gt;<br />
&lt;font size="-1" color="#000000"&gt;pwsnotes.org&lt;/font&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;input type="submit" name="sa" value="Search"&gt;&lt;/input&gt;<br />
&lt;input type="hidden" name="client" value="pub-9708820424478043"&gt;&lt;/input&gt;<br />
&lt;input type="hidden" name="forid" value="1"&gt;&lt;/input&gt;<br />
&lt;input type="hidden" name="ie" value="UTF-8"&gt;&lt;/input&gt;<br />
&lt;input type="hidden" name="oe" value="UTF-8"&gt;&lt;/input&gt;<br />
&lt;input type="hidden" name="safe" value="active"&gt;&lt;/input&gt;<br />
&lt;input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;<br />
AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:<br />
0000FF;FORID:1;"&gt;&lt;/input&gt;<br />
&lt;input type="hidden" name="hl" value="en"&gt;&lt;/input&gt;<br />
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<br />
&lt;/form&gt;<br />
&lt;!-- SiteSearch Google --&gt; &lt;/div&gt;<br />
&lt;/div&gt;</p>
<p></code></p>
<p>And adsense.php:</p>
<p><code><br />
&lt;div id="p-advertisement" class="portlet"&gt;<br />
&lt;h5&gt;Advertisement&lt;/h5&gt;<br />
&lt;div class="pBody"&gt;<br />
&lt;script type="text/javascript"&gt;&lt;!--<br />
google_ad_client = "pub-9708820424478043";<br />
google_ad_width = 120;<br />
google_ad_height = 600;<br />
google_ad_format = "120x600_as";<br />
google_ad_channel ="";<br />
//--&gt;&lt;/script&gt;<br />
&lt;script type="text/javascript"<br />
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;<br />
&lt;/script&gt;<br />
(All advertising revenues are donated to the &lt;a href="http://www.pwsresearch.org<br />
/default.html"&gt;FPWR&lt;/a&gt;.)<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
</code></p>
<p>Note that I chose to keep these two files at the top level of the wiki, one directory above skins.  Otherwise, you would have needed to say something like include(&#8220;includes/adsense.php&#8221;).</p>
<p>After making the changes, you often have to hit Shift-Reload to see the results, so as to get your browser not to just show the outdated page from its cache.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/340/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Firefox Extensions</title>
		<link>http://www.dankohn.com/archives/339</link>
		<comments>http://www.dankohn.com/archives/339#comments</comments>
		<pubDate>Thu, 10 Mar 2005 17:31:39 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/339</guid>
		<description><![CDATA[I highly recommend switching to Firefox, which is a much better browser than Internet Explorer. To really get the value, I recommend installing a bunch of extensions. I took the time to go through the ones currently available, and here is what I&#8217;m currently using: Adblock &#8211; Essential extension for removing all banner adds (and [...]]]></description>
				<content:encoded><![CDATA[<p>I highly recommend switching to <a href="http://www.mozilla.org/products/firefox/">Firefox</a>, which is a much better browser than Internet Explorer.  To really get the value, I recommend installing a bunch of extensions.  I took the time to go through the ones currently available, and here is what I&#8217;m currently using:<br />
<span id="more-339"></span><br />
<strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;id=10">Adblock</a></strong> &#8211; Essential extension for removing all banner adds (and even Google AdSense iframes).  Just makes the web a more pleasant place. The only trick is that a small number of pages won&#8217;t render correctly, in which case hit Ctrl-Shift-B to disable (the status is in the bottom right), then Ctrl-R to refresh the page, and then Ctrl-Shift-B to enable again.</p>
<p><strong><a href="http://www.bloglines.com/help/firefox?tip=7">Bloglines</a></strong> &#8211; I highly recommend using <a href="http://www.bloglines.com">Bloglines</a> as a news aggregator to keep track of unread articles from blogs and other periodicals.  The toolkit provides an icon in the status bar shows when there&#8217;s new unread articles.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Linux&#038;category=Bookmarks&#038;numpg=10&#038;id=14">Bookmark synchronizer</a></strong> &#8211; If you use more than one computer, this is a great extension that syncs your bookmarks by uploading them to an FTP folder or WebDAV share and download them at startup.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?id=165&#038;os=Windows&#038;application=firefox&#038;version=1.0.1&#038;go=Go">Checky</a><br />
</strong> &#8211; If you develop websites, you should care about validation to make your pages accessible to the most users.  Checky makes it easy to validate pages.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;id=398">Forecastfox</a></strong> &#8211; Great extension that displays weather icons on the status bar and can rotate through cities of interest.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;id=219&#038;vid=1085">Foxytunes</a></strong> &#8211; Control your music player (such as iTunes) from within Firefox.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;id=173&#038;vid=504">Gmail Notifier</a></strong> &#8211; Status bar icon to let you know if you have new Gmail.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;category=Search%20Tools&#038;numpg=10&#038;id=33">Googlebar</a></strong> &#8211; Provides a Google toolbar.  I right click the toolbar and choose hide by default.  But I&#8217;ll then bring it back if I want to search for text within the current website or use the highlight feature.  Even hidden, I can select any text on a page, right click, and submit the text as a google search.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;category=Developer%20Tools&#038;numpg=10&#038;id=249">Htmlvalidator</a></strong> &#8211; For website development, this integrates the Tidy validator into the View Source command.  I don&#8217;t have it validate all documents by default, since so few documents are valid.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0%20&#038;os=Windows&#038;numpg=10&#038;id=81">Launchy</a></strong> &#8211; No Firefox install should go without this extension.  By default, Firefox doesn&#8217;t stream Windows media files, it fully downloads them before playing.  With Launchy, you just right-click on a WMV or AVI link and can get Launchy to have Windows Media Player stream the content.  I also use Launchy to occasionally open a webpage in Internet Explorer when it&#8217;s not rendering correctly in Firefox.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Linux&#038;category=Blogging&#038;numpg=10&#038;id=324">Livelines</a></strong> &#8211; Livelines makes it easy to subscribe to news feeds, which I do through <a href="http://www.bloglines.com">Bloglines</a>.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;category=Tabbed%20Browsing&#038;numpg=50&#038;id=260">Tab clicking options</a></strong> &#8211; I just use this one to get double clicking on a tab to close it.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;category=Tabbed%20Browsing&#038;numpg=50&#038;id=158">Tabbrowser preferences</a></strong> &#8211; Essential extension for adding tabbed browsing to the Options menu.  I set all links to load in new tabs.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;numpg=50&#038;id=327">Tweak network</a></strong> &#8211; This would be bad for the Internet if everyone used it, but selecting power will significantly improve browsing speeds by enabling more simultaneous connections.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;id=321&#038;vid=1078">Search status</a></strong> &#8211; Great extension for displaying the Google PageRank and Alexa rank of sites you browse, plus does searches for backward links.  An older version would sometimes cause Firefox not to startup correctly, but they seem to have fixed the bug.</p>
<p><strong><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&#038;version=1.0&#038;os=Windows&#038;category=Tabbed%20Browsing&#038;numpg=10&#038;id=436">Sessionsaver</a></strong> &#8211; Great application that restores all the tabs to how you left them if you need to shut down Firefox.</p>
<p><strong><a href="http://spellbound.sourceforge.net/install">Spellbound</a></strong> &#8211; Very powerful, well done spell checker, essential for blog entries, editing wikis, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/339/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indochina</title>
		<link>http://www.dankohn.com/archives/338</link>
		<comments>http://www.dankohn.com/archives/338#comments</comments>
		<pubDate>Mon, 10 Jan 2005 12:25:24 +0000</pubDate>
		<dc:creator>dankohn</dc:creator>
				<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://dankohn.flydash.com/archives/338</guid>
		<description><![CDATA[What Julie and I did for our Christmas vacation.]]></description>
				<content:encoded><![CDATA[<p>What Julie and I <a href="http://www.theworldisyourocean.net/personal/asia.htm">did</a> for our Christmas vacation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dankohn.com/archives/338/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.693 seconds -->
