Clicked on MS Outlook by mistake and it reminded me of my happy job days

Microsoft Outlook

Today I clicked on outlook icon by mistake, all of a sudden it brought back so many memories, mostly good. I worked for 11 years before diving into my startup completely. I have always been honest to myself and all other people around me about my journey so far.

We have tendency to showcase our best on social networks, most of it is actually fake. No one will share their true feelings. It is like a small self dosage of happiness that we seek in terms of number of likes. We upload pictures of partying, enjoying with friends, pictures of happy moments. I think it is all fake. Everyone does it and I do it too.

The point is that everyone around me thinks that it is really brave and cool to start something one your own, but in reality it is quite the opposite. I am not brave to leave my job to start my company. The real reason is something else. I was never a good employee, I was never good in working for someone else. Though I really miss my job days sometimes. It was so much fun. I really had amazing time in job.

When I was working

  • I never had to worry about the money.
  • There was a cab to pick me from home.
  • I never over worked.
  • I used to play TT or Carom in office for hours.
  • The weekends were off.
  • Going to Ambience mall for lunch 4 days a week.
  • I got opportunity to travel Europe.
  • I worked entirely from home for the last 3 years flat.
  • There was no pressure from my Manager.
  • My whole team was in France, US and italy. None in India that means Zero politics.
  • I used to work from blackberry most of the times.
  • I loved my profile. I learnt so many things.

I really had no issues with my job, in fact it was a like a dream job for me, but still I left it to focus entirely on my business and to grow my company. My job was great but my heart was not into it.

Managing your company is not cool. If you are not happy with your job, then find a one that makes you happy but don't think of starting your own company. Working for someone is not that bad. When you start your own company, you have 100 things to worry about - paying salaries, office rent, managing clients, managing team and so much more. It is like 100 jobs at the same time. The reward is also not good. You may earn more money but you will not enjoy it.

Having said that, it doesn't mean I am not happy. I just feel I could do much more and achieve something bigger. I think this feeling of under-performance is always there. Doing something on your own and opportunity to learn so many things gives me immense satisfaction which was not there when I was in job.

I wrote about this feeling of unhappiness earlier. You can read it, may be if you are like me then you can probably relate to it. I really look forward to meet like minded people who are on a similar path like me. Contact me at ravi [at] sparxsys [dot] com to share your thoughts with me :)

How to get LiveReload working with Vagrant and auto compile scss files from shared folder

Last few days are amazing. Learning so many things, especially setup of Vagrant in our company. I had few issues with the performance of Drupal running on Vagrant on windows host which I fixed yesterday. That was one milestone achieved but I didn't realized that there would be more obstacles.

We started using Omega 4 for all of our projects now and it is great. Especially compass support of SASS that enables us to design great websites in short time. The only problem is that it is not smooth to setup. If you read the Omega 4 documentation you will come to know that they have clear instructions on how to setup this stuff. I will not cover that in this blog. It is already well documented and there are plenty of articles on the internet.

I did all the setup for Omega 4 but the problem was that Live Reloading was not working and the .scss files were not compiling automatically whenever there are some changes done in them.

My current setup is Vagrant running on Windows 8.1, and guest OS is CentOS 6.5

Steps to get Live Reload working

First make sure that live reload is enabled in Drupal Omega 4 settings. Go to your Omega subtheme settings, under Development tab check the "Enable Development extension" and then under it check "Enable LiveReload". Here you would notice that LiveReload server uses port 35729. We will use it just now in the next step.

Changes in the Guardfile

You will find the Guardfile under the root of your subtheme directory. Edit it and do the following changes. We need to mention the ip address as (I am not sure about the purpose) and the port number here.

guard :livereload , :host=> '', :port=> '35729' do

Now enable the Port Forwarding in Vagrantfile

Add the following line to forward 35729 port from guest to host. "forwarded_port", guest: 35729, host: 35729

These are the changes I did and it took me 5 hours to figure out after lot of researching and hopefully this will work for you as well. Provided you are using the same environment as I am. At this moment just reload your Vagrant and try whether LiveReloading works or not.

Changes in .scss file are not detected from Windows Share, but there is a work around

I am still stuck here. If I make changes directly in CentOS VirtualBox then Guard picks up the changes immediately and .scss files are compiled when I make the changes through windows then it won't. I tried few methods but didn't succeed yet but there is a workaround which works fine.

Trick is to force the polling

bundle exec guard -p -l 10

The only problem with this force polling is that it is not super fast. You have to wait for few seconds for Guard compile the .scss files, but I am still ok with it. At least it is not blocking issues.

So far loving working with Vagrant. Lovely.

How to speed up Drupal running in Vagrant on Windows Host

I recently install and setup Vagrant on my Windows laptop. The only reason I used Windows on my laptop is because of the trainings I conduct. Most companies use Windows based systems and it is difficult to train them if you are showing demos on Linux and they have to repeat the same on Windows. For that reason only I used Windows. When I am not providing training, I am usually developing stuff. Mostly on Drupal and most recently on JIRA Plugins (Yes I am learning Java).

I heard about Vagrant in the past but never really had enough space to try it out. Recently I decided to not take usuall Drupal projects and will only work with smart clients who are willing to pay for the service and quality. That decision is costing me money, as I don't do lot of work now but I am happy with the peace on mind. This gives me with some extra time which I now devote in learning new things and improving processes in my company. When you are on your own, you need to spend your time wisely. Free time means opportunity to learn new stuff.

I was happy to understand the whole workflow of Vagrant and quite like it actually. Everything went fine. Installed CentOS 6.5 using Vagrant and setup LAMP on it. I even installed a blank Drupal site just to test it out. It worked fine too. I even created a package and moved this customized CentOS box to another machine and it worked perfectly too. I loved this idea to have exact same development environment. I will now ask everyone in the team to use this box.

So far it was great, until I actually cloned one of our complex Drupal project which we have to deliver in few days. That site was running horribly slow. I came to know that the performance can be increased if we enable NFS for file sharing but unfortunately NFS is not supported on windows.

So I searched a lot on google for possible improvements. I mean Vagrant can be installed on Windows but just because of this NFS issue it is impossible to use it for LAMP. Finally I found we tricks, which I applied and it really improved the performance. Not great but atleast usable.

Install the following Vagrant plugin in your host, Windows in my case.
Someone has written this plugin to enable NFS on Windows. I found this after searching a lot on google.

vagrant plugin install vagrant-winnfsd

Now enable the root of your project folder with /vagrant folder where I keep my website files. This could be any directory on your setup. don't forget to enable NFS by using type: "nfs"

Do the following change in your Vagrantfile.

config.vm.synced_folder ".", "/vagrant", type: "nfs"

I realised that increasing the memory also has positive effects on the performance.

Also increase the memory of your virtual machine. I have 8 GB of RAM so I can afford to allocate 3GB to my virtual machine.

config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "3000"]

Lastly some tweaks in the Apache configuration file for some extra improvements.

Finally do the following change in your httpd.conf file

<IfModule prefork.c>
StartServers       2
MinSpareServers    6
MaxSpareServers   4
ServerLimit      4
MaxClients       4
MaxRequestsPerChild  3000

These are some of the things that I tried, I cannot guarantee that it will help you too, but there is not harm in trying. It might work for you.

Have fun!

How to install VirtualBox on Fedora 20

For the past few days I am trying to setup Vagrant for uniform development environment in our company, personall I work on Windows 8.1, iMac, Fedora for development and our servers are running CentOS. It is pain I know.

Last weekend I installed and understood Vagrant on windows 8.1, it was great. I will not get into the details on setup here. You can check the documentation on their website.

Today I cloned my Vagrant box, which I want to duplicate on my fedora machine. So for that I need to install VirtualBox first on Fedora 20. It is not as simple as yum install VirtualBox, it requires some effort. Here are the steps.

Step 1: Add the VirtualBox .repo

su -
cd /etc/yum.repos.d/

Step 2: Update your system

sudo yum update

Step 3: Install the required packages

yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Step 4: Install VirtualBox

sudo yum install VirtualBox-4.3

Step 5: Build modules

/etc/init.d/vboxdrv setup

Step 6: Add the user in vboxusers group

sudo usermod -a -G vboxusers YOUR_USERNAME

Installation complete. Now I will install Vagrant on Fedora 20. Have fun.

How to use Emacs & Org-mode on multiple computers with same settings

I am a big fan of Emacs. I am not saying it is the best editor but I feel it is light weight, yet powerful and it can be customized easily. Of course vi is equally good. It is just a matter of personal taste. I also now rely heavily on Org-mode for storing all my tasks, random thoughts and to-do in org files which is I feel by far the best to-do tool. Calling it a to-do tool is actually understatement. It can do lot more. If you need to remember something with dates, estimates, tracking then org-mode can handle it pretty well. It is fast and super powerful.

The only thing missing is the syncing. If you are like me then working on multiple computers without your tasks in hand could be difficult. Org files are just text files and it is upto you to make it portable and sync with other computers.

Here is what I did to make my org-files portable.

1. I have a folder called c:\emacs that contains the following
.emacs -> init file
emacs.d/ -> folder containing all the modes, .el files
org-mode/ -> folder containing org-files

2. By default if you run emacs it will load the init file from the current user's Home directory, but we want emacs to load init file from c:\emacs\ directory. For this I have written a batch file in windows to change the HOME variable and then load emacs.

set HOME=c:\emacs
C:\softwares\windows\emacs-24.3-bin-i386\emacs-24.3\bin\runemacs.exe %*

3. Now I run this batch file to launch emacs which considers c:\emacs as the home directory.


Now I have this folder c:\emacs which I commit and push to Git repository regularly.

But how to sync?

Ideally the commits to happen automatically after every 1 hour or so and changes should be pushed to server regularly too. So I am going to setup the following stuff and also share with everyone.

1. Auto commit files to git.
2. Issue a push on post-commit or may be few times a day using scheduler or cron.
3. Auto pull files on new computer when it is booted up for the first time.

(After implementing I will make these links)

Technically this is not sync in real sense but it is more like making your files portable and available to you as and when you need it.


Subscribe to Ravi Sagar RSS