Category / Computing

Sandblast August 4, 2011 at 1:24 pm

I built an earth-toned color theme called SandBlast for Eclipse. It requires the Eclipse Color Theme plugin.

Emacs: File Size Threshold May 1, 2011 at 8:34 pm

I use Emacs to open up WAR files often. Since these files are often large, Emacs usually pops up a confirmation dialog which was cramping my style. Turns out Emacs maintains a threshold of file size for this. The default value is about 10 MB. The variable “large-file-warning-threshold” is customizable. Note that you shouldn’t set the file size threshold to be larger than buffer size.

I set mine to 100 MB.

;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode nil)
'(inhibit-startup-screen t)
'(large-file-warning-threshold 100000000)
'(tool-bar-mode nil))

IE Dominance Disappears November 11, 2009 at 10:32 am

This little graph is showing the decay of IE once overwhelming dominance in the browser market:

Twitter Integrated August 25, 2009 at 6:40 am

I’ve added a Twitter widget on the sidebar. So now my tweets are published on Random Brain Dump as well. Next up, is to integrate a Facebook plugin.

Emacs: Writable Directories August 22, 2009 at 11:53 pm

I recently discovered this nifty mode called “wdired” (writable dired). It gives “dired”, the simple directory management tool within Emacs, some editing functionalities.

In short you can “edit” contents in a directory. With it, you “edit” a directory like a file buffer. So instead of making changes one file at a time, this mode lets you leverage Emacs editing commands and batch up your changes in a buffer and then apply all of them when at one shot when you “save” the buffer.

This saves me a couple of minutes when I had to do some mass file manipulation last week. I was able to use query-string to selectively move large number of files and fix broken symbolic links.


Emacs: Remembering Cursor Position May 15, 2009 at 8:25 am

Emacs has a little package called SaveSpace that makes Emacs remember the position of the cursor for each file you opened. It’s nice to open a file and the cursor automatically jumps to where it was last. Sweet!

To enable SaveSpace, add the following configurations in your ~/.emacs file

(setq save-place-file “~/.emacs.d/saveplace”)
(setq-default save-place t)
(require ‘saveplace)

Yahoo! Bleeding February 3, 2009 at 1:03 pm

I can’t help but notice the steady stream of high level exodus @ Yahoo! It’s not surprising with a change of command, but the flight seems extra-ordinary to me and I find it disturbing for Yahoo! Below are some of news stream I’ve encountered:

Mac RDC & Wallsaver January 28, 2009 at 6:52 am

A few cool Mac downloads I’ve come across this week…

This RDC client enables you to remotely connect to a Windows computer and control its desktop, from your Mac. Awesome!

Wallsaver is a widget that enables screensavers as background. I like how quickly you can switch it on/off to go between screensaver and wallpapers. Unbelievably cool to have the Matrix screensaver running on the background. I do feel like I’m Neo… 🙂

Crayon Physics on iPhone January 13, 2009 at 3:17 am

Ran across an iPhone port of Crayon Physics… I was blown away by the simple but ultra-cool 2D physics puzzle game. The simple goal is to guide a ball to hit a target star by drawing 2D objects that interact with it. Worth every penny of its cost of 99 cents (the deluxe version costs $4.99), check it out here…

Where’s The Juice? January 9, 2009 at 8:35 am

Ever wonder how the battery is powering different components in your laptop computer? The the pie chart below gives you an idea what’s sucking up the juice…

NXML-Mode December 30, 2008 at 12:52 pm

One of the things I love about Emacs is its extensibility. It has all sorts of different edit modes for different file types. For example, SGML mode comes standard for editing XML & HTML. It’s a step up from normal text edit mode, it renders tags in color fonts. But it’s pretty plain vanilla editing– no syntax validation nor smart tag completion.

I started to use nxml-mode earlier this week and am liking it. Here’re some of the nice features:

  • Smarter rendering of tags
  • Real-time syntax checking
  • Tag completion
  • Support of folding
  • Link handling

You can download nxml-mode here. The latest file as of this writing is “nxml-mode-20041004.tar.gz”. Unzip the package into the standard emacs “site-lisp” directory (it’s /usr/share/emacs/site-lisp on my macbook).

Configure it to auto-load and bind to various file extension via the following configuration in your .emacs file:

(load “rng-auto.el”)
(add-to-list ‘auto-mode-alist
              (cons (concat “\\.” (regexp-opt ‘(“xml” “xsd” “sch” “rng” “xslt” “svg” “rss”) t) “\\'”)
(setq magic-mode-alist
      (cons ‘(“<???xml ” . nxml-mode)
(fset ‘xml-mode ‘nxml-mode)
(fset ‘html-mode ‘nxml-mode)

Secured USB Drive November 22, 2008 at 4:50 am

I saw a good deal for a 4GB USB/thumb drive on one of the deal sites I frequent this week. It’s pretty bare bone but it meets my 2 requirements: a retractable USB head and a small form factor to be attached to a key chain.

imageI then secured it by encrypting its content using TrueCrypt, an open-source encryption software. Encrypting/decrypting files has always been a pain, but TrueCrypt makes it easy. You basically read and write the files seamlessly as a password-protected mounted drive. Encrypting and decrypting are done on the fly automatically. Piece of cake…

The best part is that since TrueCrypt is available in Windows, Mac and Linux, my personal data on the new USB drive is now both secure and truly portable across platforms.

Sweet! 🙂

Fake Calls on iPhone November 5, 2008 at 10:44 am

A little company developed an iPhone application that fakes calls to yourself. Ha! A great meeting escape-hatch.

A Sweet and simple app…

Wikipedia for Schools October 24, 2008 at 11:01 am

This is cool if you have children like me. The full Wikipedia for Schools selection has been made available on a DVD. It’s a free and community-based alternative to Microsoft Encarta and the likes. Very cool…

K&A may be a bit too young for this, but I’ll make them a copy and check it out.

You can download it via BitTorrent here.

iPhones: Apple’s Bread Winner October 21, 2008 at 10:21 pm

There are some folks that claim iPhone makes up as much as 40% of Apple’s revenue. How many companies can claim that type of success with their 1st or 2nd generation product in a brand new industry? The company is on a tear. In fact, it’s already supplanting older and more established products like Macs & iPods as the bread-winner.

The company’s recent string of hit products is just amazing if you remember the old days of Gil Amelio. Whatever happened to him?

Chrome is Lean & Nimble September 17, 2008 at 7:31 am


One thing I like about Chrome is that it’s fast and light. It starts up fast and performs zippier than Firefox. The memory footprint is about 1/3 to half of that uses by Firefox as the screen shot below shows. Both where running with a single tab opened. Not surprising since I have a few of Firefox plugins installed. Firefox started out as a light version of Mozilla, but has gotten fattened up a bit over the years. I’d like to think the bloat is for richer features and extensible plugins. It’s still my browser of choice, but I am finding that I’m firing up Chrome more & more when I want some quick surfing.

iTunes bug August 18, 2008 at 10:51 pm

I believe I ran into a bug with iTunes.

A few weeks ago, the credit card I was using on iTunes was replaced. As soon as I got the new replacement, I updated my iTunes account with the new card. Starting then, I wasn’t able to make purchases or update my existing iPhone apps. I’d get the error msg “The iTunes Store is unable to process purchases at this time” each time on my home PC, work PC and my iPhone itself. So it’s clear, it’s a server bug not client. I roamed the forums but didn’t see anything helpful.

The workaround? I create a new iTunes account and now I can make purchases & updates finally.

WordPress iPhone app July 22, 2008 at 12:12 pm

Just installed the new iPhone app from WordPress. Sweet…
Blogging this post from my iPhone! 🙂

Multiple Emacs Shells at 8:41 am

Sometimes instead of running several sessions of SSH’s or putty’s, I run Emacs with multiple shells– this cuts down on the number of windows I have to deal with.

To run a shell in Emacs, you invoke the Lisp function “shell” via meta-x shell. This creates a buffer called *shell*. Running it the second time though doesn’t create a 2nd shell buffer as you might expect, instead it brings you back to the original shell buffer. The trick is to rename the original buffer to avoid name collision. The quickest way to do this is via “rename-uniquely" function via meta-x rename-uniquely. It renames the buffer to a similar but unique name like "*shell*<2>“. Now if you start another shell.

The better behavior is for Emacs to automatically create new buffer with unique name. Perhaps there’s a hook to configure this that somebody can point me to.

Where’s My Wand? July 17, 2008 at 7:40 am

I was lining up at the AT&T store last night to pick up my iPhone. This one guy at the front of the line picked up his phone a few minutes earlier and came up to the employee:

Guy: “Where’s the wand to my iPhone?”

Employee: “What wand?”

G: “You know the thing you write on the screen with.”

E: “Oh, iPhone doesn’t have one, you don’t need it!”

G: “Then how am I going to write it?”

E: “You use your finger, it’s a touch screen.”

G: “But I need a wand”

E: “You really don’t need it, let me show you…”

E: showed the guy how to use it

G: “I want my wand, where’s my wand?”

The episode cracks me & all the folks at the store up. And it goes to show some people are buying into this iPhone craze without really understanding the product they’re buying. 🙂

Ah, the omnipotence of Steve Jobs…