Blog

During the course of the day I encounter lots of challenges, some of which take minutes to solve and others that take much longer. My goal for this section is to keep track of these challenges and their solutions. I will turn the longer ones into articles, while the shorter ones will stay as blog entries. You can expect topics to range from very specific programming challenges to broader topics like life.

Below is a list of the recent blog entries. You can also browse the blog by using the tags on the right side, or if you know what you are looking for then you can use the search box at the top right.

.htaccess Updated

I finally took some time and wrote the simple .htaccess rule for redirecting traffic from farhan-ahmad.net to thebitguru.com. Both the domains are served through the same directory so I just updated the .htaccess file and added the following rules above the Rails rules.

RewriteCond %{HTTP_HOST} (www.)?farhan-ahmad.net$ [NC]
RewriteRule ^(.*)$ https://thebitguru.com/$1 [L,R]

Printer ready to serve!

It seems that there are many people coming to this page looking for one of the printer driver files. Through a comment at the bottom or an e-mail, let me know what exactly you are looking for. I will see if I can post some information on this page; this might save other searchers some time. Thanks, Farhan.

Printer temporarily sitting beside the server

The day before yesterday I finally took out a few hours to setup the HP Office 5150 on the server so everyone on the home network would be able to print to it. Surprisingly, I was able to print from the server in about fifteen minutes, most of which were spent reading up on all the different technologies: CUPS Samba printer sharing, HPLIP, etc. But the part that took next hour and a half was setting up the printer drivers on the server for Windows to auto-install when someone tries to access the printer.

Most of the delay was because Windows was not able to detect the printer correctly. Add to that the fact that HP packaged most of the files in MSIs and other compressed file formats. So I had to query the windows machine for the list of drivers and then copy those over to the print$ share on the server. This also involved understanding the RPC commands and the new ACLs on Samba. Unfortunately I wasted quite some time only to figure out that the root user on Samba isn’t really a root user. When I would add the printer driver using the adddriver rpc command as the root user it would keep saying result was WERR_UNKNOWN_PRINTER_DRIVER when the problem really was a permission problem and not a print detection. After I realized that it was a permission issue I was able to easily install the drivers.

To sum up the steps, here is what I had to do.

Read full post...

Nuonsoft ShellEnhancer 3.0 is out

Productivity

A few months ago I was looking for add-ons for Windows that would emulate the most common Linux window managers’ ALT+Right-click window resize and ALT+Left-lick window move features, when I stumbled upon Nuonsoft’s ShellEnhancer. Originally I was using it mainly for just those two features, but as time passed I started utilizing more of it’s features like the “Always on Top” context menu entry. One of the issues that I had was that it wouldn’t deal well with one of the mains programs we used at work.

Well, finally Nuonsoft has released ShellEnhancer 3.0, which is quite an improvement. The best part is the hot key feature, for which I am currently using GeoShell. If only ShellEnhancer had some way of popping up menus, I would replace GeoShell with it. Checkout the long list of changes and bug fixes. If you are looking for ways of improving your computing productivity, make sure you check out this utility.

For your task switching needs, ShellEnhancer also has a built in ALT-TAB replacement, but I still prefer the features that TaskSwitchXP provides. If you are only looking for the window moving functionality then there is always the KDE Mouse Emulator.

Busy working, and studying for GMAT

Most of my very recent past few weeks have been spent working, and studying for the GMAT. My original goal for the GMAT date was too optimistic and I have decided that this time I am not going to do an “almost there work.” I have come to realize that most of the things that I done in the part weren’t complete. I would complete eighty to ninety percent of the work, knocking out most of the hard parts, but then, either give up on the last ten percent, or do it after some time, when it didn’t matter any more. Guess what? Because of that last ten percent, I get only fifty percent of the reward! What’s up with all the percents?!! Man, GMAT is getting to my head! 🙂 So, I will be seriously concentrating on studying for the GMAT and work for the next few weeks. Wish me luck! =D

I noticed that the blog RSS feed is sending the articles in the wrong order. I will have that resolved soon after I take the GMAT. GMAT, GMAT, GMAT!

Finally, Backup Software Found!

So far I haven’t worried about backing up my system, mainly relying on plain luck. Fortunately, luck has been on my side. A few weeks ago I decided to format my Windows installation because there were issues that I just didn’t want to spend time troubleshooting. That is when the subject of backup came up again. I wished that I had a backup solution in place so I could just format the system without worrying about loosing any data. That’s when I decided to start spending some data analyzing my options and coming up with solutions.

Finally, after a few weeks of little bits of researches, I have found the solution. I played around with rsync, Microsoft’s SyncToy, SyncBack, and a few others; in the end settling on SyncBack. It is simple enough and does exactly what I want to do, a differential-mirror backup. If you are interested in backup solution, make sure to give SyncBack a try, especially since it’s free! 2BrightSparks also has an advanced, paid version called SyncBack SE, and I am still in the process of deciding if I should upgrade to that.

Great Rails References

Last night I was moving the Shahab Lab website to Site5 and had the need to lookup some Rails commands. Looking around I found a few different resources, some were good, some were bad. To save you some time, below are a few that I thought were very good.

Crazy foobar2000 Configurations!

I switched to foobar2000 after Winamp declared it wasn’t going to save my playlists, mostly because I had been using my user profile for a while. It wasn’t just Winamp that gave me trouble, there were a few others. Anyways, I have been using a fairly simple setup of foobar, but today I decided I would see what was there. I ended up on this hydrogen audio thread, and I was amazed! People have made some crazy (read awesome) looking players out of the simple foobar.

Amazing Seattle / Tacoma Weather

Notice how slippery the road is.  Also, notice the stuck semi in the background, blocking the road completely.

I had to come to Seattle for work, and the day that I picked to be here was the day that Washington had the worst weather in almost 20 years! My flight landed in Seattle around 9:45pm and my drive to the hotel in Tacoma, which was about 21 miles, took almost eight hours!! That is not a typo, it took me EIGHT hours!! It was amazing, the traffic was stopped for hours and hours! My average speed for the first seven hours was about 1.5 miles per hour!

All of this was because it usually doesn’t snow much in Washington, so they don’t have the right equipment to deal with it; and it snowed about two inches before my flight landed. Again, that is two inches. Add to that the fact that most people hadn’t driven in snow before, so they were either going extra slow, or extra fast, resulting in accidents; both of which added to the delays. And if that wasn’t enough, the temperature were below freezing, so the roads just became an ice rink. Want more? The roads in and around Seattle and Tacoma are generally sloped, at some places, at quite an angle. So if you had a rear-wheel drive, you can forget about making it any further on that rink!

Here is a van that ran out of gas and is being PUSHED by a tow truck

Want even more? There is more! Because of the long delays, cars started running out of gas. So, there were cars abandoned in the middle of the road. Most of the people couldn’t even push their cars to the side of the road because the roads were so slippery; and anyone who wanted to try would probably end up on the road. What an amazing eight hours it were! 🙂 You could walk quicker!

One of the factors was the Seattle Seahawks vs. Green Bay Packers game that increased the normal traffic to crazy amounts.

Yup, that is a bus stuck in the MIDDLE of the road at a busy traffic intersection

A lot of people are saying that this happened mainly due to the Seattle drivers, I disagree. No matter where you live, you couldn’t drive on these ice covered roads without ice chains on your tires or other specialized tires. From my experience, I haven’t seen many people with ice chain, even in the cities that get lots of snow. The main reason that only two inches of snow caused such massive delay was that the snow wasn’t plowed right away. If this was done in time then this wouldn’t have been a problem, as all of you folks living on the eastern part of the US know.

I was listening to radio as other drivers, stuck on other routes, reported what they were seeing: trucks and city buses stuck in the middle of the road, people abandoning their cars because they ran out of gas, cars in the ditches, accidents, bumps, slipping and sliding vehicles, amazing stuff!

All this brings one main question to the mind: Global Warming, is it real?

First version of Site5 Capistrano Setup Posted!

I just finished posting the first version of the Capistrano tutorial specifically geared towards Site5. It took quite a lot of work on my part, but I also learned a lot about Capistrano. I will be adding more things to this article as I learn more about Capistrano. Check it out, and make sure you let me know how it is.

Cygwin complaining “: command not found”

I generally don’t upgrade my Cygwin installation as often as some of the other software that I use, but yesterday I upgraded it and found a surprise.

cygwin window showing the error

Every time I would start Cygwin, it would give me several “: command not found” lines and syntax errors. After I got a chance to look into the problem, it turned out to be a very simple one. Basically my ~/.bashrc and ~/.aliases were using the dos line ending, instead of unix. Given that fact, all I had to do was:

  1. Open these files in vim
  2. :set fileformat=unix
  3. :wq
  4. Restart cygwin

What do you know, the errors are gone!

Check out this cygwin announcement If you are curious about the details.