Scott Hanselman

Running a Subversion Server off your Windows Home Server

June 03, 2009 Comment on this post [22] Posted in Home Server | Subversion | Tools
Sponsored By

image Disclaimer - People have been injured and emotionally scarred listening to my technical tips. This may violate your terms of service. If your ISP calls your house and is mean to you, or if you lose all your personal data because of my tips, know that we never spoke. I don't know you. Seriously, who is this?! Stop calling!

I put most of my docs in Live Mesh, and I host must of my Open Source projects at CodePlex, but I have a bunch of code and presentations that usually just float around. Tweet Sandwich is a good example.

I decided I'd try to host a Subversion Server. I don't want to use the machine I host my blog on, as I want the data in my house. Since I already have this lovely Windows Home Server that's saved my marriage, I figured why not host it there?

1. Logging into your Home Server

If you want to install software on your Home Server (and they are headless usually - no monitor) you have to use Remote Desktop. From inside my house, I run "mstsc /console" or "mstsc /admin" from the Start | Run dialog, the connect to my machine called "Server."

2. Install Visual SVN Server

I usually download software to the desktop, ignore the "holy crap don't do this" warning (although be aware) then open an administrator command prompt and run the MSI from there. I downloaded and installed VisualSVN Server, which is the absolute easiest way that I know of to get Subversion (SVN) on Windows. I installed it on the machine on port 8443. That's not 443, but rather 8443. It's kind of like the secondary SSL port. I could put it anywhere, of course, but 8080 is to 80 as 8443 is to 443. It's easy to remember and less likely that your ISP would block it outgoing from your house. You can test if you have open ports with this online tool.

3. Chose Storage and Back It Up

Windows Home Server is a different beast as it supports a RAID-like storage system. You are NEVER supposed to put anything on the D: (Data) drive directly. Always access data through shares like \\server\svnwhatever.

Here's the only/most wonky part of this whole thing. If you have a better idea or you work for the Home Server team, let me know if this is dangerous and I'll update this part of the post.

I made a folder on the D: drive (against recommendations) called D:\repos and I told Subversion that was the place to put stuff. Then I made a new Share called \\SERVER\SVNBackup and set duplicate to true. Then, I installed the Windows 2003 Resource Kit in order to get the RoboCopy tool, and I copied RoboCopy to C:\windows so it's in the path.

Finally, I made a batch file that looked like this:

robocopy /mir d:\repos \\server\svnbackup

This "mirrors" the D:\repos folder to the \\server\svnbackup. I then used the "Add Schedule Task" wizard and made this run every night at 2am. This way I get backup and duplication in a nightly snapshot.

Alternatively, I probably could have mapped a permanent local Z:\ drive on the Home Server to \\server\svn or some share, and told VisualSVN Server to use that. However, that itself seemed wonky? My way seems to work. Thoughts?

image

4. Forward Port

I then logged into my local router and set up a port-forwarding rule to make sure that 8443 was accessible from the outside. Check your router or visit http://192.168.1.1 (usually) to figure it out.

5. Get an External DNS name (Optional)

You can certainly just visit http://www.whatismyipaddress.com and remember your address if you like. You can also hard-code it in your hosts file on the machine that will be your client.

You might consider using a service like DynDNS and get a custom domain like yourname.dyndns.org. There are applets that will run in the tray on your Windows Home Server and keep that IP address in sync if it changes.

Windows Home Server also includes options to get your own Home Server-provided domain under the "Settings" dialog in the Home Server Console. You can be http://foofoo.homeserver.com or a number of choices. This domain name is associated with your Windows Live ID and the IP is automatically updated by the Home Server.

imageNote, you can also log into your Home Server remotely, if you've enabled it. Here's me logging into my Home Server from elsewhere. Notice you can see what machines are online at home in the background there. I can RDP (Remote Desktop Protocol) into those machines if I like, and I can also remote into my Home Server itself.

Incidentally you can also view and download files from your shares, so choose strong passwords.

When you connect to your new Visual SVN Server instance over another port, your browser will likely complain that the certificate isn't trusted and it'll turn your Address Bar red and scary. Bummer, but be aware.

Now I can SVN Checkout https://mymagicdomain.homeserver.com:8443/svn/presentations/trunk as I please.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Bosom Buddies: How to make Google Chrome use Microsoft Bing for Search

June 01, 2009 Comment on this post [27] Posted in Musings
Sponsored By

image Microsoft's new Search Decision Engine called Bing is live now (in preview/beta). I thought Bing meant "Bing Is Not Google" but apparently "bing!" is the "sound of found." Found it! Bing!

If you use Google Chrome as your browser you can make Bing your default search. Here's how:

  1. Click the Wrench Icon in Google Chrome and click Options.
  2. Click "Manage" under Default Search.
  3. Click "Add" and make the form look like this:
    Add Search Engine
  4. Now with your new Bing entry selected, click Make Default.

scott hanselman - Bing - Google Chrome 

Go give Bing! a try. I'm going to use Bing for the whole month of June and see how it goes. I'll blog my results.

Technical International Note: If you're outside the US, while Bing is rolling out over the next few days (it's literally rolling) you can temporarily force it to think you're in the US with this Bing URL.

Feel free to post your Bing tips and impressions here in the comments, or follow @bing on Twitter.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Adding Custom Search Providers to Windows 7 plus Advanced Search Tricks

May 29, 2009 Comment on this post [7] Posted in Win7
Sponsored By

Disclaimer: Many of my tips have crashed cars, broken lights, and caused lawnmowers to go mad. If anything here seems out of your skill level or at all scary, run screaming away from here, hold your families and friends close; squeeze them tight and never let go. It's not NDA, but it's absolutely FriendDA.

Chris Sells told me at lunch once that he refused to upgrade to Windows 7 because a single feature was remove. His entire workflow, nay, his whole existence, revolved around the "Search the Internet" menu item in the Start Menu. Without this, he would be rendered helpless. This feature was the Red Sun of Krypton and would sap him of all his superpowers.

He would hit the Windows-Key to bring up the Start Menu, type a search term, the click "Search the Internet."

Instead, Windows 7 has "See more results" and shows the search results of his hard drive, then he has to click "Internet" from there.

imageNow, there's certainly ten-thousand ways from 3rd party launchers and Windows Gadgets to search the web from a textbox. You can right-click on the Windows Task Bar and select Toolbars | Address, then when you type in the address bar, just press the up-arrow, then enter...but that's just one way.

Adding "Search The Internet" back to the Start Menu

Personally, I like having more vertical room for local searches in my start menu, but you can put that item back with this Registry Key:

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
"AddSearchInternetLinkInStartMenu"=dword:00000001

That'll make your Start Menu look like this when searching with "Search the Internet" put back. It'll use whatever your default browser is.

image

However, that's just a nit. The REALLY interesting stuff is when you add in custom connectors for search.

OpenSearch and Federated Search Connectors

You can create you own Search Connectors using OpenSearch, just like Long Zheng's Flickr Connector. This lets you search basically anything, directly from Explorer. Here's a search of Flickr from Explorer.

scott hanselman - Search Results in Flickr Search

There's dozens of OpenSearch connectors already out there, many on 7Forums. Then can search for whatever you like, documents, pictures, videos, anything that can be returned in RSS or JSON.

Make Your Own Search Connector

I don't know anyone on the Bing! team and I'm too impatient to wait so I just wrote my own as an example. (Bing launches next week, I hear, so I'm ready.) You can make one today to search your own intranet.

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:ms-ose="http://schemas.microsoft.com/opensearchext/2009/">
<ShortName>Bing!</ShortName>
<Description>Search Bing via Windows 7 Search.</Description>
<Url type="application/rss+xml" template="http://www.bing.com/search?q={searchTerms}&amp;format=rss"/>
<Url type="text/html" template="http://www.bing.com/search?q={searchTerms}"/>
</OpenSearchDescription>

Just from this example, you can see how easy it is. I just saved this as a text file called "Bing.osdx" then double-clicked on it. I got this warning:

Add Search Connector (2)

Then, I could search Bing from Explorer (or add it to my Start Menu as seen further down this post):

hanselman - Search Results in Bing! (2)

But I want to make this even more prominent in my Start Menu.

Pinning Custom Search Connectors to the Start Menu

I (or my admin) have to add a few registry keys. Expect that your Network/Company Administrator will send this to you automatically via Group Policy. Note also that these only work on the Pro SKUs (Pro/Ultimate/Enterprise) not the Home stuff.

Registry Editor (3)

I've added Library0 and Library1 to point to two .searchconnector-ms files. That's what an .osdx file gets renamed to when it's double-clicked on and installed into c:\users\yourname\searches. Then I added "TryHarderPinnedLibrary" as a DWORD with a value of "1".

Now I can "pin" up to 2 (from what I can tell) Search Connectors to my Start Menu, perhaps for an Intranet site, for example.

image

Of course, in this example, "Bing!" and "Search the Internet" are the same thing as one is my default. I may just put MSDN down there instead...hm...there we go...

image

Enjoy! Again, no warranty, I don't know the Win7 team or the Bing team, I just figured this out on the tubes and by using Process Monitor. This may be all lies. Don't listen to me.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Hanselminutes Podcast 163 - Software Metrics with Patrick Smacchia

May 27, 2009 Comment on this post [6] Posted in Learning .NET | Podcast
Sponsored By

419346614_2444548850 My one-hundred-and-sixty-third podcast is up. Scott sits down with Patrick Smacchia, lead developer of NDepend, and talks about Software Metrics. What metrics lie beyond Lines of Code?

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is a sponsor for this show!

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET and Windows Forms. Enjoy the versatility of our new-generation Reporting Tool. Dive into our online community. Visit www.telerik.com.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

When Word of Mouth Got a Permalink - Companies, Customers and Twitter

May 26, 2009 Comment on this post [17] Posted in Musings
Sponsored By

iStock_000002294470XSmallDerek Powazek dropped this little piece of truth on Twitter recently:

Twitter was more fun when I could b*tch about a company without them replying to ask how they can provide me with excellent service today.

Things have changed since Word of Mouth got a permalink. When I'm complaining about a company to my friends or while walking down the street, no one seems to care. When I'm calling a company and complaining one-on-one, I don't always get excellent service. Boy, but if you mention a company on your blog, or even better, on Twitter, you'll likely get a reply in minutes.

It's getting to the point that I get better customer service (and hence, satisfaction) on Twitter than I do calling a 1-800 number. I'll spend less time on hold as well!

Where's my Mower?

I recently ordered a Lawn Mower from HomeDepot.com and was bummed when I realize that HomeDepot is NOT Amazon. By that I mean, not every online retailer ships virtually instantly like Amazon. Seems like Amazon has your package being prepared while it's still in the shopping cart. Click Checkout and walk to the mailbox, bam! With other retailers, not so much.,

With my Lawn Mower, it wasn't available anywhere locally so I ordered it online. I was bummed when checking the order status that it was still "processing" four days later and I complained (lower-case "c") on Twitter at 1:26pm on May 19. Sarah from Home Depot replied first thing the morning of the 20th offering to look into it for me. That's pretty cool, so kudos to HD for offering to help.

There's 100s of brands on Twitter (here's the top 100). I'd say, that Comcast got on board first, as I recall, and made really good use of Twitter for customer support. Twitter's also nice for customer support as it's (almost always) clearly a human behind the account. Twitter's not just for customer support, but also for collecting feedback and posting coupons, offers, etc. It's a brilliant medium because of it's elegant publisher-subscriber model and the its brevity constraint.

Why doesn't Home Depot (or any company, as HD isn't the point of this post) jump when I complain on Facebook?

One word: Permalinks.

Facebook is a walled garden, as you likely know. My facebook posts aren't indexed on Google and even within Facebook, they aren't easy to search and very hard to link to, IMHO. On Twitter, tweets are easy to search and you can bet that every one of these folks are using Tweetdeck to hunt for mentions of their brands. That's no doubt how HomeDepot found mine. You don't need a lot of followers, you just need to mention their name.

I've said before, don't give bile a permalink. Brands with an online or social media presence live in constant fear that you will, and it'll be about their brand.

They know that the spark of a negative tweet can fan the flames of rebellion. The threat of RT (retweets) or blog posts about tweets only pours gas on the flames. Even worse, tweets can end up in newspapers and if the company doesn't handle it well, it's over.

Consumer-driven > Company-driven

To Derek's point, yes, it WAS more fun before. I'm not sure I like the reframing of my relationship with these (often global) brands being based on fear, especially their fear of a global uprising based on potential negative publicity. I do like the idea that not only is one not complaining alone any more, but also that Twitter allows the customer (me) to reassert my role as the driving force behind the relationship.

My  question is, however, is this going to scale? I can't see how. There's only, what, 10 million people on Twitter? It's nice now, while there's so few people on Twitter, but it'll be really interesting when Twitter becomes Customer Service Central for every brand on the planet.

I still think it's lame that it took 4-5 days for my Lawn Mower to ship, but I think it's cool that Sarah at Home Depot offered to help me out.

(I got the Toro Personal Pace Mower, on sale at the time, plus a coupon, if you care.)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.