I just found out about OverAPI.com, a website that collects cheat sheets for various topics in computing, including programming languages, software, and concepts.
I think a site like this is useful and handy, and will definitely keep a bookmark on it.
Wednesday, April 17, 2013
Collections of cheat sheet
Thursday, October 18, 2012
Compiling VirtualBox guest addition with Ubuntu mainline kernel
When compiling the guest addition of VirtualBox 4.2.0 on my system which runs Ubuntu 12.04 and mainline kernel (kernel-ppa/mainline), I encountered lots of error: unknown type name ‘uint64_t’. This happens even when all the linux-headers-* packages are already installed.
To fix these errors, the kernel headers from Ubuntu's linux-headers-* needs to be merged with the kernel source from http://kernel.org. Here're the steps.
[DISCLAIMER: please do not hold me responsible if your machine becomes unusable due to the following steps]
First, ensure that the kernel headers from kernel-ppa/mainline are installed, and they match with the running kernel.
cincai@cincai-VirtualBox:~$ uname -r 3.6.0-030600-generic cincai@cincai-VirtualBox:~$ ls -1d /usr/src/linux-headers-* #Note: dash one d /usr/src/linux-headers-3.6.0-030600 /usr/src/linux-headers-3.6.0-030600-genericBefore proceeding, backup those linux-headers sub-directories so that they can be restored in case bad things happen.
The next step is to download the matching kernel source. In our example, it is http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.6.tar.bz2.
Now we need to merge the Ubuntu's and kernel.org's files. Please copy the following script and saved into a file called, let's say, merge.sh.
#!/bin/bash kversion=$(uname -r) find /usr/src/linux-headers-$kversion -type l | xargs rm cp -a /usr/src/linux-headers-$kversion/* /usr/src/linux-headers-${kversion%-*} rm -fr /usr/src/linux-headers-$kversion mv /usr/src/linux-headers-${kversion%-*} /usr/src/linux-headers-$kversion topdir=$(tar -tjf $1 | head -1) topdir=${topdir%/*} tar --strip-components=1 -C /usr/src/linux-headers-$kversion -xjf $1 $topdir/arch $topdir/include #Fix kernel version kver=${kversion%%-*} cat > /usr/src/linux-headers-$kversion/include/linux/version.h <<EOF #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define LINUX_VERSION_CODE KERNEL_VERSION(${kver//\./,}) EOF
Flag merge.sh as executable, then then run it.
cincai@cincai-VirtualBox:~$ chmod u+x merge.sh cincai@cincai-VirtualBox:~$ sudo ./merge linux-3.6.tar.bz2
If everything works, then the VirtualBox guest edition should compile cleanly.
Tuesday, September 7, 2010
Messenger vs Pandora
[Original post on my Blog | My Blog]
The phrase “don't shoot the messenger” can be abused to absolve one from any responsibility.
Arguing against the abuse needs to be done with a minimum effort. After all, I certainly don't want to speak until my mouth dry, only for my opponent to simply retort with “ah, but I'm only a messenger. So please, don't shoot the messenger”. That's where we need to counter with another short metaphor...
And one that I have, so far, is “Blame not the box but Pandora”.
So what's the story behind this Pandora-esque phrase? In the Greek mythology, Pandora is a woman tasked by Zeus (head of gods) to guard a box. Zeus doesn't tell her what's inside, but only cautions her to never open the box at all cost. Sadly, Pandora succumbs to temptation. She opens the box which then unleashes all sort of evil stuffs: hatred, envy, anger, etc. Because her act causes a dire consequence unto the world, Pandora is often portrayed as the person to blame.
Side note: Actually there's a bright side in the story. Unknown to Pandora, after the box is opened and left unattended for quite a time, a small butterfly comes out. It's said that the butterfly symbolizes “hope”.
Thursday, July 1, 2010
“No, I like women.”
[Original Post at my Blog | My Blog]
...thus said Diego Armando Maradona, the manager of the Argentina football team, during the post-match press conference on 15-Jun-2010 after beating South Korea 4-1.
In a matter of hours, his Argentina team will play Germany in one of the most eagerly waited quarter-final showdowns of WC’10. Therefore, it seems befitting to write about the man who has brought and is still bringing cheerful colors to the footballing world.
A writing about the man who becomes the best example to illustrate how a particular technician is slowly, but looks surely, changing from a utopian to a pragmatist (i.e., a cold blooded calculating b*st*rd).
[I hope my c.b.c.b analogy won't bring me any serious implication in the future. I've heard and seen too often unexpected consequences of publications, in any form, on the ’net.]
The Utopian Technician, in the Past...
the technician had a rigid view on footballers. The view that as role models, they must be perfect in all their conducts.
No flaws are allowed, at all.
Therefore, it becomes strikingly obvious this technician had paid no admiration to Maradona (still a player at that time). He’s not fit to be a role model. He “cheated” with his hand-of-God goal. He was totally messed up with drugs. He was completely out-of-order for firing an air gun to journalists. And so on.
Mention Maradona, and the technician was left wondering how could this player be idolized by many people. He has, afterall, the most screwed up life...
The Pragmatist Technician, Now...
after years of seeing various things happening, the technician is becoming less and less utopian. Instead, the technician becomes more and more realistic in viewing circumstances. That...
footballers are just humans. And no human is perfect.
Therefore, flaws are the norm, while perfection is the most impossible exception.
That’s how the technician accepted that Maradona should be a solely judged by footballing standards — playing and managing. His flawed character does not in any way deny his greatness as a footballer. Whatever his weaknesses are, they do not take away his right to be admired as one of the greatest footballers ever grazing this world.
Besides, how can he, as a manager now, not be liked for being a refreshing droplet in the desert of “football managers”?
He dared to get back passionately (read: swear/curse) at his detractors (i.e., journalists, commentators, and a host of arm-chair critics) when his Argentina team had managed to barely qualify to the final-round of WC’10
He who cheekily yelled at a paparazzi “What an ***hole you are. How can you put your leg there where it can get run over, man?” after accidentally drove over the paparazzi's leg.
And when asked by a journalist why he always hugged and kissed his players after games, he responded candidly (scroll to the bottom): “No. No, I like women. I still prefer women. I am dating Veronica who is blond and 31-years-old. No, I have not gone limp wristed. But I like to acknowledge and congratulate my players when they play as well as they did today. ” And his facial gesture when hearing the question? Priceless (click here if you don’t see the video below).
Original Video - More videos at TinyPic
Epilog
This is the man, the football manager, who is coloring the footballing world with his imperfection and flaws and weaknesses. [See also the top-10 Maradona’s crazy moments in WC’10]
It’s extremely rare to find such a spirit among football managers nowadays. Probably only Jose Mourinho is on par. Of course, Mourinho has been in the business longer, so he might have a few more tricks under his sleeve. Nevertheless, give Maradona enough time, and I’m sure he’ll equal Mou (in terms of character, that is). Just imagine the banters that will occur, if both ply their trade in the same league...
By the way, if you’re still reading ’til this point, then allow me to wholeheartedly offer you my eternal gratitude. And not only that. I also congratulate you for reading my one rare post on football, after “retiring” from it (club & international) nearly a year ago.
Friday, June 11, 2010
Linguistic Problem
[Original Post at my Blog | My Blog]
This morning I met a visitor from Jakarta in my office. And that produced the final-nail-in-the-coffin moment for me. Why? Because it confirmed my own suspicion...
that...
...my command of Indonesian for formal communications is deterioriating!
I first realized this problem back in Feb this year (2010). At that time, I was preparing a talk for my old university in Depok. And it took a huge effort just to write the abstract & my biography in Indonesian. I even abandoned my attempts to convert my existing English slides to Indonesian. And during the actual talk, I was constantly worried whether my audience understood what I was saying!
That made me realize that after living in this English-speaking country for about 8 years, I now think in English and then translate my thoughts to Indonesian. It's a complete opposite of what I used to do, where I thought in Indonesian and then translated to English.
So, gone are the days where I could proudly brag to my Indonesian friends about my excellent (yeah!) command of Indonesian. I thought that a proof of my mastery is by still pronouncing HDB as “ha de be” instead of “āch di bi”, ASP as “a es pe” instead of “e es pē”, and so on — some were even abit surprised that I managed this even after staying four years in this English-speaking country.
I hope there never come the day where my Indonesian is only barely enough for non-formal communications, i.e., the lu-lu gua-gua kind of conversations.
Tuesday, April 20, 2010
There is no Free Lunch
[Original Post at my Blog | My Blog]
Before its premiere, Tchaikovsky's violin concerto was deemed “unplayable” by Leopold Auer, a famous violinist and pedagog. To paraphrase his words, playing the concerto is like “beating the violin left and right, over and over again”. Ironically, it's Auer whom the concerto was dedicated to.
Brahm's violin concerto suffered a similar fate. Pablo de Sarasate, a virtuoso, refused to play it on the basis that “the only proper melody was by the oboe”. And that's basically saying that only 1/3 page, out of 20 pages of scores, is worth listening!
Rachmaninoff's 1st symphony fared better where it made its first premiere. But then began the not-so-fun story: it's criticised by César Cui as “a symphony based on the Seven Plagues of Egypt composed by a student of a conservatory in hell”.
And yet, the above mentioned are now widely accepted as acclaimed pieces of work.
Of course, it's not happened just by a snap of fingers. Lots of things happened: revisions, etc. The old adage “there ain't free lunch” aptly sums up the situation. In the case of Rachmaninoff, he paid by suffering a great depression for several years.
Wednesday, March 31, 2010
A Messy Mess
The latest KMess (v2.0.3), a 3rd-party MSN client, is supposed to properly set-and-retain the friendly name.
However, I still encountered a situation where the friendly name is always reset to the MSN ID (e.g., abc@def.com) which is an email address. Guess that's the price to pay for messing around with different 3rd-party clients.
Luckily the situation could be salvaged, somehow. This was after a series of trials-and-errors (coupled with frantic login/logout sequences). Talking about having too much time with nothing to do!
Anyway, enough with the babbling. Here's how to sort out that messy mess:
- First, change the friendly name from abc@def.com to another (random, meaningless) email address such as xxx@yyy.com.
- Logout and re-login.
If the friendly name is still the new email address xxx@yyy.com, then this is a good sign. - Now, change the friendly name to whatever wished.
- Logout and re-login, and hopefully the name stays intact.
Tuesday, March 9, 2010
Tuesday Water Cooler: 9-Mar-2010
[Original Post at my Blog | My Blog]
“For 37 years I've practiced 14 hours a day, and now they call me a genius”, Pablo de Sarasate, violinist and composer (1844-1908).
Sarasate, apart from being a virtuoso, is perhaps best reknown for his composition, Zigeunerweisen (Gypsy Airs). Apparently, he composed that song specifically to showcase his mastery (much like Paganini's motivation for his concerti).
Surprisingly, there aren't many videos of Zigeunerweisen by top-tier violinists in Youtube. The cleanest one found is by Zino Francescatti. For the impatients who thirst only for fast-paced virtuosity, please jump straight away to 5:22 onwards and enjoy all the left-hand pizzicatos. Left-hand pizzicatos is analogous to playing a guitar with left-hand fingers only.
Actually, I wanted to put Anne Sophie-Mutter's, but it's audio only aka. no video. Well of course I could've put Perlman's yet again, but I thought this time should be by somebody else, for a change — still, check it out at least for the banter in the beginning.