Categories
General Java Web Development

Eclipse Subclipse SVN + Hostgator.com

I use Hostgator as my hosting company. I love them – great service, tons of space and no long term obligations. And the servers are fast. Now, another reason to love them – running Subversion repositories on your server with the caveat – you can only have one account to account to access that repository. If you develop by yourself, and I do for now, it’s not a problem. So how do you do it – assuming you are a Java coder using Eclipse on Windows?

  1. Send Hostgator support a request to get SSH access to your server. They will ask you to send in a picture id and once that is cleared, you should be good to go. A matter of a day or two.
  2. Install Subclipse SVN plugin for Eclipse. The Subversive plugin DOES NOT WORK.
  3. Install the really good Tortoise SVN client
  4. Set up an environment variable called SVN_SSH. To do that, go to the Windows Control Panel -> System -> Advanced -> Environment Variable -> New (under the bottom Window). For variable name enter the value SVN_SSH and for its value enter c:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe (assuming you installed Tortoise SVN in the default location).
  5. Start Eclipse and go to the Subclipse options: Window -> Preferences -> Team -> SVN . There, for the SVN Interface select “SVNKit (Pure Java)”. Click OK to store the setting.
  6. Now, using Putty or some other SSH tool, SSH to your account. You will need to set up a repository for your project. To do that, create the directory that will be used as repository, say /myrepo. Now, create an Subversion repository inside that directory: svnadmin create myrepo.
  7. Create a new project by checking out the repository from SVN. To do that, in Eclipse, go to: File -> New -> Other -> SVN -> Checkout Project From SVN.
  8. The ‘Checkout from SVN’ window will appear. There select to create a new repository location
  9. For the URL, enter: svn+ssh://<your hostgator admin user name>@<your domain name>:2222/home/<your hostgator admin user name>/<Repository directory path>. In other words, if your domain is example.com, your admin user name is joey and the path to your repository is /myrepo, then your URL will be svn+ssh://joey@example.com:2222/home/joey/myrepo
  10. Another popup window will follow that will ask you for your SSH user name. Enter the details and make sure they are saved.

You should be good to go at that point as the rest of the process is the normal project checkout scheme used by Subclipse.

Two resources were helpful: The support message board post on the subject and this blog entry.

Hope this helps!

Share
Categories
General

And eBay is good for what?

Preface: I will disclose that I worked on a consulting team at eBay and did not find the experience to be fun.

So sure, not everyone is capable of building their own store. And not everyone can find the stuff that is rare, weird, broken and arcane anywhere else, virtually. But with the fact that online merchants (especially Amazon) live off of the long tail, there is less and less room for eBay to exist.

It used to be the fact that eBay was leading on price, but I am hard pressed to find anything that is cheaper on eBay. Search for the really odd item on Google and you will most likely find it somewhere else, cheaper. Furthermore, anyone can list an item on Amazon, and Amazon has something like 80% of the items on eBay (ok, no cars) with drastically better search, orders of magnitude better layout and no-scam shipping costs.

eBay sellers have this really mind-numbing game of who can list an item cheapest and charge the most on shipping. Sell a pin and charge for the shipping of a car. Did we mention the fact that you will very often bid on these so-called auctions against the seller. It is a really fun game where you post a price, then get outbid, repeat. Often you will get an email telling you that there are more items in future auctions. Now the seller knows your price range.

eBay may be fun for the many people who built a reputation among the users. Good for them. It is also difficult to get the eyeballs to your store when there are still many of them looking at eBay. But as a buyer, it is just so passe. So 1990s. Meg Whitman announced she will retire. Maybe she arrived at the same conclusion.

Share
Categories
Web Development

Safari’s iFrame cookie setting problem

My current project is a Facebook application that runs as an iFrame ‘inside’ of a Facebook page.
We use a limited number of cookies to reduce the number of calls to Facebook and what we believe, increase the efficiency of the application.

Internet Explorer starting with version 6 requires entities using iFrames to send a header called p3p to describe the privacy policy of the page loaded inside the iFrame. This is a bit silly because Internet Explorer will trust whatever you send it and let the iFrame do whatever it needs to do with cookies. You can generate your own p3p header using these tools from IBM Alphaworks.

Safari, in an attempt to simplify matters, makes them much more complex. Its default security settings for cookies stipulate that the browser will accept cookies only from the sites that you navigate to. So if you navigate to facebook.com, any attempt to set a cookie from an iFrame that is not under the facebook.com domain will fail. Possible solutions:

  • Tell your users they must enable cookies to use your app. Still paranoid users will scoff as you are telling them to change security settings in their browsers
  • Use URL rewriting
  • Turn users of Safari away, telling them to use Firefox instead

Either way, Safari makes life that much less nicer.

Share
Share