<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>daishar.com</title>
<link>http://www.daishar.com/blog/</link>
<description></description>
<copyright>Copyright 2007</copyright>
<lastBuildDate>Sun, 15 Jul 2007 02:37:43 -0800</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.32</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 

<item>
<title>Gaming backlog</title>
<description><![CDATA[<p>My little brother came out to visit over the 4th of July, and he pointed me to his <a href="http://onehundredpercent.wordpress.com/">new project</a>:  finishing his entire backlog of games.  While I applaud his effort and wish him luck, he's more ambitious than I am.  I have my own backlog (don't we all?), but I just don't have the motivation to take up the gauntlet and work my way through.  There's too much new good stuff out now or coming soon that I'd rather get a taste of it all instead of immersing myself in one game at a time.  That's not to say that I don't get caught up in certain games.  I played <a href="http://forzamotorsport.net/default.html">Forza 2</a> nearly exclusively for all of June, and I continue to play it now.  I just can't see myself focusing what little gaming time I have on going through my stack of games.  Maybe someday ...</p>]]></description>
<link>http://www.daishar.com/blog/archives/2007/07/gaming_backlog.html</link>
<guid>http://www.daishar.com/blog/archives/2007/07/gaming_backlog.html</guid>
<category>games</category>
<pubDate>Sun, 15 Jul 2007 02:37:43 -0800</pubDate>
</item>
<item>
<title>Xbox 360, Live, and NAT update</title>
<description><![CDATA[<p>A little over a year ago, I <a href="http://www.daishar.com/blog/archives/2005/01/xbox_live_linux.html">posted</a> how I fixed some problems I was having with Xbox Live by setting up UPnP on my Linux router.  Since I was finally able to get my hands on an <a href="http://www.xbox.com/en-US/hardware/xbox360/default.htm">Xbox 360</a>, I figured it was time to update my guide on using Live behind a Linux NAT.  The instructions work for both Xbox and Xbox 360, but I'm going to focus on the Xbox 360 configuration this time around.</p>
<p>First things first.  If you don't need to do this, don't do this.  How do you know if you need to do this?  Are you using Linux as a NAT router for your home network?  Does the Xbox 360 report your NAT as moderate?  If so, you probably need to do this.  What is "this"?  Keep reading.</p>
<p>Since the last time I posted, the Linux-IGD project has seen some development, but to look at their <a href="http://linux-igd.sourceforge.net/">home page</a> you wouldn't know it.  Even the <a href="http://sourceforge.net/projects/linux-igd/">Sourceforge page</a> still shows 0.92 as the latest version, having not been updated since January 12, 2003.  All of the recent changes are in their <a href="http://sourceforge.net/cvs/?group_id=52728">CVS repository</a>, though, so we'll build from that instead.  Follow the instructions to checkout linux-igd to your machine.</p>
<p>If you followed my previous post, make sure you've fully uninstalled upnpsdk and linuxigd (a "make uninstall" should be enough for upnpsdk, and for linuxigd you should at least make sure upnpd is not running and remove the /etc/linuxigd directory).  Once you've checked out the CVS project, you'll find a file called INSTALL.  Read that to guide you through installing libupnp-1.2.1.  Make sure you download version 1.2.1 and <b>not</b> version 1.2.1a from the <a href="http://sourceforge.net/project/showfiles.php?group_id=7189">download page</a>.  The INSTALL file is not exactly correct, as you can't just run "make" from the libupnp-1.2.1 root directory.  Instead, go down into the upnp directory under libupnp-1.2.1 and run make there.  This should also build ixml and threadutil at the previous directory level.  Follow the rest of the INSTALL steps, making sure to copy the extra ixml and threadutil libs and includes.  Finally, you can build and install the CVS linux-igd following the steps in the INSTALL file.</p>
<p>Before you fire up upnpd, first take a look through /etc/upnpd.conf and make sure everything is set to your liking.  Some settings I suggest (these should be the defaults):
<ul>
<li>Make sure "iptables_location" points to the path to your iptables binary.  This should default to /usr/sbin/iptables and should already be correct, but double-check to be sure.</li>
<li>debug_mode = 1.  Without this, you're not going to be able to keep tabs on what upnpd is doing.</li>
<li>Make sure the chain names for forward and prerouting are correct for your configuration.  The defaults should usually be right, but it doesn't hurt to double-check.</li>
<li>Set your upstream_bitrate and downstream_bitrate if you really care.  These are in <b>bits</b> per second, not <b>bytes</b>, so make sure you multiply by 8 if you start from bytes per second.  For example, 2 Mega<b>bits</b> per second would be 2097152, but 2 Mega<b>Bytes</b> per second would be 16777216.</li>
</ul>
Now you can fire up upnpd by running "upnpd &lt;external ifname&gt; &ltinternal ifname&gt", where &lt;external ifname&gt; and &lt;internal ifname&gt; depend on your configuration (they are eth0 and eth1 for me, respectively, but yours might be different -- check /sbin/ifconfig if you're not sure).  If all goes well, upnpd will now be running if you look at the process list (I use "ps waux | grep upnpd", and look for entries like "/usr/sbin/upnpd eth0 eth1"), and you should see some messages in /var/log/messages and /var/log/debug.</p>
<p>Now that that's taken care of, start up your Xbox 360 and go to the System blade.  From here, choose Network Settings and then Test Xbox Live Connection.  You'll be prompted that testing the connection will sign out all profiles, so choose Yes and get down to business.  You should now see something like this:
<blockquote><img src="http://www.daishar.com/images/x360/360netsmall.png"></blockquote>
The most important line is the one called "NAT", and it should read "Open", like so:
<blockquote><img src="http://www.daishar.com/images/x360/360natsmall.png"></blockquote>
(For original Xbox users, read my <a href="http://www.daishar.com/blog/archives/2005/01/xbox_live_linux.html">original post</a> for steps to check your NAT level.)  If it doesn't, something went wrong.  On the linux box, run "tail -f /var/log/debug" (if your syslogd is configured to log debug messages somewhere else, tail that log instead -- you can find out what your syslogd will do by looking at /etc/syslog.conf).  When you run the Test Xbox Live Connection troubleshooter, you should see something similar to the following in your log when it gets to the "Xbox Live" portion of the test.
<blockquote><img src="http://www.daishar.com/images/x360/debugmsg.png"></blockquote>
If you don't see that, run "killall upnpd" and then check ps to make sure upnpd has died before restarting it.  Watch the debug log when restarting, and if you see any errors you can look into the Linux-IGD <a href="http://sourceforge.net/forum/forum.php?forum_id=174960">forums</a> to see if you can find some help.  Luckily for me, everything worked great the first time.</p>
<p>By the way, if you have a Windows box behind your NAT, it should now pick up the UPnP gateway device (you may have to install some components through the Add/Remove Programs applet to be able to see UPnP connections, and even if you already have UPnP support installed you'll need to reboot for the OS to pick up the gateway device).  For example, on my XP laptop, I now see this in my Network Connections control panel:
<blockquote><img src="http://www.daishar.com/images/x360/igdxp.png"></blockquote>
From here, you can drill down into the gateway device's Status, then Properties, and finally Settings to see the list of current port mappings.
<blockquote><img src="http://www.daishar.com/images/x360/pmap.png"></blockquote>
If you can't get this working, you can use Noel Danjou's <a href="http://noeld.com/programs.asp?cat=dstools">UPnPTest</a> (about halfway down the page, "Univeral Plug-and-Play Tester") to test your UPnP configuration instead.  Linux-IGD still reports itself as version 0.92, but the CVS version is really something like 1.04 or 1.05 now.</p>
<p>Hopefully this will help out other people trying to get Xbox Live working on their original Xbox or new Xbox 360, since Microsoft doesn't officially support Linux as a NAT router.  If you've had problems and been told to go buy a router off of the official <a href="http://www.xbox.com/en-US/live/connect/routerlanding.htm">compatibility list</a> even though you'd rather continue with your Linux setup, this is for you.</p>
<p>Update:  One minor note that I forgot.  You may need to do a little bit of manual <a href="http://sourceforge.net/forum/forum.php?thread_id=1336675&forum_id=174960">patching</a> of the linux-igd code, if that fix hasn't merged into CVS.  Read that thread, and look in your downloaded code to see if you need to manually patch or not before you actually build.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2006/01/xbox_360_live_a.html</link>
<guid>http://www.daishar.com/blog/archives/2006/01/xbox_360_live_a.html</guid>
<category>games</category>
<pubDate>Sun, 08 Jan 2006 00:53:37 -0800</pubDate>
</item>
<item>
<title>Automatically add Gadgets to Live.com</title>
<description><![CDATA[<p>I found a <a href="http://www.adamkinney.com/note.aspx?id=88">post</a> detailng a new feature on <a href="http://www.live.com">Live.com</a>, making it possible to automate adding a Gadget.  Now I can provide links to add the Analog Clock or Livetris to your Live.com profile.</p>
<p>The following links will open a new window to Live.com and add the respective Gadget.
<ul>
<li><a target=_blank href="http://www.live.com/?add=http://www.daishar.com/gadgets/AnalogClock/AnalogClock.xml">Analog Clock</a></li>
<li><a target=_blank href="http://www.live.com/?add=http://www.daishar.com/gadgets/Livetris/Livetris.xml">Livetris</a></li>
</ul>
</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/11/automatically_a.html</link>
<guid>http://www.daishar.com/blog/archives/2005/11/automatically_a.html</guid>
<category>code</category>
<pubDate>Sat, 19 Nov 2005 21:54:55 -0800</pubDate>
</item>
<item>
<title>Tetris on Live.com - Livetris</title>
<description><![CDATA[<p>For my next Gadget, I give you Livetris.  It's a completely DHTML re-implementation of the classic puzzle game.  It's still pretty basic right now, and only has 10 different speed levels (currently non-configurable, so you have to start at level 1 and work your way up).  Block randomization needs some tweaking, since right now it's all too likely to end up with a long string of crap blocks without the bar or square you need to complete a set of lines.  I also need to do some work on the scoring, as right now there's no bonus for clearing multiple lines at once.  Finally, I'm still tweaking piece colors until I find something I really like, but that's the beauty of a Live.com Gadget -- I can make all of the changes I want, and you'll see that reflected on Live.com without any user intervention.</p>
<p>As with my <a href="http://www.daishar.com/blog/archives/2005/11/livecom_analog.html">Analog Clock Gadget</a>, this one continues to use the awesome <a href="http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm">JavaScript VectorGraphics library</a>.  This is a very robust and powerful tool, and I highly recommend others check it out.</p>
<p><img src="http://www.daishar.com/images/livetris.png"></p>
<p>I plan to eventually put my Gadgets up on the <a href="http://www.microsoftgadgets.com">Microsoft Gadgets</a> site, but for now you can use these installation instructions:
<ol>
<li>Copy <pre>http://www.daishar.com/gadgets/Livetris/Livetris.xml</pre> to your clipboard.</li>
<li>On Live.com, select Add Content on the sidebar and then Advanced.</li>
<li>Paste the Gadget URL into the Add a Gadget by URL textbox.</li>
<li>Select the Add button.</li>
</ol>
</p>
<p>Compatibility notes:  For now, this Gadget is IE-only due to the way I'm handling keyboard input.  I hope to get this working with Firefox soon, but I figured I may as well release what I've got right now.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/11/tetris_on_livec.html</link>
<guid>http://www.daishar.com/blog/archives/2005/11/tetris_on_livec.html</guid>
<category>code</category>
<pubDate>Sat, 19 Nov 2005 18:05:02 -0800</pubDate>
</item>
<item>
<title>Live.com Analog Clock Gadget</title>
<description><![CDATA[<p>With the launch of <a href="http://www.live.com">Windows Live</a> yesterday, I decided I should try my hand at writing a <a href="http://www.microsoftgadgets.com">Gadget</a> (yes, I know <a href="http://www.start.com">Start.com</a> has been doing the Gadget thing for a while, and Live.com is nothing more than a re-branded Start.com).  What better than a simple <a href="http://www.daishar.com/gadgets/AnalogClock/AnalogClock.xml">Analog Clock</a>?  Thanks to the <a href="http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm">JavaScript VectorGraphics library</a> folks for an awesome DHTML drawing library.</p>
<p>The Analog Clock Gadget works with both <a href="http://www.live.com">Live.com</a> and <a href="http://www.start.com">Start.com</a>.</p>
<p><img src="http://www.daishar.com/images/aclock.png"></p>
<p>To install (cribbed from <a href="http://www.microsoftgadgets.com">Microsoft Gadgets'</a> installation instructions):
<ol>
<li>Copy <pre>http://www.daishar.com/gadgets/AnalogClock/AnalogClock.xml</pre> to your clipboard.</li>
<li>On Live.com, select Add Content on the sidebar and then Advanced.</li>
<li>Paste the Gadget URL into the Add a Gadget by URL textbox.</li>
<li>Select the Add button.</li>
</ol>
</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/11/livecom_analog.html</link>
<guid>http://www.daishar.com/blog/archives/2005/11/livecom_analog.html</guid>
<category>code</category>
<pubDate>Wed, 02 Nov 2005 22:38:15 -0800</pubDate>
</item>
<item>
<title>Because of a protocol error, this session will be disconnected.</title>
<description><![CDATA[<p>For some months now, I've not been able to use Microsoft Terminal Server to connect from my laptop to my work desktop.  Oh, I could connect just fine, but then immediately (or very shortly) after logging in I'd be disconnected with the unhelpful error, "Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again."  What does that mean, and what do I do if the error happens again when I try to reconnect as it says?  off to <a href="http://search.msn.com/results.aspx?q=%22Because+of+a+protocol+error%2C+this+session+will+be+disconnected.+Please+try+connecting+to+the+remote+computer+again.%22&FORM=QBHP">search</a> for an answer.  Nothing useful there, and Microsoft's <a href="http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/ServerHelp/83ddcc90-4409-4063-8bac-f5fcb4d1c55b.mspx">help</a> for this message is complete useless.  "Try connecting to the remote computer again. If you receive the same message, contact the server administrator."  Reconnecting caused the same problem, and I'm the administrator.  I tried contacting myself, but I couldn't get through.  Now what?</p>
<p>Today I finally found the solution.  First let me say that this problem is <b>not</b> with a Windows CE machine, nor is it with the web interface to Remote Desktop.  This is a Windows XP to Windows XP session.  Anyway, on to the answer.</p>
<p>I had already ruled out bad patches, bad software installations, and even went through a series of troubleshooting steps to "reset" terminal server.  Out of the blue today, I got the idea that maybe the <a href="http://skins.deviantart.com/windows/visualstyle/">visual style</a> I was using could cause this problem, as it might be a drawing issue that TS can't handle.  I was using the "sgnome" style (don't remember where I got it but I think it was from deviantART originally), so I swapped back to the default Luna style and tried a TS connection.</p>
<p>...</p>
<p>It worked!  Okay, verify it.  Previously, the act of opening an email in Outlook could cause the error, so I tried that.  It still works.  Tried replying to an email, still worked.  Now my TS sessions are rock solid, I'm not getting kicked with a "protocol error", and all I did was change my style back to Luna.  WTF?  Well, I can't live with Luna as it's too boring, so I went searching for a different style.  I settled on <a href="http://www.deviantart.com/deviation/14801572/">Reluna</a>, after verifying that it didn't break anything else.</p>
<p>Why did I think of visual styles?  In the past I've had bad styles that broke other things.  Most notably, I've had some styles that caused really bad rendering problems when opening a scheduled meeting request from Outlook.  If a style can screw that up, it certainly can screw up Terminal Server.  The moral of the story is to be careful when using user-created visual styles.  They're not certified by Microsoft in any way (in fact, you will generally have to hack uxtheme.dll or pay for something like <a href="http://www.tgtsoft.com/prod_sxp.php">StyleXP</a> to use non-Microsoft styles at all), and can do some nasty stuff.  If you do run into random problems that you've never experienced with a previous style, switch back to Classic or Luna as part of your troubleshooting steps, and see if that solves it.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/10/because_of_a_pr.html</link>
<guid>http://www.daishar.com/blog/archives/2005/10/because_of_a_pr.html</guid>
<category>other</category>
<pubDate>Mon, 10 Oct 2005 19:54:00 -0800</pubDate>
</item>
<item>
<title>Depiq script updated for Slashot&apos;s side redesign</title>
<description><![CDATA[<p>I've updated the depiq user script, now <a href="http://www.daishar.com/downloads/userscripts/depiq2.user.js">version 2</a>, to support Slashdot's recent HTML 4.0 + CSS site redesign.  You'll want to remove the old script, as the script name has changed to represent the version update.</p>
<p>While the change is nice, and fixes some weird HTML (why was the first article on a page different than all of the rest), they still haven't made it very nice.  For example, they have a div with an id of "articles", which you would think contains a bunch of articles.  That it does, but it also contains storylinks (the "Read more" links under each article) and some other crap.  Why doesn't an article encompass its own storylinks?  Why are there other bits at the end of the div, like the "Yesterday's news" link?  Oh well, I'll keep at it so long as they keep posting Roland stories.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/09/depiq_script_up.html</link>
<guid>http://www.daishar.com/blog/archives/2005/09/depiq_script_up.html</guid>
<category>userscripts</category>
<pubDate>Thu, 22 Sep 2005 21:59:59 -0800</pubDate>
</item>
<item>
<title>Depiq user script update</title>
<description><![CDATA[<p>I've updated the <a href="http://www.daishar.com/downloads/userscripts/depiq.user.js">depiq</a> user script.  I've solved the problem of disembodied "Read More" links (Slashdot's HTML is FUBAR; the first story on a page is encapsulated in a paragraph except for its "Read More" bits, while subsequent stories on a page do not have the same parent paragraph).  Because I'm more confident about the script's capabilities now, I've also changed the include list to handle all slashdot categories.  Internally, I removed the closure (closures are not memory-friendly in IE), refactored the code a bit into functions, and added some logging (through the GM_log() functionality, you'll see it either in the Turnabout console in IE or the Javascript console in Firefox) to track the editor that posted each story that was found and to give a total count of how many stories were removed.  Finally, I can't seem to keep the filenames straight.  I'm sticking with "depiq.user.js" for now.  You may have to uninstall the previous script before installing this new one.</p>
<p>As always, the script has been tested with IE/Turnabout and Firefox/Greasemonkey.  Since this script is just basic DOM walking and manipulation, it should work in Opera 8 as well, but I've not done any testing there.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/07/depiq_user_scri_1.html</link>
<guid>http://www.daishar.com/blog/archives/2005/07/depiq_user_scri_1.html</guid>
<category>userscripts</category>
<pubDate>Tue, 05 Jul 2005 17:19:40 -0800</pubDate>
</item>
<item>
<title>Depiq user script</title>
<description><![CDATA[<p>Since I created a "userscripts" category on my blog, I figured I should post my other user scripts (okay, "user script" singular for now) in this category for easy access.</p>
<p>Here's the <a href="http://www.daishar.com/downloads/userscripts/depiq.slash.user.js">depiq</a> user script.  It removes Roland Piquepaille-submitted stories from the Slashdot home page (exactly why you would want to remove these submissions is explained in the comments of pretty much every Roland-submitted story -- ie, if you have to ask, you probably don't care enough to remove them).  The inclusion list is only the main Slashdot page, so Roland stories will still show up in other sections (you could change the inclusion list, but I haven't tested that).  It's not perfect, thanks to Slashdot's horribly awful HTML code.  You might see some parentless "Read More" links, for example.  That just tells you that the script is working.</p>
<p>Since I'm an Internet Explorer user (gasp!), this script works with both Firefox/Greasemonkey and IE/Turnabout (<a href="http://www.reifysoft.com/turnabout.php">Turnabout</a> is now my choice of Greasemonkey-like IE plugins, since I killed GreasemonkIE -- I really liked that name; maybe Turnabout could rename themselves to GreasemonkIE?).  It might work in Opera 8, but I haven't tested it there.  Feel free to let me know if it does or doesn't work, or update the script to work with Opera.</p>
<p>Any future scripts will be Firefox/Greasemonkey- and IE/Turnabout-compatible.  I'll do my best to support Opera 8, but it's secondary to the other two (sorry, Opera users).</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/07/depiq_user_scri.html</link>
<guid>http://www.daishar.com/blog/archives/2005/07/depiq_user_scri.html</guid>
<category>userscripts</category>
<pubDate>Fri, 01 Jul 2005 01:17:17 -0800</pubDate>
</item>
<item>
<title>Forza statistics user script update</title>
<description><![CDATA[<p>I hacked around a little bit on the <a href="http://www.daishar.com/downloads/userscripts/forza-stats.user.js">forza-stats</a> user script, and ended up with this:
<blockquote>
<img src="http://www.daishar.com/images/fstats2.jpg">
</blockquote>
Changes:
<ul>
<li>Added a "podium percentage" statistic.  This takes the number of 1st, 2nd, and 3rd place finishes (or as I like to call them, "win, place, and show"), and divides them by the total number of races.</li>
<li>Added an onsubmit handler to the gamertag input form.  If you hit enter on the input box, it will act as though you clicked "Set".</li>
<li>Changed the color and opacity of the statistics bar.  I changed it to a greyish color that better fit the Forza theme, and added a slight transparency so that you can see the header graphic obscured by the bar.  Strictly cosmetic, since the bar wasn't obscuring any clickable bits, but it's still a nice change.</li>
<li>Added some nasty browser-detection code so that the bar can be "position: fixed" on Mozilla.  IE doesn't support "position: fixed", and the hacks to support a fixed-like layout assume you have full control over the web page.  Since I really don't want to try to completely re-layout the Forza community pages, I did this hack so that at least Firefox users can have a fixed bar.  I was very hesitant about adding this browser check, since it may completely fail if you've changed Firefox's userAgent string to mimic IE, but I decided it was worth doing because Firefox has reached the point where it's an accepted browser and only really stupid pages require it to identify itself as MSIE.  Worst case, if you've changed Firefox's userAgent to look like MSIE, the statistic bar will be positioned abosolutely at the top of the page rather than as a "floating" fixed element.</li>
<li>Added some cleanup code to unhook onclick and onsubmit handlers.  This is an attempt to help stem IE's javascript memory leaks.  Memory is still leaked, but the forza-stats script should be nicer about not leaking as much memory.</li>
</ul>
I also spent some time seeing if I could make this script work with Opera 8's user scripting support, but reliance on GM_* functions makes this difficult.  I tried using a <a href="http://www.howtocreate.co.uk/operaStuff/userJavaScript.html">script</a> that implements the GM_* functions, but ran into several problems:
<ol>
<li>The GM_getValue implementation in that script is broken.  It's trying to eval the stored value, which doesn't work when storing simple strings.</li>
<li>The GM_xmlhttpRequest "implementation" is simply an aliasing of Opera's XMLHttpRequest object.  That's not enough for a proper implementation of GM_xmlhttpRequest.</li>
</ol>
If those two items in the compatibility script were fixed, or if a different compatibility library was used (I don't normally use Opera, so I don't know what exists in terms of mimicking Greasemonkey functions), forza-stats may work in Opera.  However, given the differing CSS implementations across browsers, the bar itself probably wouldn't look right (Opera supports "position: fixed", but my browser check may not handle Opera properly; the width of the bar may be incorrect; Opera doesn't support the opacity style or the filter style which is used to do opacity in IE; etc).</p>
<p>As before, forza-stats is compatible with both Mozilla/Greasemonkey and IE/Turnabout.</p>
]]></description>
<link>http://www.daishar.com/blog/archives/2005/07/forza_statistic_1.html</link>
<guid>http://www.daishar.com/blog/archives/2005/07/forza_statistic_1.html</guid>
<category>userscripts</category>
<pubDate>Fri, 01 Jul 2005 00:51:24 -0800</pubDate>
</item>
<item>
<title>Forza statistics user script</title>
<description><![CDATA[<p>The Forza team recently launched their <a href="http://community.forzamotorsport.net/live/">online stats</a> for <a href="http://www.forzamotorsport.net/">Forza Motorsports</a>.  The stats are still a bit rudimentary, and there's no way to log in to get a brief overview of your own statistics a la <a href="http://www.bungie.net/Stats/PlayerStats.aspx">Bungie's Halo 2 stats</a>.  However, there is a GET interface to retrieve gamertag details.</p>
<p>Enter <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a>/<a href="http://www.reifysoft.com/turnabout.php">Turnabout</a>.  I wrote a <a href="http://www.daishar.com/downloads/userscripts/forza-stats.user.js">user script</a> to add a bar to the top of the Forza community pages displaying some information about a given gamertag.
<blockquote><img src="http://www.daishar.com/images/fstats.jpg"></blockquote>
The bar displays the current gamertag with a link to its statistic page, and the tag's ELO, 1st place races, 2nd place races, 3rd place races, and total races.  You can refresh your statistics at any time (this currently works best in Firefox with Greasemonkey -- you may have to click Refresh multiple times in IE with Turnabout), check on the statistics of another gamertag (type the tag into the input box and click "Check" to navigate to that tag's stat page), or set your a different gamertag to track (type the tag into the input box and click "Set").  After installation, you'll notice that the bar says "No tag".  You need to set a gamertag for it to watch.</p>
<p>Caveat:  Like Bungie's Halo 2 statistics, the Forza statistics may occasionally be out of sync with the actual Xbox Live data.  This can manifest itself a simply not finding any statistics at all, or finding only partial statistics (ELO, but no race numbers), or it might just not reflect your most recent races (ELO changes, race count increases).  You can try Refreshing the stat bar data, or Checking your gamertag's statistic page to see if the data has been synced up yet.</p>
<p>Hopefully a more robust data source will be available for Forza stats (RSS, please!), and hopefully even more statistics will be forthcoming.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/06/forza_statistic.html</link>
<guid>http://www.daishar.com/blog/archives/2005/06/forza_statistic.html</guid>
<category>userscripts</category>
<pubDate>Sun, 26 Jun 2005 16:50:22 -0800</pubDate>
</item>
<item>
<title>GreasemonkIE replacement</title>
<description><![CDATA[<p>For those who haven't found it yet, <a href="http://www.bhelpuri.net/Trixie/Trixie.htm">Trixie</a> looks like a good replacement for the now-dead GreasemonkIE.  I have no affiliation with the Trixie project, and found it through Michael's <a href="http://www.daishar.com/blog/archives/2005/04/goodbye_to_grea.html#comments">comment</a>.  Thanks for the pointer.</p>
<p>I just played around with Trixie a little bit (<a href="http://www.daishar.com/downloads/GreasemonkIE/scripts/GoogleImagesNF.user.js">fixed</a> the google image no-frame script installed with Trixie).  It looks like it has the same page refresh bug GMIE had.  Maybe that'll be fixed in IE7.  The config options are both better (scripts are automatically installed simply by downloading them into the scripts directory) and worse (scripts seem to be stored globally in program files, which won't work well on multi-user systems or with non-admin users; I couldn't find a way to edit includes/excludes without editing the files directly), but at version 0.2.2 it's looking very good.</p>
<p>Congrats to whoever's behind the Trixie project (I'll reiterate, it's not me), and good luck with the project.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/06/greasemonkie_re.html</link>
<guid>http://www.daishar.com/blog/archives/2005/06/greasemonkie_re.html</guid>
<category>code</category>
<pubDate>Fri, 03 Jun 2005 23:50:11 -0800</pubDate>
</item>
<item>
<title>Goodbye to GreasemonkIE</title>
<description><![CDATA[<p>I have to kill this project.  I have no time to work on it, and I can't open the source, so I'm going to let it die.  The concepts behind GreasemonkIE are not novel (considering it's a "port" of <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a>), and building a managed BHO is well-documented already.  <a href="http://www.joesapt.net/archive/2005/03/31/12.00.00/">Joe's Apt</a> has a good set of links on this topic, most of which I found independently to help me build a managed BHO.  If you're interested in building your own managed BHOs, those links are an excellent place to start.</p>
<p>Hopefully some other enterprising developer can make user scripts for IE a reality, but unfortunately that developer cannot be me.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/04/goodbye_to_grea.html</link>
<guid>http://www.daishar.com/blog/archives/2005/04/goodbye_to_grea.html</guid>
<category>code</category>
<pubDate>Sat, 09 Apr 2005 17:21:31 -0800</pubDate>
</item>
<item>
<title>GreasemonkIE update</title>
<description><![CDATA[<p>New <a href="http://www.daishar.com/downloads/GreasemonkIE/greasemonkie.msi">update</a> for GreasemonkIE!</p>
<p><b>Changes:</b>
<ul>
<li>Added an interface to load user scripts.  No more XML modification.  Download your script first, and then open "Tools -&gt;Add User Script..." to load the script into GreasemonkIE.  I still haven't hooked up to the context menu.</li>
<li>Added <a href="http://codeguru.earthweb.com/Csharp/.NET/net_general/article.php/c4671/">Tony Juricic's</a> mscoree.dll wrapper, so now explorer.exe doesn't hold onto the GreasemonkIE assembly.</li>
</ul>
To upgrade, remove the old MSI (either using "<code>msiexec /x greasemonkie.msi</code>" from wherever you downloaded the MSI, or through Add/Remove Programs) and install this new one.</p>
<p>As a bonus, I've written my first brand-new user script:  <a href="http://www.daishar.com/downloads/GreasemonkIE/scripts/depiq.slash.user.js">De-Piquepaille Slashdot</a>.  This script removes Roland Piquepaille-submitted stories from the <a href="http://slashdot.org">Slashdot</a> front page (I wrote it on a whim).  Tested with Greasemonkey and GreasemonkIE.</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/03/greasemonkie_up_1.html</link>
<guid>http://www.daishar.com/blog/archives/2005/03/greasemonkie_up_1.html</guid>
<category>code</category>
<pubDate>Thu, 31 Mar 2005 22:00:00 -0800</pubDate>
</item>
<item>
<title>Greasemonkey for Internet Explorer - GreasemonkIE</title>
<description><![CDATA[<p>Lately, I've been working on a side project to bring the <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a> concept of <a href="http://dunck.us/collab/GreaseMonkeyUserScripts">user scripts</a> to Internet Explorer.  Thus, GreasemonkIE.  It's still in a very early state, and I haven't had a chance to get in all of the functionality that I'd like.  However, I feel that it's far enough along that I can put out there for others to use.  You can download it <a href="http://www.daishar.com/downloads/GreasemonkIE/greasemonkie.msi">here</a>.  It's packaged as a Windows Installer.  You'll need to restart IE after it's installed (you may need to close IE before installation).  There's no gui interaction so once the progress dialog goes away, it's done.</p>
<p><b>Known issues:</b>
<ul>
<li>There's no nice way to install user scripts.  For now, you'll have to do that by hand (see below).  I'm working on adding an entry to the IE context menu for anchor tags, but that's not as clean as I'd like (only scripts can be added to IE context menus, so rather than adding an entry that calls a method in the BHO directly, I have to add an entry that calls a script that instantiates a COM class in the BHO that adds a script, and that's been causing some problems).  Alternatively, I may just provide a GUI that will let you add already-downloaded scripts to GreasemonkIE.</li>
<li>GreasemonkIE is written as a BHO, so you may get warnings from some anti-spyware software.  If it prompts you for confirmation, allow it to install.</li>
<li>Since GreasemonkIE is written in C#, you'll need to install the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=a8f5654f-088e-40b2-bbdb-a83353618b38&displaylang=en">.NET framework</a> if you don't already have it.</li>
<li>Also because GreasemonkIE is written in C#, I haven't yet found a good way to stop explorer.exe from loading the BHO.  This means that you may have problems uninstalling GreasemonkIE if you've opened any Explorer windows (iexplore.exe will release the assembly reference when it's closed, but explorer.exe will not because it doesn't close until you log out or reboot).  Logging out or rebooting will allow you to uninstall GreasemonkIE.</li>
<li>User scripts aren't re-applied if you refresh a web page.  Internet Explorer doesn't fire the OnDocumentComplete event for page reloads, and I haven't had a chance to investigate other options.</li>
</ul>
</p>
<p><b>Installing user scripts:</b>  GreasemonkIE should write an XML file under your user's application data directory ("C:\Documents and Settings\username\Application Data\GreasemonkIE\greasemonkie.xml", for example).  If the folder or XML file doesn't exist, you can create them by hand.  To install a new user script, add a new &lt;script&gt; node to greasemonkie.xml under the &lt;scripts&gt; node.  For example, to install a user script "inline.player.user.js" that was downloaded to "C:\documents and settings\username\Application Data\GreasemonkIE\scripts\", add the following XML:
<blockquote>&lt;script fileName="c:\documents and settings\username\Application Data\GreasemonkIE\scripts\inline.player.user.js" enabled="true" /&gt;</blockquote>
GreasemonkIE will pick up any changes to the greasemonkie.xml file and load them on the next page load.  Once you've installed some user scripts, you can manage them (includes, excludes, enabled, uninstall) from the "Manage User Scripts..." entry in IE's Tool menu.</p>
<p>I've included <a href="http://glazkov.com/blog/">Dimitri Glazkov's</a> <a href="http://sourceforge.net/projects/html-xpath/">html-xpath.js</a> script with GreasemonkIE, which supports a good bit of the <a href="http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/">DOM Level 3 XPath</a> implementation, but it's by no means perfect.  It's also quite slow, so I'd recommend avoiding user scripts that use xpath queries.  Also, due to inherent differences in the Javascript implementation between IE and FireFox, many <a href="http://dunck.us/collab/GreaseMonkeyUserScripts">user scripts</a> simply will not work with GreasemonkIE.  I've tested some, and here's what I've found:</p>
<p><b>Scripts that work:</b>
<ul>
<li><a href="http://musicplayer.sourceforge.net/greasemonkey/inline.player.user.js">Inline MP3 Player</a> - works flawlessly</li>
<li><a href="http://downloads.mozdev.org/greasemonkey/linkify.user.js">Linkify</a> - painfully slow on large pages due to html-xpath.js performance issues, but it works</li>
<li><a href="http://artefxdesign.com/greasemonkey/AddNetflixToIMDb.user.js">Add Netflix links to IMDB</a> - works well, but the new link has a target IE doesn't like.  Shift-click the links to make them work (overrides the target)</li>
<li><a href="http://www.cs.mcgill.ca/~abacha/greasemonkey/nomiddleman.user.js">No Middle Man</a> - works well</li>
</ul>
<b>Scripts that don't work:</b>
<ul>
<li><a href="http://persistent.info/greasemonkey/gmail.user.js">Gmail: Adding Persistent Searches</a></li>
<li><a href="http://www.holovaty.com/code/firefox/greasemonkey/google_suggest.user.js">Google Suggest</a> - A previous version worked using setTimeout, but this script was recently updated to use addEventListener instead, which IE's scripting model doesn't support.  I ran into this on a few other scripts, and I may be able to build a work-around to support addEventListener.</li>
<li>(I didn't try a whole lot of scripts, so just because this section is small doesn't mean most scripts work)</li>
</ul>
In general, scripts that use XPath queries may work but slowly.  Scripts that don't use any FireFox-specific script code should work perfectly.  Scripts that do won't work at all.  As with xpath support, I may be able to build work-arounds for many of these issues, but others will never work.</p>
<p>Enjoy!</p>]]></description>
<link>http://www.daishar.com/blog/archives/2005/03/greasemonkey_fo.html</link>
<guid>http://www.daishar.com/blog/archives/2005/03/greasemonkey_fo.html</guid>
<category>code</category>
<pubDate>Tue, 29 Mar 2005 21:18:26 -0800</pubDate>
</item>


</channel>
</rss>