Categories
Tech Tips

How to determine which repo a RHEL/CentOS package belongs to

I thought this command should show me which repo the package ‘htop’ belongs to, but I was wrong:

[root@server ~]# yum info htop
Loaded plugins: rhnplugin, security
Installed Packages
Name : htop
Arch : x86_64
Version : 0.8.3
Release : 1.el5
Size : 136 k
Repo : installed 
Summary : Interactive process viewer
URL : http://htop.sourceforge.net/
License : GPL+
Description: htop is an interactive text-mode process viewer for...

Notice that it merely indicates ‘installed’ for the ‘Repo’ field? Not very helpful here. I wonder why yum works this way.

To find out which repo ‘htop’ comes from, use this command instead:

[root@server ~]# yum provides `which htop`
Loaded plugins: rhnplugin, security
htop-0.8.3-1.el5.x86_64 : Interactive process viewer
Repo : epel
Matched from:
Filename : /usr/bin/htop

htop-0.8.3-1.el5.x86_64 : Interactive process viewer
Repo : installed
Matched from:
Other : Provides-match: /usr/bin/htop

See ‘epel’ there? Bingo!

Categories
Huh!? Images Our Society

Ugly evangelical Christians insult Buddhists and Muslims

Once again, Christian evangelists have abused Buddhists and Muslims, this time by the National University of Singapore (NUS) Campus Crusade for Christ (CCC):

Offensive poster from Campus Crusade for Christ

Offensive web page from Campus Crusade for Christ

The small text circled in red above reads:

“In a country where much of the population is M, much prayer and work is needed in this place. As our first team to be sent to this place, you will be reaching an unreached people group. This is a pioneer work where you will get to help start movement on their campuses! … …”

Please make a stand and tell the insensitive religious zealots that enough is enough. Check out and LIKE the Facebook page Say Yes to Religious Harmony.

It’s ok to discuss and compare religions but it’s a no-no to abuse others’ religion no matter how “well-intentioned” you are or how much you “love” them. How can you love someone when you don’t even respect the person in the first place?

Please stop offensive evangelism and unethical proselytism now.

Categories
Tech Tips

Workaround for attaching > 1MB file attachment in Gmail

When I upload file attachment larger than ~1mb to Gmail using the Chrome web browser (v18.0.1025.33-r122015 google-chrome-beta on Ubuntu 11.10), the uploading will always fail after a while and Gmail will retry, resulting in an infinite loop to attach the same file.

Workaround: Use Firefox to attach such larger file attachments in Gmail. It works for me on the first try with Firefox 10.0.2.

Categories
Thinking Aloud

See it for what it is

Rather than seeing everything as what it’s not, see it for what it is, and one will be happier. 🙂

Categories
Tech Tips

App for storing private files securely on Android devices

Are you looking for a Truecrypt-like app to store confidential files on your Android phone using virtual folder/container so that you don’t have to tediously encrypt/decrypt individual file?

Check out the LUKS Manager by Nemesis][. It works very well for me. Need rooted phone though.

Categories
Tech Tips

How to make bash step through matches from possible TAB completions

By default, TAB runs the ‘complete’ function whereas ‘\C-n’ runs ‘menu-complete’ and ‘\C-p’ runs ‘menu-complete-backward’.

So, let’s say you have .bash_history, .bash_logout and .bashrc in your current directory. When you type “ls .bash<TAB>“, this will be shown:

$ ls .bash<TAB>
.bash_history .bash_logout .bashrc

When you hit CTRL+N (next) now, the auto completion will replace ‘.bash’ with the first match from the list of possible completions, i.e. ‘.bash_history’. Repeated CTRL+N steps through the list of possible completions, inserting each match in turn.

CTRL+P (previous) moves backward through the list and matches in reverse sequence.

Categories
Tech Encounters Tech Tips

Some design considerations for tablet devices

I’ve got a chance to play with the old iPad and the newer Motorola Xoom. Here’s a list of some of my observations comparing the two in terms of hardware/form factor. It’s just a personal list and by no means comprehensive.

  1. iPad battery lasts longer when in sleep mode. Shorter battery life makes using the tablet tiring because I have to keep thinking about conserving the battery, e.g. by shutting it down but that means if I need to quickly google something, I’ll have to wait for it to power up first.
  2. iPad power button is on the top edge, while Xoom is at the back of the tablet, making it unreachable when it’s lying flat on the table. You are forced to leave it up when you want to access the button just to wake it from sleep mode, which is a very frequent action. This one gets on my nerves very quickly.
  3. iPad’s volume buttons are at the right edge and protruding high enough for ease of pressing. The Xoom’s are also by the side by it’s difficult to press because it’s too thin and flat.
  4. iPad’s speaker sounds a lot better than Xoom’s, at least to my untrained ears. Furthermore, iPad’s speaker is at the lower-right edge, i.e. it’s able to project the sound out to the front, especially if you hold it such that the body channels the sound upwards to your ears. The Xoom’s speakers are at the back! Why will anyone want to project the sound away from the user’s ears? It sounds a lot softer, feels further away and hollow!

So, in terms of design, iPad beats Xoom on many points. However, I’ll definitely prefer the open Android over Apple’s closed iOS. If any manufacturer can combine Apple’s design/hardware with Android without being hit by patent trolls, consumers will be very happy.

Do you know of any Android tablets with superb design?

Categories
Our Society

媽媽有的,不是飄飄然的甜言蜜語,而是那樸實的關懷、不離不棄的疼惜。

你懂得珍惜嗎?

和媽媽相處時,什么會让你感动?你渴望的是什么?

Categories
Tech Tips

How to move VirtualBox VM from 1 machine to another

Environment: VirtualBox v4.1.8

  1. Backup everything that you’ll be touching in case anything goes wrong and you need to revert back.
  2. Move the <vm>.vdi hard disk file from the old machine’s "$HOME/.VirtualBox/VDI" to the new machine.
  3. Move the <vm> directory from the old machine’s "$HOME/VirtualBox VMs" to the new machine.
  4. Edit the "$HOME/VirtualBox VMs/<vm>/<vm>.vbox" file to change the old <HardDisk> location to that of the new machine.
  5. Double-click on this vbox file to load it into VirtualBox.
  6. Start the VM. It should load without any error.
Categories
Tech Tips

How to hide the title of specific post or page in WordPress 3.3

This makes sense especially for article that you’ve made as the static front/home page.

Add the following HTML into the post or page’s code:

<style>
.entry-title {display:none;}
</style>