Quick References

As a constant learner, I get to touch upon many ideas in different areas. This category is for me to capture those ideas which I felt people may reference to get ahead of their tasks. Most of the time, I do come back to this section of my blog to remember what I had learnt in the past.

Emulating the web production environment with an Apache HTTP server running on a Windows 7 development machine

To minimize overhead costs of my website, I would restrain myself from buying a hosted plan until my website is launch-able. In the process of developing my website, I will want my tests to be as close to the real thing as possible.

This meant that when I type in the real domain of my website in my browser location bar, my browser will connect to my development web server, instead of the web server which my domain is being parked at.

I was using Windows 7 and an instance of Apache HTTP server as my development environment when I achieved that. My Apache HTTP server was listening at port 80 for HTTP requests.

There are two main steps to achieving my objective:

  • Routing HTTP requests, made to the actual domain, to my local machine
  • Configuring Apache HTTP server to serve HTTP requests directed at the actual domain

Installing MongoDB as a windows service

After using MongoDB for quite a while, I realised that I had been repeating the starting up of the MongoDB database daemon whenever I reboot my PC. Manually starting the MongoDB database daemon via my command prompt whenever I want to work on my projects is inefficient.

Hence making MongoDB run as a windows service automatically when my computer starts up is one way to avoid repeating myself. In this post, I document how I install my MongoDB database as a windows service.

Designing command-line applications for scheduled execution

Command-line applications are still running amongst us. They are the backbone of large corporations. They are those faithful workers that converts the raw data into beautiful reports while we are asleep. They are those tireless gatekeepers that constantly help us check whether our mission-critical servers are alive and notify us when they detect any anomalies.

Part of what I do for my job is to ensure that those scheduled jobs in my department run smoothly, and in the event that they don’t, run them manually to get the neccessary output for the day and make sure that they continue to run automatically for subsequent days. These scheduled jobs consist of running command-line applications hourly, daily or monthly.

To anticipate future needs, I had spent some time to come out with some guidelines on how I will design my command-line applications meant for scheduled execution.

Why my computer restarted automatically by itself while playing league of legends

Just when my brother is really to assist me in killing the enemy champion, my brother shouted: “the computer restarted itself again”. We were playing a game of the league of legends when that situation occurred. Until recently, the computer restart problem came back to haunt us just 10 months after we got a new graphics card. The temptation to replace the 3 year old DIY gaming machine with a newer one escalates with each automatic restart of the computer. However, my gut feeling told me that the problem could be solved.