mac page 6 - Dave's Blog

Search
My timeline on Mastodon

FeedSync 1.0 Spec (formerly known as SSE)

2007 Dec 6, 12:24The spec for FeedSync which allows for synchronizing RSS and Atom files among multiple machines.PermalinkCommentssse rss atom feedsync feed specification microsoft

Windows Media Center and Zune Integration Hack

2007 Nov 28, 1:23One of the new Zune features that had me the most excited was the claimed improved Windows Media Center integration which unfortunately turned out to simply mean support for the Win MCE video format (with an exception for HD). I wanted to be able to pick shows recorded by my Win MCE and have the Zune automatically sync up the latest episodes. However, with the improved podcast support in the Zune software one can easily create a ridiculous hack to accomplish this.

The new Zune software has podcast support which does everything I'd want to do with a Win MCE recorded TV series so the goal is to shoehorn a TV series into a Zune podcast. An overview of the steps: Create an XSLT that converts Win MCE data to a podcast, run the XSLT as a scheduled task every few hours per TV series, setup a Web server pointed at the resulting podcasts and the Win MCE Recorded TV directory, and subscribe to the resulting podcasts in the Zune software.
  1. Reading through the Win MCE data stored as an XML file in "C:\ProgramData\Microsoft\eHome\Recording\Recordings.xml" and the spec for podcasts I created an XSLT to convert a series from Win MCE data to a podcast.
  2. I added a new task to the Scheduled Tasks to run my XSLT using my xsltproc.js script. The task runs a handful of commands that look something like the following:

    C:\windows\system32\wscript.exe C:\users\dave\bin\xsltproc.js C:\Users\Dave\Documents\trunk\development\mce-zune\mce-to-podcast.xslt C:\ProgramData\Microsoft\eHome\Recording\Recordings.xml --param title "The Daily Show With Jon Stewart" --param max 4 --param baseURI "http://groucho/" --param thisRelURI "tds.xml" -o "D:\recorded tv\tds.xml"

    For each TV series I run a command like the above and that outputs a podcast for that series into my "D:\Recorded TV\" directory.
  3. Zune only allows http URIs for its podcasts so I installed a web server on my Win MCE server. I'm running Vista Ultimate so it was quick and easy for me to install IIS7 but any Web server will do. Then I pointed it at "D:\Recorded TV\".
  4. Once all the above was done I just subscribed to the resulting podcasts via my Web server and viola! Since I'm forced to use a Web server I can even run the Zune software on a machine other than my Win MCE server. You can see a screen-shot above of my Zune software showing my Colbert Report podcast.
PermalinkCommentstechnical xml mce hack windows media center zune windows xslt podcast

Bad Science

2007 Oct 29, 1:48FTA: "Ben Goldacre is a medical doctor who writes the Bad Science column in the Guardian, examining the claims of scaremongering journalists, quack remedy peddlers, pseudoscientific cosmetics adverts, and evil multinational pharmaceutical corporations. ThPermalinkCommentsmonthly blog science politics religion media news healthy research humor

FoaF on my Homepage

2007 Oct 14, 3:12I've updated my homepage by moving stuff about me onto a separate About page. Creating the About page was the perfect opportunity to get FoaF, a machine readable way of describing yourself and your friends, off my to do list. I have a base FoaF file to which I add friends, projects, and accounts from delicious using an XSLT. This produces the FoaF XML resource on which I use another XSLT to convert into HTML and produce the About page.

I should also mention a few FoaF pages I found useful in doing this: PermalinkCommentstechnical xml foaf personal xslt xsl homepage

go ahead, mac my day : the Microsoft fallacy

2007 Sep 28, 11:10"The Microsoft fallacy has the following components: If a company has a lot of money, this means that they have sufficient resources to do anything. If a company has a lot of money, every piece of that company has access to all of it. Every large companyPermalinkCommentsarticle microsoft humor mac blog

Backup Notes

2007 Jul 13, 8:30I bought an external backup drive a few weekends ago. I've previously setup a Subversion repository so I decided to move everything into the repository and then back it up. So in went the contents of all of my %USERPROFILE% and ~ directories with a bit of sorting and pruning. Not too much though given its much easier to dump in everything and search for what I want then to take the time to examine and grade each file. What follows are the notes I took while setting this up. It takes me a bit of time to look up the help on each command so I figure I'll write it all down here for the benefit of myself and potentially others...

Setting Up the Backup Drive For Linux
I first changed the filesystem on the drive to ext3. I plugged it into my USB2.0 port and ran fdisk:

sudo fdisk /dev/sda

Useful commands I used to do this follow mostly in order:
m
help
p
print current partitions
d
delete current partition
n
create new partition (I used the defaults)
w
write changes and exit
Then I formatted for ext3.

sudo mkfs.ext3 /dev/sda1

I made it easy to mount:

sudo vim /etc/fstab
# added line to end:
/dev/sda1 /media/backup ext3 rw,user,noauto 0 0

I setup the directory structure on the disk

mount /media/backup
sudo mkdir /media/backup/users
sudo mkdir /media/backup/users/dave
sudo chown dave:dave /media/backup/users/dave


After all that its easy to make a copy of the Subversion repository:

mount /media/backup
cp -Rv /home/dave/svn /media/backup/users/dave/
umount /media/backup

Next on the agenda is to add a cron job to do this regularly.

Subversion Command Reference
On a machine that has local access to the Subversion repository you can check out a specific subdirectory as follows using the file scheme:

svn co file:///home/dave/svn/trunk/web/dave%40deletethis.net/public_html

Note also that although one of my directories is named 'dave@deletethis.net' Subversion requires the '@' to be percent-encoded.
Other useful subversion commands:
svn help
help
svn list file:///home/dave/svn/
list all files in root dir of svn depot
svn list -R file:///home/dave/svn/
list all files in svn depot
svn list -R file:///home/dave/svn/ | grep \/$
list all directories
svn status
List status of all files in the working copy directory as in - modified, not in repository, etc
svn update
Brings the working copy up to date wrt the repository
svn commit
Commit changes from the working copy to the repository
svn add / move / delete
Perform the specified action -- occurs immediately


Setting up Windows Client for Auto Auth into SVN
When using an SVN client on Windows via svn+ssh its useful to have the Windows automatically generate connections to the SVN server. I use putty on my Windows machines so I read the directions on using public keys with putty.

putty.exe dave@deletethis.net
cd .ssh
vim authorized_keys # leave the putty window open for now
puttygen.exe
Click the 'generate' button
Move the mouse around until finished
Copy text in 'Public key for pasting into OpenSSH authorized_keys file:' to putty window & save & close putty window
Enter Key passphrase & Comment in puttygen
Save the private key somewhere private
pageant.exe
'Add Key' the private key just saved.



Checking out using Tortoise SVN
On one of my Windows machines I've already installed Tortoise SVN. Checking out from my SVN repository was really easy. I just right clicked in Explorer in a directory and selected "SVN Checkout...". Then in the following dialog I entered the svn URI:

svn+ssh://dave@deletethis.net/home/dave/svn/trunk/web/dave%40deletethis.net/public_html/

Note again that the '@' that is part of the directory name is percent-encoded as '%40' while the '@' in the userinfo is not.

Windows Command Line Check Out
On my media center I didn't want to install Tortoise SVN so rather I used the command line tool. I setup pageant like before the only difficulty was getting the SVN command line tool to use putty. With the default configuration you can use the SVN_SSH environment variable to point at a compliant SSH command line tool. The trick is that its interpreted as a backslash escaped string. So I set mine thusly:

set SVN_SSH=C:\\users\\dave\\bin\\putty\\plink.exe

The escaping solved the vague error I received about not being able to create the tunnel.PermalinkCommentsbackup technical personal windows svn linux subversion

Breaking News: All Online Data Lost After Internet Crash | The Onion - America's Finest News Source

2007 Jul 12, 8:40ONN news story on the crash of the Internet. I blame that Mac the guy was using.PermalinkCommentshumor news onion video internet

The Coming Technological Singularity

2007 Jun 17, 10:40FTA: "Let an ultraintelligent machine be defined as a machine that can far surpass all the intellectual activities of any any man however clever. Since the design of machines is one of these intellectual activities, an ultraintelligent machine could dePermalinkCommentsai article human intelligence internet philosophy evolution essay scifi technology science future singularity

YouTube - WINDMILLS DO NOT WORK THAT WAY!!!!!

2007 May 24, 7:04Clip from Futurama featuring Morbo giving a knowledge smack down on windmills. That line makes me laugh everytime. (The funny is at the very end of the clip)PermalinkCommentsfuturama video humor tv windmill morbo

Cat Roundup

2007 May 17, 1:04I've seen several humorous kitty related stories recently and then happened upon the whole lolcat scene. Rather than post all the links to humorous kitty lolcat photos to delicious I figure I'll roundup the links here.

A cat in England enjoys riding the bus and does so regularly (associated lolcat commentary).

A cat trees a bear (also with lolcat commentary).

xkcd has a comic on the topic of lolcat commentary. xkcd also had a non-lolcat cat related comic recently that I found funny.

And now I'm out of commentary so I'll just... "X cat is X": interested, aggressive/defensive. VG related: SF, Zelda. Other: cookie, sad.PermalinkCommentsroundup comic kitty personal cat humor nontechnical

MoHo Living

2007 May 13, 12:16My parents and grandmother came to visit the weekend before this current weekend, starting Friday May 4th. They arrived via their new motor-home which is quite the machine. Of course its my parents motor-home so its very well decorated inside including drapes and mini-chandelier. I didn't have a memory card for my camera at the time but I'm sure my parents will put up photos on their new blog dedicated to their motor-home at some point in the future.

At any rate, they parked the motor-home in an RV park in Issaquah so that Friday night I drove over to them and we ate at the conveniently closely located Pogachas. The next day they came over and I showed them the various cool looking things my computer connected to my flat screen TV can do. This includes Vista Media Center showing my photos from recent trips and Google Earth mapping out our respective homes and my recent trips (and Paris). Additionally, we played Wii which, unsurprisingly based on anecdotal evidence from varied sources across the Internet, was a seeming hit. Mom broke records playing bowling with my dad and I, Dad did an excellent job fishing, and Grandma's slow but steady win's the race approach to cow racing worked very well.

The next day I drove them to Seattle and we walked around Pike's Place. My parents made dinner that night at my place which was very good and made my apartment actually smell like cooked food. Also, we exchanged Christmas gifts. For the past two years I've flown back to my parents' house for Christmas and ended up with gifts I couldn't take with me in both directions. Those I left at their house they drove up and I was able to give them the ones I left at my place. They started the drive back the next day. I really enjoyed seeing them here.PermalinkCommentsmotorhome family personal nontechnical

WiiLi.org Wiimote via Java

2007 May 11, 1:47A long thread between the guy making the WiiRemoteJ library and people testing it and using it. Some stuff in there about setting up Java with Bluetooth support for Win & Mac.PermalinkCommentswii remote java library programming research:wii-remote

Resource Tools - IE7 XML Source View Upgrade Part 1

2007 May 9, 4:15I read about text/xml URI fragment resolution a few months ago. I was interested to find another kind of fragment reference other than the text/html URI fragment but of course I didn't find an implementation in IE, Firefox, or Opera. I decided to see how much work would be required to implement this in IE.

In IE and Firefox when you open an XML file that doesn't have an XML stylesheet the XML source is rendered with syntax highlighting. In IE I also noticed that the gold bar appears when you open an XML file off of your local machine. To me this suggested that the XML source was being rendered as HTML which I assumed was produced by running an XSLT on the source XML file. If so, I figured I could modify the XSLT to implement text/xml URI fragments. I ran FileMon to see if iexplore.exe loaded an XSLT file when opening an XML file. Only the XML file and MSXML3.DLL were opened and no XSLTs were loaded as files. My next hope for modifying the XSLT was if it existed as a resource in MSXML3.DLL. I did a findstr on the DLL for SCRIPT and found an XSLT so I decided to check for resources in MSXML3.DLL. Unfortunately my previous resource viewer didn't work correctly so I decided to write my own.

I created resource tools to view and modify resources in Windows modules. The viewer outputs HTML with links to the individual resources of a module using the res URI scheme that's built into IE. The modifier is a simple command line tool that replaces or adds one resource at a time to a module.

Using these tools I found that the XSLT was stored as a resource in MSXML3.DLL. I'll talk more about the existing XSLT and the one I replaced it with next time.PermalinkCommentsresource technical xml msxml res xslt xsl

Universal Turing Machine in XSLT

2007 May 1, 6:04A turing machine implemented as an XSLT. A great way to show that XSLT is turing complete.PermalinkCommentsxslt turing turing-machine turing-complete algorithm xml programming

Opera Speed Dial Code-less Hack for IE7

2007 Apr 17, 11:45Opera (the fifth most popular web browser) has a new feature named Speed Dial (video of it in action). Whenever you open a new tab you get your Speed Dial view which consists of nine thumbnails of user-settable pages. Its like a quick-favorites that appears every time you open a new tab. I think this is a neat idea and was considering how I might do that in IE7. The following is my hack-y and ugly but no coding required version of Speed Dial for IE7. I like my hack and I'm about to expound upon it in unnecessary detail so skip to the last paragraph if you're afraid of losing interest.

By default in IE7, whenever you open a new tab you navigate to 'about:Tabs'. As noted in wikipedia the result of navigation to 'about:Tabs' is determined by values in the registry. Specifically, values in the key in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs". Usually this fact is exploited by malicious software to hijack "about:blank" and show you ads but we can hijack it too in order to display our Speed Dial-ish page.

Of course since this is a code-less hack we've got limited options on what to change 'about:Tabs' to display. It should have the following requirements.
  1. Something local so that our 'about:Tabs' doesn't disappear when we go offline and so that its relatively fast.
  2. The user should be able to modify its content.
  3. Show links that the user uses.
  4. Show thumbnails of those links
  5. Provide easy to use drag and drop interaction and generally look cool.
Now, I use del.icio.us which allows me to store all of my favorites online and which provides RSS feeds that list my saved links. New in IE7 is an RSS platform that will, among other things, cache RSS feeds locally. So, by pointing about:Tabs to my del.icio.us feed 'http://del.icio.us/rss/sequelguy/quickreference' I get (1) from IE7's RSS support, and (2) and (3) from del.icio.us. Of course requirements (4) and (5) are missing but hey, I said this was ugly.

In summary, if you change the registry value "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs!Tabs" to point to an RSS feed of your favorites you can get a hack-y version of Opera's Speed Dial. I should note that although its referenced on pages such as wikipedia changing your 'about:Tabs' URI in the manner I describe is not documented and not supported by Microsoft. There could be all kinds of horrible repercussions from this change of which I'm not aware. Yeah, actually you know what? Forget I said any of this. Pretend I never wrote it...PermalinkCommentsbrowser technical hack

The "Works on My Machine" Certification Program (Coding Horror)

2007 Mar 21, 11:32A badge I think I can apply to many of my personal projects. Note to self: remember this later when someone breaks the build.PermalinkCommentsbadge certificate humor programming development software

Synergy

2007 Mar 19, 10:52This tool allows you to use one keyboard and mouse to control all your computers.PermalinkCommentskvm tools windows linux mac download free desktop

The Economics of Information Security

2007 Feb 12, 3:57Lots of interesting stuff in this paper. Abstract "The economics of information security has recently become a thriving and fastmovingdiscipline. As distributed systems are assembled from machines belongingto principals with divergent interests, we findPermalinkCommentsarticle reference economics information security privacy network interesting read

Mac OSX Expose Clone for Windows Vista :: the How-To Geek

2007 Feb 12, 10:47Tool to do OSX's Expose feature on Vista.PermalinkCommentsgui tool free windows vista expose software hack download

FOAF Vocabulary Specification

2007 Feb 7, 4:43How to indicate human relationships and human information in a machine readable fashion.PermalinkCommentsfoaf rdf xml semanticweb specification metadata social identity namespace schema standard
Older EntriesNewer Entries Creative Commons License Some rights reserved.