Fresh Ubuntu Server (10.04)

March 27th, 2011 No comments

Lucid Lynx from nothing to Rails server :

I’m doing this on the Rackspace Cloud (which I’ve been using for all my machines). I have no security requirements for this server, go elsewhere for iptables etc. Before you begin – update & upgrade the server.

apt-get install build-essential
sudo apt-get update

1. Create a new user :
adduser <username>

This should ask you all the appropriate questions, create the home directory, and create the appropriate shell for you etc. This is better than creating useradd, for those above reasons.

2. visudo
Add the following line under this line

root ALL=(ALL) ALL
<username> ALL=(ALL) ALL

3. Install Mysql

sudo apt-get install mysql-server

Depending on what you are doing on this server you might also need the mysql-dev library

apt-get install libmysqlclient

4. Install Ruby

sudo apt-get install ruby rdoc libopenssl-ruby

5. Install RubyGems

wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz
tar zxvf rubygems-1.6.2.tgz
cd rubygems-1.6.2
sudo ruby setup.rb

6. Create symbolic link to gem directory

sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem

7. Install Rails

sudo gem install rails

8. Install the mysql gem

apt-get install ruby-dev libmysql-ruby libmysqlclient-dev
gem install mysql

As of today, this process should install Ruby 1.8.7 from Ubuntu’s package, and Rails 3.0.5 (from ruby gems). This is a version higher than the Ubuntu repository. Rails does not support 1.8.6 or earlier, nor does it support 1.9.1, so always check your ruby version

ruby -v

Categories: Technology Tags:

DD-WRT & Netgear WNDR3700

February 28th, 2011 5 comments

A few weeks ago I finally upgraded my router. I’ve had the same wireless router for over 5 years now, and can strongly recommend it (D-Link Wireless G router). It rarely overheated, rarely dropped a line, and almost never never gave me any trouble.

Then the other day I moved something around, and when I replugged the wireless router in, I accidentally plugged the wrong power source into the router, and burnt it out.

So, needed a replacement. Did a little research, and finally settled on a Netgear WNDR3700. Its a dual band router, etc. You can find all the specs on AMZN here – Netgear WNDR3700. I don’t need to repeat them here.

I am not your average consumer. My network includes several networked devices in a combination of wireless and wired setups. I also run a couple of switches, and a couple of airport express’ and finally, two Network Attached Storage devices – so, I rely on my gateway router quite a bit – and I have specific requirements from it. Also I run 4 different OS’s inside the network.

First I’ll provide the consumer review, and if you just want to read your email from further away from your router, watch netflix, and hulu, this is a great router.

Setup is easy. The router interface can be reached at 192.168.1.1 and if you aren’t comfortable with that it comes with a CD to assist in the network setup. Once setup, its easy to connect to. It doesn’t drop connection easily – it provides great range, and it’ll do what you need it to do.

Feel free to stop reading now, if you don’t care what IPv6 vs IPv4 means.

When I upgraded routers, I also upgraded all my machines from various versions of Windows to Windows 7. This I was hoping was going to be a seamless upgrade, but it was not. It was painful, and in many many ways. However this isn’t a review of that particular story.

I do run several VM’s on a couple of machines. Previously I just used Bridge networking to get them access to the network. However after the upgrade to Windows 7, this became impossible. I wasn’t sure what I’d done to cause this – but it quickly became abundantly clear when I dug into the difference between “Home Network” and “Work Network” on Windows 7. I’ll leave that for another post as well. However to make a long story short – if you want it to work, depending on your VM’s OS – you either have to disable IPv6 on the Host, or move to “Work Network” which uses IPv4.

Anyways – to get back to the point. Netgear’s default firmware couldn’t give me the IP addresses for the machines connected to it most of the time. Also a lot of things that I could do with the DLink were not available in the default configuration. Network Address Translation – more specifically port translation isn’t available (not even in DD-WRT btw) which I used heavily to be able to access sshd on all my servers and ftp on them as well.

The firmware also had some trouble with my switches that were downstream from the router. They are both gigabit switches, and all the downstream computers have gigabit ethernet adapters however for some reason, the router would give the connection to the switch a megabit connection speed. I have no idea why, and after days of troubleshooting, I couldn’t figure it out.

After a month of trying to work with the default firmware, I loaded DD-WRT. It works beautifully. No connections dropped, all computers on the network visible, remote management of the router, no dropped packets, and stable nat. Still no port translation, but I moved my sshd servers to different ports for now.

The router doesn’t run hot. The 5Ghz channel which dropped connections frequently with the default firmware is now completely stable. The range is better (about 10% further). The signal is stronger (about 12 to 15% better signal to noise ratio) when compared to default firmware.

Finally – wireless-n. Since I cannot get the Airport Express devices to work with AES security, and I couldn’t get the 802.11n to work without it, I was basically screwed earlier. (Well technically I should not have been, but the 5Ghz basically sucked.) DD-WRT solved that for me.

Overall, the router works great for me now. One last feature I haven’t talked about, but has proved invaluable is the ability in DD-WRT to create virtual interfaces to two physical interfaces provided. I use this frequently, especially because I have certain devices that only connect to specific security protocols (WPA2 Enterprise only etc.)

Categories: Technology Tags: ,

The rise and fall of Hermitage Capital inside Russia.

November 4th, 2010 No comments

The manager of what was once the most profitable investment firm in the world tells the story of his life, and through it the life of his lawyer, and business in Russia. More importantly, I quote him as saying it is the story of “unbelievable bravery and integrity”.

On October 11, 2010, a Bloomberg Business Week article titled Schwarzenegger Says Russia is Gold Mine for Investorssaid that Governor Schwarzenegger met Russian President Dmitry Medvedev for the second time in half a year and has embraced the Russian leader’s plan to recreate a Silicon Valley in a suburb outside of Moscow. Governor Schwarzenegger compared Russia to a gold mine of economic opportunity as he led a trade mission to Moscow.

But there is price for the opportunity. Zealous government oversight and corruption continue to plague even the most stable developing market.

This is the price.

Click here to watch the entire video – it is 40 minutes long, but it is worth watching.

Categories: Business Tags: ,

Fossil Fuels, Farmland, Energy in India.

November 4th, 2010 No comments

Emerging markets and the symptoms of a larger disease :

Here’s some key quotes regarding India’s energy needs, and why they’re having some difficulty

Premier Manmohan Singh told India’s energy firms on Monday to scour the globe for fuel supplies as he warned the country’s demand for fossil fuels was set to soar 40 percent over the next decade.
The country of more than 1.1 billion people already imports nearly 80 percent of its crude oil to fuel an economy that is expected to grow 8.5 percent this year and at least nine percent next year.
Demand for hydrocarbons — petroleum, coal, natural gas — “over the next 10 years will increase by over 40 percent,” Singh told an energy conference in New Delhi.

In this same time period, the amount of arable land has reduced from 0.35 hectares per head to less than 0.15 hectare. Obviously, there have been dramatic increases in both production and efficiency in agriculture in that time, but that is driven on the back of available energy – whether the manufacture of fertilizers, machines to harvest etc.

That makes this need for energy even more important. Here’s why there’s a problem –

Singh’s call comes as India is locked in a race with emerging market rival China for fuel supplies to feed their booming economies in which analysts say Beijing has taken a strong lead.
India faces “immense competition from China which has been far quicker to react when an asset becomes available,” Kalpana Jain, senior director of global consultancy Deloitte, told AFP.

Why are they quicker to react?

India has been struggling to catch up with China in the race for fuel in Africa, Latin America and elsewhere. Everywhere, China — with its deep pockets and energetic diplomacy — has been beating bureaucratic India to the punch in the quest to lock in long-term supplies abroad, analysts say.

This is a symptom that shows up across several industries, not just energy.
BTW – for more of this particular problem, check out : http://farmlandgrab.org/

[hat tip to gregor.us for some of the data]

Categories: Business Tags:

Citrix ICA Client (Xenapp) on Ubuntu

August 21st, 2010 No comments

Since I am building a machine from scratch right now, a number of things are becoming minor annoyances. Thankfully the interwebs are alway standing by to provide answers. Since I managed to find answers to this particular issue, in a myriad of different places (all linked to at the bottom of this post), I figured I might as well bring them all into one location. Also, please note, these instructions are usually compiled for folks who know nothing about Ubuntu or libraries, or security certificates etc.. If you are indeed knowledgeable about these things, feel free to skip this entire post.

The best guide for installing the Citrix XenApp Client is on Ubuntu’s forums.

Only follow instructions till the point where it gets to “Download Citrix client 10.6″… those are older instructions and you don’t need to follow them.

After that you will need the security certificates. Otherwise you will get the “you have chosen not to trust” error message when you connect to your Citrix server.

So to avoid doing that grab the certificates from the following locations :

i) Thawte Certs from :

http://www2.slac.stanford.edu/computing/windows/services/citrix/linux_client.htm

Grab both files – thawte-server-ca.crt and ThawteRoot.crt

ii) GoDaddy from :

https://certs.godaddy.com/anonymous/repository.seam

Grab the file gd-class2-root.crt

Download these, then move them into usr/lib/ICAclient/keystore/cacerts

Done. Once that happens, you should be able to open the ica files that Firefox gives you with the wcfmgr in /usr/lib/ICAClient folder.

You might need other certificates – download them and place them in the same directory. You can export certs from Opera if needed (I haven’t found how to do them from FF).

Categories: Technology Tags: ,

How to install Flash on 64 bit Ubuntu

August 21st, 2010 No comments

Note : This post will become obsolete as soon as Flash re-releases its 64 bit Flash application. They did have an Alpha release in the wild, but personal testing led me to believe it was buggy and extremely prone to crashing my browsers (especially Chrome). They apparently felt the same way and have shut it down for now, with the promise of better, stronger, faster, coming soon.

Update : I got an email asking which version of Ubuntu this was. My apologies for not adding that in – 10.04 – Lucid Lynx released in April 2010. Its the LTS version so will retain support till 2013.

Anyways, there’s lots of tutorials out there in the wild, that instruct you to use ia32-libs, and nswrapperplugin via the nswrapper plugin -i method (see end of this post for that method if you need). However there is an easier way.

Anyways, assuming this is a fairly new build. Here’s what you do.
sudo apt-get install flashplugin-nonfree

Restart all your browsers and voila – all is good in the world again. This will automatically install the following packages as well.

flashplugin-installer flashplugin-nonfree ia32-libs nspluginwrapper

If you already have a previous version of ia32-libs installed, this may or may not work for you. In that case, you may be tempted to purge your current ia32-libs, however, be careful when you are doing this, I strongly suggest you only do this on ‘new builds’ that don’t already have a ton of 32 bit programs running that are relying on this. For instance, Skype. If you have already installed Skype on your 64 bit machine, do not remove ia32-libs. Scroll down and try the more manual method.

The more manual method is described in detail in the following blog post : My Science is Better…

For those of you that don’t want to follow the link – its fairly straight forward.

i) Remove all older versions of Flash Plugins
sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper

ii) Then remove any Flash Libraries
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper

iii) If you haven’t already download ia32-libs and nswrapperplugin
sudo apt-get install ia32-libs nspluginwrapper

iv) Get the latest version of Flash from Adobe : http://get.adobe.com/flashplayer/

v) Untar it.

vi) Place libflashplayer.so (or whatever the filename is then) in a folder that you can access. Preferably put it in /usr/lib/mozilla/plugins. Both Firefox and Chrome look in this folder for plugins. Then run the following

vii) Nswrapper time…
sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/mozilla/plugins/
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-addons/plugins/

Note, that in some cases, this won’t work – and you will get the dreaded error ::
nspluginwrapper: no appropriate viewer found for libflashplayer.so

If that happens to you, try the first approach, and see if that works.

Update [April 2011]
Flash released a 64 bit version in Adobe Labs. Install that if you like. Thus far it seems stable, and not too much of a memory hog.

Categories: Technology Tags: ,

Using Gmail to send mail from Rails

April 18th, 2010 No comments

Recently, I wanted to send email using Google Apps – which requires TLS for their SMTP server.
Using Rails 2.3.5 and putting the following into my environment.rb solved the problem.<
No plugins required.

Maybe this will help someone.

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.default_content_type = "text/html"
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto =&gt; true,
:address =&gt; 'smtp.gmail.com',
:port =&gt; 587,
:domain =&gt; 'GoogleAppsDomain',
:authentication =&gt; :plain,
:user_name =&gt; 'username@googleappsdomain',
:password =&gt; 'password'
}

The key line above clearly is

:enable_starttls_auto =&gt; true,

Categories: E-Commerce Platform Tags:

What is this worth?

September 24th, 2009 No comments

In 2008 DHH (of 37signals and RoR fame) gave a speech to StartUp School. It was titled – the secret of making money online.

While I strongly suggest you watch the entire speech – the key part is that everything has a “Price”.

DHH talking about a secret behind a profitable company - "make sure you charge a price"

DHH talking about a secret behind a profitable company - "make sure you charge a price"

He suggests that the secret is to “charge a price”.

The question then becomes, what is the price to be charged – or what is this worth? A friend of mine is running into this issue with a new service he’s developing that will make lives easier for both, his information supplier, and his information consumer. How much this service is worth, is unknown to him though.

The elasticity in price isn’t linear –  (image stolen from redeye VC)

Perfectly elastic - Price vs Demand

Perfectly elastic - Price vs Demand

From the point of view of the corporation/individual who must pay the fee, there are a few things that they will need to consider before agreeing to the fee.

1) Value – what is the ROI on this investment? This usually deals with the hard cost of buying something at $10 a month – what is the value of buying this for $10 a month?

2) Cost – what is the cost of NOT doing something? For example – even if I know that spending $20 for a neon sign isn’t directly going to make me $20 in an attributable way – what does it say about my business if all the other businesses on the block have neon signs?

For a sales lexicon, the words above can be translated into – Greed, and Fear respectively.

If a person/business crosses the initial hurdle – i.e. they decide they want “it” – the next hurdle is whether they build or they buy.

The trade off they are making here,  is time vs money.

For example – if you’d like to sell them something that costs $100

  • that they can do in under 10 hours
  • given that they have 10 hours to spare
  • and they value their time at less than $10/hour
  • and given that there are no other up front costs that they need to expend, or that they have already spent all the necessary up front costs (i.e. hire a developer etc.)

they might make the decision to build instead of buying.

Given all this information, how do you determine the price elasticity of your product, and where the sweet spot along that curve is?

Remember that free is a price as well – and as Josh Kopelman says – it is much harder to move a customer from $0 to $1 than to move them along past that point.

So, how do you figure out what price to charge?

Well, it depends on what your business model is.

If scale is important – for example – similar to a review site like yelp – your product is only valuable at a certain scale, then getting to that size is the most important aspect. Adding friction to that process, will only make it more difficult. That’s why Yelp will pay reviewers in new markets – as a way to reduce friction and speed up the process of making the site useful.

What can you do with the data?

Let’s say that you could charge each customer $10 per month – and this allows you to acquire 500 customers. You will now be making $5000 per month.

Alternately, you could give it away for free, and this will allow you to attract 5000 customers. This means you will make $0 per month from this revenue source. However, to match the previous revenue stream of $5000/month you only need to figure out a way to make $1 per customer per month as opposed to the previous $10 per month.

Potentially having 5000 customers as opposed to 500 customers will provide an increase in something – data, analytics, usability, etc.

Find a way to monetize that data in order to create a revenue stream. Google 411 – is a free 411 service that quickly became the most popular information call in several metro areas. The “data” they acquired was speech patterns and accents. Now, if they wanted to say – create a speech to text product, for say Voice Messages (Already done) then they might be able to find a way to monetize that instead of charging the 411 callers. The more callers, the more data, the more data, the better the auxiliary product. The better the auxiliary product, the easier to monetize, and possible the higher revenue per user to the first service.

Free is a price – it just means that you need to figure out a second route to revenue, and that route need not always be “advertising”

If scale isn’t important, and the value of your product is inherent in its usage (example – the value of a product like Microsoft Word for a writer doesn’t really increase by all that much if all the writers are using Microsoft Word. If the value of this product is not inherently tied to the number of users using it) then the question of what this is worth becomes much trickier.

It is certainly something I will be thinking about for the next few days.

Categories: Technology Tags:

Hope Springs Eternal

August 22nd, 2009 No comments

Every day thousands of people leave behind everything they know, and travel, to someplace else. The reasons behind each move are certainly different, and I can barely talk authoritatively about my own move – but I do know that when you’re at the other end, at the beginning, you look to those that have crossed the bridge before you. You hope to see them in a place where you’d want to see yourself. Here’s the list of people, that folks at the beginning of their journey, are probably looking towards right now….

Hope Springs Eternal

Hope Springs Eternal

Hope springs eternal in the human breast;
Man never Is, but always To be blest:
The soul, uneasy and confin’d from home,
Rests and expatiates in a life to come.

-Alexander Pope,
An Essay on Man, Epistle I, 1733

Categories: Technology Tags:

Social Media, and your bottom line

August 20th, 2009 No comments

These days, many companies are attempting to get involved in Social Media outlets (TwitFaceSpace, as one of my customers refers to it).

The issue with getting involved in the “social” space (blogs, wiki’s social networks) is the commitment to keeping it up. Many of us as individuals have started blogs, but realized quickly that the ability to keep it going requires tremendous commitment, with little (or no) discernible ROI for a long time.

However is that true for corporations as well? Is there a direct connection between being engaged in the Social Media space, and your bottom line? Seems intuitive that if you do it right (that’s the catch), and your users are engaging with you in these media, then they will also engage with your products, or at least feel an increased affinity to you and your products, that might not have been there before.

The EngagementDb intends on putting that question to rest. The EngagementDb attempts to create a co-relation between user interaction and engagement in social spaces, and the companies bottom line.

It studied several distinct channels in an attempt to determine the extent of user engagement, and interaction. It then proceeded to score each of the 100 most valuable brands as identified by the 2008 BusinessWeek/Interbrand Best Global Brands ranking.

Top 100 Brands

Top 100 Brands (alright, only some of them!)

The top 10 ENGAGEMENTdb brands with their scores are:

  1. Starbucks (127)
  2. Dell (123)
  3. eBay (115)
  4. Google (105)
  5. Microsoft (103)
  6. Thomson Reuters (101)
  7. Nike (100)
  8. Amazon (88)
  9. SAP (86)
  10. Tie – Yahoo!/Intel (85)

The EngagementDb classifies organizations into 4 categories based on how, and where they choose to interact with their users.

  • Mavens – brands that have made social media a core part of their go-to-market strategies and are very active in many channels; usually driven by dedicated teams assisted by company-wide awareness and participation.
  • Butterflies — brands that recognize the need to be in many channels but have only met with real success in a subset of their activities; these companies are usually spread a bit too thin.
  • Selectives – brands that focus on just a few channels and excel in those; these efforts are usually initiated by an internal evangelist.
  • Wallflowers — brands present in only a few channels and very lightly in those; these brands are sitting on the sidelines and are wary of the risks. They are still trying to figure out the best next steps and investments in social media.

Now, you want to put it to the test don’t you? Well you can – right away. You can even attempt to rank your brand and see where you fit into that ranking. Head on over to the EngagementDb.

P.S. : As an interesting bit of insight – the EngagementDb – a piece of media about social spaces is currently drawing most of its traffic from Arrington (TechCrunch) and Twitter. I have a thought rattling about in my head about the graph of traffic sources for new content. Will try to write a post regarding that later tonight.