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 11, 4:20My manager has come back this week from a 10 week vacation and paternity leave. In response and similar to
other office hacks some dedicated coworkers and I decided to do something to my manager's office.
While gone we knew my manager, Venkat, was getting into meditation. My coworker Vishu had the excellent idea of easing Venkat back into work by making his office
better suited for meditation. To start with, we updated his nameplate with an
Om.
Next we emptied his office of anything that could distract him from meditation and replaced it with a yoga mat. Of course I left a copy of the specification
for the remodel in his office.
microsoft personal office humor nontechnical 2007 May 22, 3:22I've created an
update to the IE7 feed display.
After working on my
update to the XML source view I tried running my resourcelist program on other IE DLLs including ieframe. I found that
one of the resources in ieframe is the XSLT used to turn an
RSS feed into the IE7 feed display.
My first thought for this was that I could embed enclosures into the feed display. For instance, have controls for youtube.com videos or podcast audio files directly in the feed display. However, I
found that I can't use object or embed tags that rely on ActiveX controls in the page or in frames in the feed display.
With that through I decided I could at least add support for some RSS extensions. Thanks to
IE7's RSS platform which provides a
normalized view of RSS feeds it was really easy to do this. I went to several popular RSS feeds and RSS feeds that I like and took a look at the source to see what extensions I might want to add
support for.
For
digg.com I added support for
their RSS extension which includes digg count, and submitter name and icon. I
added the digg count in a box on the right and tried to make it fit in stylistically. For the
iTunes RSS extension
I add the feed icon, feed author, and descriptions. I was surprised by how much of the podcasts content was missing from the feed view. I also added support for a few other misc things: the
slash RSS extension's section and department, the feed description to the top of the feed display, and the atom author icon.
I wonder what other goodies lurk in IE's resources...
feed res slashdot digg resource itunes technical browser ie rss extension 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.
resource technical xml msxml res xslt xsl 2007 Apr 15, 4:06For the past several months I've seen various articles suggesting why bees are disappearing. At first I thought this was another crackpot's article that somehow made it onto digg.com. But they keep
coming and sometimes from credible sources. After the article I saw tonight I thought I should go back and put together the various articles I've read on this topic. Bees may be disappearing due to
pesticides,
new organic pathogens,
genetically modified crops,
mobile
phones, or
climate change. Apparently,
the US hasn't been keeping accurate counts of its
bees so we don't know the extent of the situation. There's an
interview with Maryann Frazier, M.S., of the Dept.
of Etymology at Penn State and a
congressional hearing on the matter.
I know this is all very serious and could signal the end of our ecosystem as we know it, but I can't help throwing in the following links as well. The bees could be
hiding in this Florida couple's kitchen. Or perhaps they're laying low while being
trained by the government to fight terrorism. Or
they're hiding in extra dimensions that we mere humans can't perceive (I'm fairly certain that's what this
article is suggesting. Really. Read it. Seriously. Its awesome.)
roundup personal bees nontechnical 2004 Sep 10, 12:04I got my driver's license today. Imagine that. I lost all of the points that I could on the parallel parking portion of the test. You know in California they don't test you on parallel parking
ability. With my new license my functional impairment level has moved from minor to non-existent. Hoo-raw. Incidentally if you search for the phrase "stealth geriatrics" on google, the first link is
to a power point presentation entitled "stealth geriatrics." I just thought that was a funny phrase.
2004 Aug 19, 2:52I received an email from verification@citibank.com the other day with the subject "Fraud Check Verification". Or at least that's what someone at the jumphk2.net domain would have me believe. The
whole official looking email was very convincing at first glance. There's the Citibank logo image up in the left corner, the reassuring TrustE image in the opposite corner, and just the right amount
of legal-ese on the bottom. The text requested me to follow a link in the email to update and verify my information. At closer examination however it becomes apparent that this is a scam. Little
things start to catch your eye. The TrustE image is hosted on ebay and the Citibank logo is hosted at 65.108.92.50. Both images one might expect to be hosted on Citibank's site. The link in the email
looks like its taking you to https://www.citibank.com/saw-cgi/citibankISAPI.dll?PlaceCCInfo but in fact its taking you to a page hosted at 65.108.92.50 again. The following sentence appears in the
email:
If your account information is not updated within 48 hours then your ability to sell or bid on Citibank will become restricted.
Oh shit! My bid on Citibank might not go through! Seriously, they might have gone to a little more effort than just copying and pasting a scam letter meant for EBay. And the number one fact
revealing the email for what it is -- I don't have a Citibank account. I had received an email exactly like this several months ago and just deleted it, but for some reason, perhaps I was in a foul
mood, I decided to do something this time around. I emailed abuse at my domain, the ISP controlling their IP address, and Citibank. My domain told me there was nothing they could do. Citibank has yet
to respond. As for their ISP, the following day I received an email from Leon at Alabanza's Abuse department informing me:
This account has been locked down and is now on schedule for deletion. If we can further assist you please let us know.
Fuck yeah! This was a lot better than anything I had expected. I anticipated no response from any of the letters I sent. The page is gone now. Leon rocks!
2004 May 10, 10:37Looking around the Microsoft campus it was easy to tell people who were there for an interview from the programmers who worked there. All of the people who were dressed formally, a suit or tie was an
obvious sign, were there for an interview. I spent my time between interviews talking to other over dressed people between interviews. The usual topics of conversation included name, city of origin,
computer science background, and the crazy problems our interviewers had asked us. Going through these topics with one such person, who incidentally was the only woman I saw interviewing, I asked
what school she was attending. She told me she was just finishing her Masters in Computer Science at
[some college]
and I told her where I was from. She then asked me, "You have your
Doctorate in Computer Science?" "No," I said, "My Bachelors... I'm working on my Bachelors." "Oh," she said, "Well you look very mature." I'm fairly certain that's a first for me -- being told I look
"very mature" that is. Unfortunately, at that point my tram showed up and I had to travel to a different building. Now I'm left wondering what made me look mature. It could have been the gel or the
slacks or the tucked in shirt. The day previous while dressed casually, hanging out with my friend Jeannie, some of her friends thought I was her age, about eight years older. The common element
between my two appearances were my new black dressy-ish shoes. Maybe its just that easy.
2004 Apr 22, 6:44My interview was scheduled for Monday starting at 8am, so when I signed up for the trip and MS suggested a departure time of 4:30pm on Monday I thought that'd be good. Unfortunately the entire
process ended at 4:15pm and it takes a little more than 15 minutes to get from Redmond to Seattle and then through the whole airport deal. So after the taxi ride to the airport and waiting in line
for like 20 minutes its 5:30pm and I'm at the front of the line asking this woman for a new ticket.
Woman: *typing* Well I can get you to LA... Me: Yeah well that's the right state. Woman: *still typing* Oh... Hmm... Uhoh... *other non-words* Me: *waiting patiently* ... Woman: Are you ready
to run? Here's your ticket. Gate C11.
I look at the ticket and the plane's boarding at, what do you know?, 5:30pm. So yeah I start running. I hit the security check point line and I know all about this. I take off my belt and shoes
and empty my pockets into my backpack, my only luggage. I am Mr. Prepared, or maybe Prepared-ness is my middle name, whatever. I get through the line with no problem, put on my backpack and holding
my shoes and belt in one hand I notice a big old clock just to my left. While I'm staring at it, it changes from 5:42 to 5:43. "Oh shit!" I think, so I start running again. I finally get to the
appropriate gate and get on the plane all out of breath. I'm walking down the aisle with shoes and belt in hand, and I guess I look a bit out of sorts. I sit in my seat and I'm telling the guy next
to me about my whole deal: "Ha. Yeah. I was late and with the running and the security checkpoint..." into incoherent mumbling and gesturing. So it turns out the pilot and copilot's incoming flight
was way late and I ended up sitting in my seat for another 15 minutes before we could take off. All that wasted running. What a shame. Coming into LA we've been "landing" for like 20 minutes. We
finally get on the ground and its 30 minutes passed the boarding time of my connecting flight. I start thinking about anyone I know who lives in LA. All the other passengers stand up and block the
aisle. Then, an announcement "Will Daniel Riesney please come to the front of the plane." OK I can tell that's supposed to be my name, but how the hell am I supposed to get to the front of the plane?
The people near me who have heard me talking to the guy next to me about this let me past easily enough. But now I have to explain this to each person out of ear shot to further my progress. "Hi.
Excuse me. They called me to the front of the plane. Pardon me. Can I get by." And so on. Its getting more hostile the closer I get to first class. Up to this one guy. He's trying to talk on his cell
phone but its not working because everybody is trying to talk on their cell phone now that we've landed. His phone connection has failed. I can't guess at what else has happened to him today but he's
decided to make his Custerian last stand here between me and the rest of the plane.
Me: *continuing from previous passengers* Excuse me. Pardon me. Guy: *spinning around* WHAT!? Me: Can I please get by? Guy: What? Why? Were not going anywhere! This whole time I've been
forcing my way past him. Guy: There OK your past me now! Your several feet ahead of me! Congratulations! Me: Dude, I'm sorry they called me to the front of the plane. Guy: I find that highly
unlikely!
Whatever. I keep walking and like 7 people past the asshole I guess the flight attendants give up on me and start letting people off the plane. Now who feels like an asshole? Its me. I get off
the plane and some airport guy has a new schedule for me. Oh good I'm thinking, I've got an hour until the next flight's boarding time at 10:30pm. So I get on a tram to travel to the other side of
LAX. I wait for oncoming traffic to stop so I can climb up a stopped escalator (Incidentally right next to it is another escalator which has been closed off. Why would they do that? Escalators cannot
break they just become stairs.) I get up there and wait in line for an extreeeeme amount of time and finally get up to claim my ticket. Its 10:20. I get my ticket and, yeah, the departure time is
10:30, the boarding time is 10:10. So I start running again. More security check fun. I finally find my boarding gate. I rush up...
Me: *breathing heavy* Here's my ticket Lady: Oh good your finally here. Just go right out that door, *points* down the stairs, *more pointing* and wait for the tram.
WHAT? Isn't there supposed to be a PLANE somewhere? This is what I'm thinking not what I'm saying. So I walk outside and down these steps. And I'm waiting. The lady from inside joins me.
*awkward silence* Lady: The bus should be here pretty soon. Me: So... I'm going to miss my plane huh? Lady: Oh no, see here? *points at my ticket* Your ticket is confirmed so they can't leave
without you. Me: Oh good... I hope they didn't tell the other passengers that.
Lets see how many passengers I can piss off in one night. Eventually this bus shows up. I get in and the guy starts driving. "Do you know where I'm going?" I ask. "Yeah" the guy says. Great.
Fine. Whatever. I don't care anymore. So we drive back around to the OTHER SIDE of the airport. You know, the side I started on. Yeah that side. So I get off the bus and walk into the small building
set aside for smaller airlines. I see the frantic looking ladies manning another of these gates. They see me, check my ID and ticket, and one of them ushers me out the door next to the gate. Out the
door and into a small gated area outside. So me and this new lady are just standing here. Even had I the energy to ask her what was going on its very loud what with all the planes. So we just stand
here at this gate facing the planes for a while. I look at her trying to make eye contact and get some sort of acknowledgment that we are in fact waiting for SOMETHING. Eventually one of the day-glow
guys appears from between some planes and saunters up. The lady hands him a paper and walks away. At the time I was kind of offended but looking back on it, maybe the lady was a deaf mute and I'm the
one being insensitive. So now I follow this guy through a bunch of planes. I'm yelling "San Luis Obispo?" trying to be heard over all the ambient noise and this guy is somehow responding to me with
an even tone no yelling required. I don't know how he did that. We finally get to the plane and its 10:40. So I delayed the flight ten minutes. I'm thinking its going to be really awkward when I sit
down and we immediately leave. Its going to be suspicious even. But, not to worry, we wait while the flight attendant argues with the guy who brought me to the plane for another ten minutes about how
many people are supposed to be on the plane. Whatever.