Category Archives: Computer

Remove the black Google bar with Greasemonkey script

If you use Google Docs in Chrome’s or Firefox’s app mode, you will see instantly how disturbing the new black Google bar is. It’s very intrusive: You can use this script to remove the black bar. However this script works on all Google’s websites. Sometimes it’s useful to have direct links to Google Mail, Images, [...]

Fixing Ubuntu 11.10 Oneiric Ocelot wireless problem with Atheros AR9285 and Ralink RT3090

If your laptop has either Atheros AR9285 or Ralink RT3090 wireless adapter, then Ubuntu 11.10 shows that driver is properly loaded, wlan0 interface is up, however you can not enable wireless in NetworkManager. Wireless is turned off instantly after you click on “Enable Wireless” or after manually bringing the interface up. The solution is to [...]

Optimize WordPress for speed

I confess, I’m a speed freak, premature optimization type Still not that good with Google’s PageSpeed, i’ll fix those warnings soon (most of them, however, is from external hosts) The essential plugins are: WP-Super-Cache: this one is trivial. Every WordPress blog should have this plugin enabled by default. Use Google Libraries: replace WordPress included javascript [...]

Remember to specify nginx’s temp directory path

I catched this error in my log: 2010/11/20 12:38:22 [crit] 792#0: *58342 open() “/usr/local/fastcgi_temp/2/23/0000002309″ failed (13: Permission denied) while reading upstream, client: XXX.XXX.XXX.XXX, server: xxx.host.com, request: “GET /page.php”, upstream: “http://0.0.0.0/dir/page.php”, host: “lamnk.com”, referrer: “http://referrer.com/” fastcgi_temp should in no way belong to /usr/local. It’s clear that if you forget to set configuration flags, nginx will set [...]

Fix Nginx 411 Length Required error

If you don’t want to read my rant below: use HttpChunkinModule In my case i used a Readbility API to parse news articles’ content. The API receives requests and POST it back to URL specified in the request. However no matter how hard i tried, the API’s log always told me there was error. I [...]

Fix Cydia crashes

If Cydia quits during an installation process, it could refuse to run next time. Solution: remove everything in: /var/lib/dpkg/updates/ and every files in /var/lib/apt/lists/ except the folder called partial. Then reboot your Iphone.

Replace a string in all files recursively within a directory

Power of NIX: find /some/dir -type f | xargs sed -i ‘s|string1|string2|’ Even stronger, replace a string in all files that match a regex: grep -rlE “^regexhere$” /some/dir | xargs sed -i ‘s|string1|string2|’ Note that grep uses POSIX regex, not perl-like regex. But i think POSIX regex is sufficient for most cases. Or you can [...]

Remove GNOME panel

How to remove GNOME panel (it’s not to remove gnome-panel package) Removing the last panel isn’t possible, and as long as the panel is running as Gnome component it will automatically spawn back if you try to kill it. So, if you want to remove the Gnome-panel from your desktop you need to start gconf-editor [...]

Sometimes it’s beyond your imagination

The sheer stupidity of this registration form is unfathomable. Not only they don’t allow white spaces, they also forbid vietnamese characters ! How can I submit my name now ?! On the other side, i really give kudos to LacViet for having an usable ecommerce site. They make online transactions quite pleasant to go through [...]

Interesting Windows hotkeys you should know about

Vim has shown me the power of muscle memory. That’s why i always try to learn hotkeys of any thing i use daily. Managing your desktop environment of course is one of those tasks. Below are non-trivial and useful windows hotkeys that you probably don’t know about. Win + Pause = System Properties Win + [...]