Hasn’t updated this blog for a long while! I just took a good look and I thought this blog is swarmed with things tagged geek stuffs, which probably isn’t what I made this blog primarily for.
So I am starting my second blog that focuses on these things:
I’ve been a long time eclipse user since 3.0. What has buggered me since that time is the mysterious toolbar – there is no way to turn it off! Since I think around eclipse 3.3 they added an option on the right click menu to “Hide Toolbar”, but that is only temporary. The toolbar creeps right back in on restart!
After some LONG time struggle with the eclipse PDE (Plug-in Development Environment), I finally rolled out this little plug-in that hides the toolbar for me on eclipse start up.
Man, I still cannot believe how much time it took to actually write a simple plug-in like this! Maybe that’s a reason why the eclipse plug-in scene hasn’t seen much advances lately – there’s too darn little resources! I mean, for the most of us, digging through API and classes manually aren’t the most pleasant thing to do.
Many of us Windows users have experienced the frustrating mysteries – we find our hard-disks shrinking and shrinking after some period of usage. Emptying the recycle bin didn’t solve the mystery, neither did clearing the TEMP folder.
Here I’ll present two amazing, freeware products from Piriform
This program is an excellent clean up utility. As far as I have tested it myself, this is unlike many other products which try to delete as many files as they could to make them sound useful. CCleaner performs safe operations and I haven’t broken my computer with it. On my first time use, it discovered and recovered more than 1GB of my hard disk space!
Another freeware product from the same company. Defraggler is originally intented to use as a defragmentation tool, but it surprisingly served extremely well at discovering large chunk of mysterious files that choke up precious disk space. One unique feature this piece of software has is the ability to defrag individual files. And the Analyzer is blazing fast too – it analyzed my 80GB drive in less than 10 seconds. Then I switched to the File list, and I can immediately sort by file size to find out the biggest files on my disk!
Seasoned users might say this cygwin command accomplishes the same result:
1
du . 2>/dev/null | sort -nr | less
But that would probably take 10 minutes instead of 10 seconds!
This is mainly a reference for myself in case I forget how to do it later, as it took me a good deal of time to figure out.
Situation
I want to unit test applications that send emails. Obviously I don’t want to be opening a dozen of real email accounts just to test this thing out. Naturally I would want to install an SMTP/POP3/IMAP server on Windows, and there is one free (open source) option that is quite promising – hMailServer. However, it still involves 2 (quite major) inconveniences for my use case:
I have to go through the configuration screens to create new users. i.e. if I want to send email to alice@localhost I’d have to create the user account alice manually
I have to use an email client (like Outlook Express) to connect to the local POP3 server to view the emails. This seems redundant to me, since the files are already stored in my disks, why can’t I just view them?
The Solution
Then I came across exim on cygwin. exim is (as it claims to be) a vast improvement over the good ol’ sendmail. So I gave it a shot – man, that was awesome! I can now direct my application to send to arbitrary address like alice@mail.local, foobar@mail.local and I can view the results immediately in a text file, solving the two problems mentioned above. Here’s what I did:
Install exim using cygwin installer
Run exim-config
Edit /etc/exim.conf
Uncomment primary_hostname and set it to mail.local
Edit the routerlocaluser, comment out the line check_local_user (If you don’t know what that means, just search for the line localuser:)
Edit %WINDIR%\system32\drivers\etc\hosts, add the line
1
127.0.0.1 mail.local
Finally, reboot the exim service
And there you go! You can now send mail to *@mail.local. To view the mail, go to /var/spool/mail which contains all the mail in text files. A simple tail -f /var/spool/mail/foobar can monitor the mail sent to foobar@mail.local
A simple test to make sure everything’s working:
$ exim -bt foobar@mail.local
foobar@mail.local
router = localuser, transport = local_delivery
# If something is wrong in your config, it would say "Unrouteable address"
# Now let's try sending an email
$ exim -v -odf foobar@mail.local
Hello World!
.
LOG: MAIN
<= Chris@mail.local U=Chris P=local S=296
delivering KEQKED-0002RS-A7
LOG: MAIN
=> foobar <foobar@mail.local> R=localuser T=local_delivery
LOG: MAIN
Completed
# Cool, let's see if it really delivered
$ tail /var/spool/mail/foobar
Received: from Chris by mail.local with local (Exim 4.69)
(envelope-from <Chris@mail.local>)
id KEQKED-0002RS-A7
for foobar@mail.local; Sun, 08 Feb 2009 15:20:39 +0800
Message-Id: <EKEQKED-0002RS-A7@mail.local>
From: Chris <Chris@mail.local>
Date: Sun, 08 Feb 2009 15:20:39 +0800
Hello World
Many criticize Windows as being not user-friendly to power users – you can’t do things the fast way even when you’ve used it for a couple of years. Here’s some tricks I’ve accumulated over the years to make using Windows (hopefully) as swift as a *nix guru.
Why should we use Windows when we want performance and speed? Well, I guess that’s we game players have to live for
Customize your Run dialog
This is undoubtedly the coolest and most powerful trick for Windows power users. To be able to type whatever command you want from the Windows command prompt is like being able to place symbolic links in /usr/local/bin
Create a directory somewhere convenient. A good place I used is
1
%HOMEDRIVE%:%HOMEPATH%\Commands
.
Now you’ll want to add this directory to your %PATH%. This is done by:
Press Win + R to open the Run dialog
Enter
1
sysdm.cpl
Append your
1
Commands
path to %PATH% in Advanced -> Environment Variables
Now you can place shortcuts (*.lnk) and even BAT files there and they will be run when you type the command in the Run dialog!
Useful commands for the Run dialog
Talking about the Run dialog, there’s a handful of useful commands you may want to memorize to speed things up a little bit:
notepad
calc
Calculator
explorer
Opens Windows Explorer on path
control netconnections
Opens the Network Connections control panel
sndvol / sndvol32
Opens the volume control panel
sysdm.cpl
Opens System Properties
dxdiag
Opens DirectX Diagnostic
msinfo32
Opens System Information
msnmsgr
Opens Windows Live Messenger
Enhance your clipboard with ClipX
The clipboard is designed decades ago. Given today’s computers’ memory size, there’s no reason to justify why we can only hold one value in the clipboard. Enhance it with this freeware ClipX. You can store like 25 previous clipboard entries (including pictures, files) and recall them with one key combination (default: Shift-Ctrl-V). Very handy for system admins and programmers
Opening Task Manager directly on Vista
Microsoft changed the popular key combination Alt-Ctrl-Del to open a screen with a list of not very useful options instead of opening the task manager. Here’s the new key combination to open the Task Manager directly:
1
Ctrl+Shift+Esc
Locking your computer from the command prompt
There are various reasons you might want to do this instead of Win + L, such as from within a BAT script. Anyway here’s how to do it
1
rundll32 user32.dll, LockWorkStation
Putting files to the Recycle Bin from the command line
Oops, there’s no tricks to it. Download my recycle utility.
Recently I had a conversation with my uncle. We talked briefly about getting a job vs. being an entrepreneur.
My conclusion was that getting a job is probably suitable for the “stable” people who won’t want too many fluctuations and just want to get by, while being an entrepreneur is not for the faint-hearted but will definitely bring greater rewards if you are not too dumb.
His conclusion was that getting a job is the way to go for except the really brilliant people, and his reason was we have run out of ideas in today’s world and it is too difficult to compete with established giant companies if we don’t invent new ideas.
So really, is that the case?
On the surface, his conclusion seemed to have a lot of truth to it. I remember my dad telling me the same thing when I was a child, and I couldn’t come up with a clever new invention idea to challenge his stance. Even today, I can’t come up with some cool ideas on the spot. So it would be normal for most people to reach that we have run out of new ideas to start a new, successful business.
I don’t think so
But then, I really put some thinking into that, and I could see that there are in fact endless possibilities still waiting for us to discover. How did I know? I asked myself this simple question, “Does everything in the world that we live in simply just works?” Obviously, anybody will tell you how something, many things, don’t work quite right in their lives. As opposed to having to come up with constructive ideas, just blaming what’s not working (or put another way, inconveniences of life) is a lot easier. I can come up with a few on the spot here:
I still spend a significant amount (maybe 5 – 15%) of my life on transportation.
I recently permed my hair curly, and I am constantly worrying that I might do something wrong that will make it straight.
If I want to eat some food I enjoy, I’m constantly counting the calories.
Urban countries dump tons of food every day. Third world countries dump tons of corpses every day.
I have to manually clean my ass with toilet paper every time after I defecate.
OK the last one might sound like a cheap joke but it’s a pretty legitimate issue, when we look at the fact that flush toilet is considered one of the inventions with most impacts by many scientists.
See, there are countless small things that are still screaming for improvements in our daily lives. It’s just that we don’t notice them. Many people think that it would take a rocket scentist to make some ground breaking invention, which is totally not true. For example, I recently came across this brilliant new device:
Approximately 3,000 woodworkers get their finger cut by a saw like that every year. This new invention, which consists of no next-generation scientific discoveries, is saving 3,000 woodworkers’ fingers every year.
The point I want to illustrate here, is that there are still endless possibilities here in the world, and we are not destined to be stuck in a cubicle day in and day out. All it takes is the ambition and the creativity, and we all can do much more meaningful work than sitting in a cubicle.
So until the day when we have all the gadgets in Doraemon, you don’t have to get a job because you can start your own!
Update 2: I’ve given this product some real life usage tests. I must conclude that the antivirus component’s performance is slow, ugly and unacceptable. I was fooled by its small footprint (memory usage), but the scanning speed is slow and it effectively renders my computer unusable when I am doing any slightly more demanding operations. Bottomline: Stray away from this if you want any performance at all – for that purpose, I’d say ESET AntiVirus is still the best
Update: Unfortunately, after some testing, I just realized Comodo’s UI still requires the use of a mouse. Although it has slightly more options than ESET’s firewall, the mandatory use of mouse still sucks.
In the past I’ve always used the commercial NOD32 Antivirus. Since version 3 it has also included a firewall in the ESET Smart Security. I have been quite satisfied with NOD32 Antivirus since it has a solid detection rate and more importantly to me, very minimal use of system resources. This is unlike say Norton, which is notorious for eating up 50% of your system resources even when it is doing observably nothing.
Recently though, I started getting annoyed enough by ESET’s firewall’s user interface. Simply put, I’m getting really annoyed by the fact that I have to constantly click the freqently appearing pop ups. What’s worse, the pop ups must be clicked by a mouse – it doesn’t support using a keyboard with tabbing to the right button.
That’s not too bad though, after maybe a year of using it, I’ve learned of its configuration enough so that I could set up rules to prevent the pop ups from appearing so frequently, but the occassional pop ups that appear finally drove me to investigate into better solutions.
Then I found Comodo Internet Security – which comes with an Antivirus and a Firewall.
Comodo has been well known for its firewall, but the Antivirus component is the company’s new invention – this is like the reverse of ESET, which is best known for its antivirus but then expanded its market to firewall too.
I still haven’t used Comodo long enough to do a comprehensive review of the two, but there’s one thing that I can say for certain: Comodo’s user interface is so much nicer and provides much more options than ESET.
And from somewhere I’ve read, performance and low system resources usage is one of the design philosophies of the Comodo’s team. I forgot where exactly but I think I read it from the Comodo’s official forum – you can probably take a look and you’ll quickly realize how interactive the support staff are in the forum – something that blew my expectation for a free product.
So, give it a try for this free security product, it’s definitely not wosre, if not way better than, most of its paid counterparts.
I recently encountered an error where when I do a less in cygwin it goes WARNING: terminal is not fully functional Quite some people seem to have encountered this problem before and there are some discussion threads on the Web, but I couldn’t find a page that pointed out the direct solution after some googling. Here’s what I did to fix the problem: It turns out that the environment variable TERM is somehow set to dumb instead of the normal cygwin. Apparently the dumb terminal is not as fully functional as cygwin. Here’s what I did to confirm the problem:
1 2
$ echo$TERM
dumb
I got less working properly again by doing:
1 2
$ exportTERM=cygwin
$ less
It turned out that somehow the $TERM environment variable got set to dumb. To fix that, simply run sysdm.cpl from a Windows command prompt, and delete the environment variable TERM. cygwin will then default TERM to cygwin
Today I bumped into this very addictive game called TypeRacer. A picture says is all:
At first I thought “Oh it’s just another Flash game, I’ll give it a try because I like typing”, then volia! It’s not your ordinary everyday Flash game. For a Web-based game, it offers a complete feature set and a smooth experience of that of a real, installed game!
The random matching process is as smooth as it can be – just clikc “Race against others” and you’ll find yourself typing away in seconds! Simply click “race again” after a race and you’ll be instantly matched against other players. The time I tried, there were enough players on the server that I never had to wait for more than 10 seconds to be matched against other players.
They also have a “Invite friends” features where you can open a private room for invited friends only. That can be done by simplying sending the URL to your friend, and they can instantly start playing – no forced registration, no nothing – that’s what you call fun!
Talking about the registration, the sign up process was really smooth. First off, you don’t have to go through a clumsy registration process to start playing. Anyone can play as Guest, and if they find that they want to keep their records, just click on Sign up which only required you to fill in the username and password – all in an AJAX box that required 0 page reloads.
Give it a try, my hats off to the developer (Yeah I heard it’s a one-man project.) Great job!