Computers
How to get logged-in username in Hudson?
Mar 3rd
Quick background
Have you ever thought your manager keeps shelling out more on your plate other than the officially tracked tasks? Do not feel bad. You are not alone
My manager recently asked me to clean up the build server we use for our project. To put simply, it was a mess. I ended up deciding to start from scratch. Looking around, we quickly zoomed in on Hudson. A great build/CI server. Met literally all my requirements (one of which is extensibility – with the source for Hudson available as open source, we could not have asked for more!).
After many Hudson code changes and UI customizations, we now have a great CI server up and running. One of the code changes I did is to a plugin called email-ext. This enables customizing many aspects of e-mail notification that gets triggered. Unfortunately the stock plugin missed one important thing (at least to us!) – no way to get the user name who triggered the build.
I added a new variable called BUILD_USER to email-ext. When used in the email-ext mail template, this will get replaced by the user who triggered the build. Our server is plugged in to our corporate active directory and this plugin will pick up the logged in user name.
You will find the source code and binaries down below. Note that this is based off 1.3.4.2 Hudson code and is running in our snapshot very well. YMMV and do enough testing before putting in production. Do send me any bugfixes you make, I will make them available for download.
How to use this?
Copy the HPI file to your Hudson web apps folder. Restart Hudson. Go to <your job> => Configure. Scroll down to “Editable EMail Notifications” section. Click on “content reference” help to make sure BUILD_USER is showing.
See the highlighted text shown below.
Any instances of BUILD_USER will be replaced by the current logged in user. In case of timer activated builds BUILD_USER will show “timer”. In case the build trigger reasons cannot be found out, BUILD_USER will be replaced with “<unknown>”.
HowTo: Enable Aero mode in Windows server 2008 R2
Feb 17th
I recently was setting up a build server and chose Windows Server 2008 R2 to be the OS. Since I was also looking for something like a centralized deployment server for my development team to quickly reflash their testbeds, I was very h appy to see the 2008 R2 server’s “Deployment server” role…but, wait, this is a big saga and is for another post. This one is all about “Aero”!
After installation, I noticed my Windows server 2008 R2 booted in “Windows classic” mode. This was an eye sore, to say the least, after having used Windows 7’s themes. My machine has GeForce 9500GS along with the proper x64 driver. So I know it is capable of doing Aero. But, Windows “Personalization” option was not allowing me to select any Aero theme.
Quick googling showed me that I was not the first person trying to solve this – Here’s the link I used & found very helpful – http://software.intel.com/en-us/blogs/2009/01/09/windows-server-2008-r2-beta-aero-enabled-workstation/. Though I had “Desktop experience” feature installed, my “Themes” service was not enabled.
I set it to “Automatic” and started the service. But, still Windows was not allowing me to set the Aero theme. If you are facing the same issue, remember to reboot at this point — that is after enabling the “Themes” service, do reboot once. Once logged in again, you will be able to switch to Aero!
BTW, its been close to 2 years now since I posted here — was heads down on a project all the time
. We did a Wireless Display solution that recently hit the market. Will post more on it soon.
HowTo: Streaming music/photos/videos to Wii
Aug 31st
Wii doesn’t have in-built media client or DMA capabilities, but there is a workaround…
If you don’t have Xbox360/PS3 or a dedicated DMA device, you can try out streaming from your PC to your TV via Wii using a program called Wiisic [Doesn't mean you cannot do this with Xbox360/PS3 in place]
Note that, you need to have Wii Internet Channel installed in your Wii. If you are trying to use your US-bought Wii outside US, with out a US credit card,try to use this trick.
How to setup Wiisic:
- Download latest version of WiiSic [Direct link to 0.815 / Home page
- Make sure you have a compatible JRE. All JRE1.5+ versions downloaded from Sun website are ok. Microsoft's JVM may not execute this JAR. At least, it didn't work for me under Vista.
- Double click on Wiisic.jar. You should see the launch dialog shown below [for v0.815]. If it gives an error, make sure you are using the proper Sun JRE (not Microsoft’s).

- Now you need to configure the settings. Choose the folder containing your media files first. Make sure you choose your network card from the drop down list in (3). Also. change the port to something like 8081. If you have a 16:9 supporting TV, choose the 16:9 proper player in (2). Following screen shown the settings I used in my computer.
- Now switch on your Wii. Open the Wii Internet channel. Type the IP that is shown under (4) in Opera’s address bar. Wiisic should load now and start playing the stuff you chose under (1) above.
This has to proved to be the most effective inside-LAN-streaming-solution for me, till now. Let me know if you come across any other solutions.
HowTo: Buy Wii points online from India
Aug 5th
Though Nintendo hasn’t officially launched Wii yet in India, the number of Wiis in India *is* increasing. 3 of my friends, who returned from US last week, bought Wii
I don’t know how they got hold of one, as it is in extremely high demand over there now!
One of the initial problems you’d face trying to setup the Wii in India is the power converter. You *cannot* plugin Wii directly in to one of our power sockets, it will just burn! Unless you want to do the burn-in (!?) test with your Wii, I suggest you go out and buy a 220-110v power adapter (stepdown). It is available in many wattages, for Wii a 50W or 100W should suffice.
The only other thing you’d find a bit problematic is buying Wii points. Mine is a US Wii, so whenever I try buying Wii points online, it asks for a credit card along with the US address / Zip code blah blah…this one can be real irritating! Don’t lose heart though. There is a simple/effective method (Based on this post). The trick is to find a region which accepts Indian credit cards with out asking too many questions
The region found by the original poster is Brazil.
How to buy Wii points from India (Thanks to StringFellow):
- Change your Wii country to Brazil. You will find this option in Wii Settings section. Wii will now ask you to confirm the user agreement for the new region. Do press ACCEPT here, else you will get an error later when accessing the Woo shop.
- Go to Wii Shop. If you already have “My Nintendo” account at Nintendo.com linked to your Wii shop account, Wii will warn you that the link will be broken. Don’t worry about this message. You can set this up again later.
- Once in, click on the “Add Wii points”. Enter your CC number, name, expiry date and CVV. In the next screen enter any random Brazilian postal code. I used Brazilian Discovery Channel postal code. You can find more of these postal codes in Google.
That’s all, it should work! I bought USD30 worth of Wii points and it worked flawlessly. Once you have the points, you can reset your Wii country to USA (if yours is a US Wii like mine) and reconnect the Wii Shop login with your Nintendo.com login.
What to do with the Wii points?
You can buy Wii Channels, Virtual Console games or WiiWare games online from the Wii shop, using the Wii points. I strongly suggest you buy Wii Internet (Opera) channel. It costs only 500points (USD5.0) and it is worth it. Quickly checking the Orkut, sitting in the couch is bliss, I tell you
No..not another Wordpress version!!
Aug 4th
I logged in to my blog account 2 days back, after a verrry long time (I blame my project move in the professional world). I was surprised to find out so many things have happened in the Wordpress world. A new version has been released, many more vulnerabilities have been found and fixed…WAIT…a NEW version?? NOOOO! It feels like I just updated to a new version…is there a new one already!???
Wordpress is churning out new versions faster than my C2Duo / Vista machine can boot
Don’t believe me? Look at these dates:
| Wordpress version | Release date |
| 1.5 (Strayhorn) | mid-Feb 2005 |
| 2.0 (duke) | Dec 2005 |
| 2.1 (Ella) | 22 Jan 2007 |
| 2.2 (Getz) | 16 May 2007 |
| 2.3 (Dexter) | 24 Sep 2007 |
| 2.5 (Brecker) | 29 Mar 2008 |
| 2.6 (Tyner) | 15 Jul 2008 |
Mid-life crisis of a software professional
Apr 30th
I just added one more year to my age yesterday. Thanks to my wife, the day was special. But, It is scary actually, thinking about how my graduation 8 years back feels as if it happened only yesterday! Time *is* flying. Looking back, I have had my share of moments – moments I feel proud of, moments I’d cherish & moments I’d rather forget (but can’t!). My professional front has been one hell of a roller coaster ride too. My love for computers is the only thing that has survived these years. Passion for them has gone down drastically, though.
Can I code day and night for 4 days, like how I used to do during college time or even in the first 2 years of my career? A big no.
Can I still read a technical book non-stop from cover to cover? NO!
Do I still have that passion to learn everything? Probably yes. But I don’t care about that anymore.
Other commitments apart, even if I had everything else setup for doing the above things, I’d not, because of the laid-back attitude I picked up over time in this industry. After some years, I guess you become numb and dumb. Numb, because you stop enjoying/appreciating all the beautiful things in the world around you, become too insensitive to non-professional things. Dumb, because the mechanical work style you are forced in to makes your brain cells commit suicide and there is no sure-fire way to bring them back.
To visualize what I am saying, look at the graph below. I plotted my competence/commitment over time (from 2000 to 2008). Click to open the original image in a new window.
HowTo: Use Dosbox as a Quick & Dirty disassembler
Apr 19th
Dosbox is an open source DOS emulator available for many OS flavors. Dosbox allows you to run any old DOS game, relive some of the golden games of DOS era. It has full support for multiple video standards (VGA, CGA, Tandy,…) and sound cards (Adlib, SB, …). Amazing program! I was even able to bring up Windows 1.0 under that
Not many use this powerful emulator as a disassembler though. I have used this technique to disassemble many programs with out resorting to IDA or Sourcer.
WinSAG: Windows GUI for Simian (& other tools)
Apr 12th
Recently one of my peers inherited some legacy code from an Israel team. It had around 800 C/C++ language files and 30 ASM files. The task for my peer was to somehow make sense out of it and port that to an embedded environment with a big size restriction. The size of the code had to be reduced by at least 40%. Just to get him started on that, I thought of developing a new tool that could find the code duplicates. A quick Google search revealed the excellent Simian. Since, it met all our needs, my colleague has decided to buy a license to the tool and use it for his needs.
I spent a day trying out all it’s options. They have a neat ANT task, as well as an Eclipse plugin for Java developers, while nothing for any of the VisualStudio.NET IDEs! There is a command line tool though, thankfully. I put together a small GUI front end for this tool. Check it out if you are interested. Note that this tool was put together in a very short time and so didn’t go through any proper testing & I don’t intend to put it through one, in the near future. I have used this in my house for 2 days now and it hasn’t crashed yet.
This tool is in public domain and totally free. You can do whatever you want to with the source, though a line of credit will be nice. A post card or an email will be appreciated too. You cannot hold me responsible for any damage caused by this tool or the source code
Site outage: How to handle?
Mar 30th
I recently shifted out of my IIS setup in to a LAMP account. The site’s up time was much better, until yesterday, when suddenly my site was sucked in to the Internet black hole. Repeated help-desk queries pointed me to a routing issue in their end. Finally it got resolved after nearly 7 hours. If you were disappointed (dream on!) to find my site down, I apologize; My site is up again and hopefully will remain so for sometime to come.Due to my site downtime, I got to do other (positive) things.
- Computer offtime: I didn’t get to check my email (my site’s) for the entire black out. I found it actually refreshing! Believe me, it suddenly makes you feel you have more hours per day than usual.
- Got to read some books:
- I got to read the 4 Tamil magazines I bought one month back. No, I am not kidding. I hadn’t even touched those magazines since I bought them last month. I was able to catch up with whats hot (or warm, or cold!) in Gollywood (Tamil film industry) finally.
- Read couple of chapters from the excellent Advanced Windows Debugging (Addison Wesley). Nothing can beat the smell of paper and the feeling of the book in your hand! Kindle won’t be there in my wishlist ever, I guess.
- Sleep: I wouldn’t have believed how refreshing a 3 hours nap could be, if I hadn’t experienced it personally. I woke up fully charged, but soon felt deflated when I found out the site was not up yet. Damn, this site is too much interwoven with my day-to-day activities, more than I’d admit actually.
- TV: Watched Roadies 5.0. Interesting reality show. I wanted Ankita to come in again, but she lost…Hmm, Shambavi being there is also good in a way, as her absence could have reduced the masala in the show.
- Movies: I watched Fargo. I am a big fan of Coen brothers; I am collecting their films, still 5 more to go
Now that the site is up, I am back to my usual blogging self, but I’d surely miss all those other things that I like to do. Computers **do** eat up your time like anything.
Bottomline: Stay away from blogging (and computers) at least a day every week. Enjoy the other good things in life! And, come back to blogging with full josh
21 Virus and other Malware payload videos
Mar 26th
When I was uploading my Cascade virus video yesterday, I found a lot of interesting videos on the same topic. I enjoyed them thoroughly. I am listing the ones that I found interesting here to make things easy for others to find these videos easily. Hope you like this list too.
Do let me know if you come across any such videos online, I am a big sucker for these
Following "In Action" videos were all uploaded by onNeutral. Professionally done. excellent stuff! I haven’t included any info on the worms/virii he talks about, as he has added more than enough info in the videos (read the red ticker bar to the bottom in all these videos)
1) In Action: Blaster Worm
See the Blaster worm attack another computer and how both of them attack a simulated http://windowsupdate.com server.
2) In Action: Melissa Worm
