2008 Feb 8, 11:21FTA: "I was quite troubled to realize today that I couldn't list ten major differences between Sweden and Norway. All my best Livejournal pals lent a hand and we came up with this
not-entirely-comprehensive list."
map humor via:boingboing norway sweden europe geography information visualization 2008 Jan 31, 10:47
I use my recently added
books feed from LibraryThing, a site I've mentioned before where you track, review, recommend, and share your books, and I put the recently added
books on my page. I thought it might be nice to include the book covers so I suggested adding book covers to RSS feeds in
LibraryThings 'Recommend Site Improvements' group. The next day I had a response from the founder and lead developer Tim Spalding who
had started implementing the feature. I noticed a few bugs, reported them on the same thread, and he fixed them soon after. Fantastic! It makes me want to upgrade to a paying account.
Incidentally, if you notice the Ghost in the Shell book appear multiple times in my RSS feed its due to the previously mentioned iterative bug fixes. The same item appeared multiple times slightly
differently with each bug fix and your RSS aggregator may have picked them up as distinct items.
tim-spalding librarything rss homepage 2008 Jan 30, 1:55Periodic table with each element represented as a its own painting by different artists.
via:boingboing science periodic-table-of-elements art visualization 2008 Jan 13, 11:07
Sarah and I got an exercise bike on sale and when attempting to put it together found that it was missing a bag of about ten different screws. The manufacturer website said we could order
a replacement bag for thirty dollars (!!) but since the instructions listed the various kinds of screws we needed I figured we could just go to a hardware store and buy them.
We started at Home Depot because I didn't know better. The screws are all listed in metric sizes which is apparently uncommon and a helpful senior worker forwarded us to McLendons whose stock was better but we were again redirected this time to Tacoma Screw Products.
Tacoma Screw Products is great! See them for your hardware needs first! The store has a back area with every kind of screw ever. I felt a little out of place as as all the customers looked like
contractors. The employee who helped me explained the various options I had in screws as the bike instructions weren't as explicit as they could have been. In the end I bought all my screws for
only one dollar (much better than $30!) and they all fit correctly.
screw bike personal tacoma screw products nontechnical 2007 Dec 26, 5:45Miscellaneous thoughts I had that would have been relevant many months ago:
- A History Channel program had a reenactment of a 1920's archaeologist discovering a stone tablet, sending the tablet to a warehouse, etc. all behind the voice over giving the dry facts. The
reenactor hammed it up a bit and I would have rather had clips from Indiana Jones in the background. If they're already not showing me the archaeologist who discovered the tablet, they may as well
show me one who will be entertaining.
- There are many parodies of the Get a Mac ads and so when I saw a UK Get a Mac ad I payed attention to see what the joke was. I was
disappointed by the 'parody' because it was a conventional Get a Mac ad with different actors. Apple localized their Get a Mac ad campaign in this fashion in the UK and in Japan. I've got a
playlist of the US, UK, and Japan's version of the Piechart ad. Ranking the lovable bumblingness of the PC I give the order
UK, Japan, then US and ranking the sumgness of the Mac I give the order UK, US, then Japan. But don't take my word for it, view
the ads for yourself.
-
Yahoo Pipes lets users generate an RSS feed altering service that runs on Yahoo's server using a GUI. This is very different from Microsoft's Popfly which allows users to component-ize and share javascript utilities that run client side on a webbrowser. Both have the awesome power of buzzword associations
like 'Web 2.0' and 'Mashup' but in my mind Yahoo Pipes is for server side RSS feed modification and Popfly is about client side javascript webpages. And neither will allow me to run an arbitrary
XSLT =).
popfly apple personal history-channel indiana-jones pipes mac technical microsoft mashup yahoo nontechnical 2007 Oct 15, 1:33Info on a plugin for FireFox that gives GMail S/MIME support. This is a similar idea to the last but these folks have executed the idea in a different fashion.
article browser blog cryptography crypto mail mime mozilla pgp privacy security extension firefox gmail google 2007 Oct 12, 3:20And now to fit in better with the rest of the emo kids on LJ, in no particular order here are some reasons why I feel old:
- I've attended friends weddings sorted chronologically by when I met them: Lucas from high school, followed by Carissa from college,
and then Palak from Microsoft.
- I rarely get carded for alcohol.
- Jon's moving to Germany soon -- this time permanently. He's already started the process of getting rid of possessions he's not taking with him like his car and TV. However, after doing so he
couldn't maintain his smug "I don't even own a TV" attitude and ended up trading me my small CRT TV
(as mentioned previously) for his DDR pads and games. A good trade for both since we were each looking to dump these items. So far I've
only convinced Sarah to try DDR once with me. Somehow I've gotten much worse at something I wasn't that great at to begin with.
- I have business cards.
- I still have semi-monthly nightmares in which I'm taking a Linear Algebra course for which I haven't studied or done homework in years. This differs from the more frequent nightmares I had
immediately after finishing that series of classes in which I was taking the final and it was all on the one topic I didn't study. In reality, the prof. had done his PhD work on this one topic and
I, correctly betting it wouldn't appear on the final, didn't study it. Apparently this was a traumatic bet for me to make given the wake of destruction left on my dreams.
- I have to remind myself that 2005 was two years ago.
personal nontechnical 2007 Sep 11, 2:55There's been
some news recently on some guy hating on FireFox for its ad-blocking.
On a similar note here's a fun tip for IE7 users I got from Eric. You can get decent ad-blocking in IE7 by putting ad servers in the restricted zone. By default script inclusion is blocked between
different zones so you can put domains that serve up ads in your restricted zone after which, normal internet zone sites won't be able to include script from them. This covers most of the ads I run
into these days.
I use
Fiddler to figure out the domains that are serving up ads which incidentally also has an ad-blocking^H^H^H^H general purpose content blocking plugin. Here's
a screenshot of Slashdot and ArsTechnica from my browser. Notice the large blank areas in the screenshots:
ad-blocking personal ad ie7 technical browser tip ie 2007 Aug 15, 3:16Reasons why del.icio.us style tagging is different and better than things that have come before it.
article blog business taxonomy tagging delicious folksonomy reference tag ontology 2007 Aug 9, 5:41To satisfy my hands which have already learned to type *nix commands I like to install
Win32 versions of common GNU utilities. Unfortunately, the
which
command is a rather literal port and requires you to enter the entire name of the command for which you're looking. That is '
which which
' won't find itself but
'
which which.exe
' will. This makes this almost useless for me so I thought to write my own as a batch file. I had learned about a few goodies available in cmd.exe that I thought would
make this an easy task. It turned out to be more difficult than I thought.
for /F "usebackq tokens=*" %%a in ( `"echo %PATH:;=& echo %"` ) do (
for /F "usebackq tokens=*" %%b in ( `"echo %PATHEXT:;=& echo %"` ) do (
if exist "%%a"\%1%%b (
for %%c in ( "%%a"\%1%%b ) do (
echo %%~fc
)
)
)
)
The environment variables
PATH
and
PATHEXT
hold the list of paths to search through to find commands, and the extensions of files that should be run as
commands respectively. The '
for /F "usebackq tokens=*" %%a in (...) do (...)
' runs the '
do
' portion with
%%a
sequentially taking on the value of every line in
the '
in
' portion. That's nice, but
PATH
and
PATHEXT
don't have their elements on different lines and I don't know of a way to escape a newline character to
appear in a batch file. In order to get the
PATH
and
PATHEXT
's elements onto different lines I used the
%ENV:a=b%
syntax which replaces occurrences of a with b
in the value of ENV. I replaced the '
;
' delimiter with the text '
& echo
' which means
%PATHEXT:;=& echo%
evaluates to something like "
echo
.COM& echo .EXE& echo .BAT& ...
". I have to put the whole expression in double quotes in order to escape the '&' for appearing in the batch file. The
usebackq
and
the backwards quotes means that the backquoted string should be replaced with the output of the execution of its content. So in that fashion I'm able to get each element of the env. variable onto new
lines. The rest is pretty straight forward.
Also, it supports wildcards:
C:\Users\davris>which.cmd *hi*
C:\Windows\System32\GRAPHICS.COM
C:\Windows\System32\SearchIndexer.exe
D:\bin\which.exe
D:\bin\which.cmd
which cmd technical batch for 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.
backup technical personal windows svn linux subversion 2007 Jul 4, 10:58Hackdiary
I really enjoy reading Matt Biddulph's blog
hackdiary. An entry some time ago talked about his
Second
Life flickr screen which is a screen in Second Life that displays images from flickr.com based on viewers suggested tags. I'm a novice to the Second Life scripting API and so it was from this
blog post I became aware of the
llHTTPRequest. This is like the XMLHttpRequest for Second Life code in that it lets you make HTTP requests.
I decided that I too could do something cool with this.
Translator
I decided to make a translator object that a Second Life user would wear that would translate anything said near them. The details aren't too surprising: The translator object keeps an owner
modifiable list of translation instructions each consisting of who to listen to, the language they speak, who to tell the translation to, and into what language to translate. When the translator
hears someone, it runs through its list of translation instructions and when it finds a match for the speaker uses the llHTTPRequest to send off what was said to
Google translate. When the result comes back the translator simply says the response.
Issues
Unfortunately, the llHTTPRequest limits the response size to 2K and no translation site I can find has the translated text in the first 2K. There's a flag HTTP_BODY_MAXLENGTH provided but it defaults
to 2K and you can't change its value. So I decided to setup a PHP script on my site to act as a translating proxy and parse the translated text out of the HTML response from Google translate. Through
experimentation I found that their site can take parameters text and langpair queries in the query like so:
http://translate.google.com/translate_t?text=car%20moi%20m%C3%AAme%20j%27en%20rit&langpair=fr|en
. On the topic of non US-ASCII characters (which is important for a translator) I
found that llHTTPRequest encodes non US-ASCII characters as percent-encoded UTF-8 when constructing the request URI. However, when Google translate takes parameters off the URI it only seems to
interpret it as percent-encoded UTF-8 when the user-agent is IE's. So after changing my
PHP script to use IE7's user-agent non
US-ASCII character input worked.
In Use
Actually using it in practice is rather difficult. Between typos, slang, abbreviations, and the current state of the free online translators its very difficult to carry on a conversation.
Additionally, I don't really like talking to random people on Second Life anyway. So... not too useful.
personal translate second-life technical translator sl code google php llhttprequest 2007 Jun 17, 9:49Photos of different animals befriending one another. Very cute.
blog cute animals nature photos 2007 Jun 3, 11:25Screenshot of a captcha involving math...
captcha images humor math security spam robots.txt 2007 May 11, 8:55Last time, I had written some resource tools to allow me to view and modify Windows module resources in my ultimate and noble quest to
implement the XML content-type fragment in IE7. Using the resource tools I found that MSXML3.DLL isn't signed and that I can replace the XSLT embedded resource with my own, which is great news and
means I could continue in my endevour. In the following I discuss how I came up with this
replacement for IE7's XML source view.
At first I thought I could just modify the existing XSLT but it turns out that it isn't exactly an
XSLT, rather its an
IE5 XSL. I tried using the
XSL to XSLT converter linked to on MSDN, however the resulting document still
requires manual modification. But I didn't want to muck about in their weird language and I figured I could write my own XSLT faster than I could figure out how theirs worked.
I began work on the new XSLT and found it relatively easy to produce. First I got indenting working with all the XML nodes represented appropriately and different CSS classes attached to them to make
it easy to do syntax highlighting. Next I added in some javascript to allow for closing and opening of elements. At this point my XSLT had the same features as the original XSL.
Next was the XML mimetype fragment which uses
XPointer, a framework around various different schemes for naming parts of an XML document. I focused on the
XPointer scheme which is an extended version of
XPath. So I named my first task as getting XPaths working.
Thankfully javascript running in the HTML document produced by running my XSLT on an XML document has access to the original XML document object via the
document.XMLDocument property. From this this I can execute XPaths, however there's no builtin way to map from the XML nodes selected by
the XPath to the HTML elements that I produced to represent them. So I created a recursive javascript function and XSLT named-template that both produce the same unique strings based on an XML node's
position in the document. For instance 'a3-e2-e' is the name produced for the 3rd attribute of the second element of the root element of the XML document. When producing the HTML for an XML node, I
add an 'id' attribute to the HTML with the unique string of the XML node. Then in javascript when I execute an XPath I can discover the unique string of each node in the selected set and map each of
them to their corresponding positions in the HTML.
With the hard part out of the way I changed the onload to get the fragment of the URI of the current document, interpret it as an XPath and highlight and navigate to the selected nodes. I also added
an interactive floating bar from which you can enter your own XPaths and do the same. On a related note, I found that when accessing XML files via the file URI scheme the fragment is stripped off and
not available to the javascript.
The next steps are of course to actually implement XPointer framework parsing as well as the limited number of schemes that the XPointer framework specifies.
xml xpointer msxml res xpath xslt resource ie7 technical browser ie xsl 2007 Apr 15, 7:37Friday Jon, Daniil, and I saw
Aqua Teen Hunger Force Colon Movie Film for Theaters. It was really
great. The quality of individual Aqua Teen episodes varies wildly but this movie was very funny. It was like watching an excellent episode that happened to be 87 minutes long.
I had some difficulty generating interest for the movie as many didn't think this was 'their kind of movie'. I asked Sarah and she said no but I talked to her about it again later after she watched
a clip and she said she really didn't want to see it because it looked too weird. I asked her what she saw in the clip and she said a man with weird pants was talking with french fries while a
drink was getting a meatball to push him around in a cart.
Well, when you put it like that it does sound weird...
movie personal nontechnical 2007 Apr 10, 2:55Loopster does a bunch of things Vishu and I wanted to implement. It merges profiles from different social networks together.
social aggregator profile identity mashup openid 2007 Mar 27, 4:58A book by Cory Doctorow available for free via Creative Commons. I finished this very recently. Its very ... different. I understand but I don't comprehend.
book books fiction scifi free cory-doctorow read 2007 Mar 22, 12:01MapCruncher lets you put different geographical data together onto the MS Live Maps tool.
microsoft map mashup gis geo virtual-earth research 2007 Mar 13, 8:16Over the weekend I went with Jon and Sarah to see
Zach Galifianakis perform at
The Moore who was awesome of
course. I hadn't been to The Moore before but it was very cool. The space is very vertical with two levels of balconies making it seem small in the other dimensions. We were on the middle level so
when Zach climbed off the stage to talk to the audience we couldn't see him.
Before the show we ate at
The Steelhead Diner. I enjoyed my chicken sandwhich but the place seemed a little full of itself with salt and pepper that had
been infused with this and that. At any rate it had a nice atmosphere and good food which I suppose is the point.
The opening act for Zach was another comedian whose name I don't recall. He was pretty funny but seemed to do just a tad too much pandering to the Seattle audience. "The administration should do
something different than what they're doing currently!" *Audience Cheers* is sort of equivalent to "Its great to be here in... Seattle!" *Audience Cheers*.
personal seattle nontechnical