My laptop refused to boot early this week. It beeped and printed "Fan Error" on screen. The laptop has been with me for almost two years and after seeing the error it occurred to me that I have never opened it, not even once, and now I have to.
One thing I love about Thinkpads is how well documented they are. I was immediately able to obtain the hardware service manual from Lenovo's website and got to work stripping the bezels, keyboard and palm rest to get to the dirty fan.
For the voyeuristic pleasure of my fellow geeks, I took some pics of my naked T61, after I cleaned it up, of course. Enjoy !!



Friday, June 05, 2009
A Naked T61
Posted by
Ham-the-geek
at
3:26 PM
2
comments
Links to this post
Saturday, May 30, 2009
ExtJS Tip : Dynamically change a button icon
This works for ExtJS 2 or higher. Oddly, there is no method in the button class that allows you to change the icon dynamically. This is useful if you want to reuse buttons in the toolbar for example.
I found an override from this forum post which worked for me after a few tweaks.
Ext.override(Ext.Button, {
setIcon: function(url){
if (this.rendered){
var btnEl = this.getEl().child(this.buttonSelector);
btnEl.setStyle('background-image', 'url(' +url+')');
}
}
})
Posted by
Ham-the-geek
at
10:31 PM
0
comments
Links to this post
Friday, May 29, 2009
An exercise in Metacognition ... computer for sale ads
A Facebook buddy posted this as his status ...
60K PHP for brand-new MB466,2.0 GHz, IntelCore2Duo,160GB DDR3 Memory, 160GB HD, NVIDIA GeForce 9400M graphics, stndrd kbrd, aluminum unibo
What went thru my mind during the first few seconds of reading ....- 60K PHP ? Kinda expensive for a PC
- Is this a laptop or desktop ?
- MB466 ? must be the model number of something.
- 2.0 IntelCore2Duo ? really expensive PC, I could probably assemble an entry level Core i7 with 60K
- 160GB DDR3 Memory ? WOW must be a server or workstation.
- aluminum unibo ?! Great Scott ! It's a Mac !
- I immediately knew it was an ad for a computer.
- I focus too much on the price, so much so that it influences everything else about the ad, maybe that's why I don't have a Mac :-)
- I don't know the specs for a Mac when I see one.
Posted by
Ham-the-geek
at
11:02 AM
0
comments
Links to this post
Tuesday, May 19, 2009
Reusing Coffee Grounds
A couple of months ago I got myself a coffee press and started trying out different blends from my local Starbucks.
All this time I've been throwing away the coffee grounds when I could have been using them for something else.
According to the Natural Home Magazine article that this Lifehacker blog post points to, used coffee grounds can be used ...
- as deodorizer for your refrigerator
- dish washing pad
- as fertilizer
- as a facial mask
Posted by
Ham-the-geek
at
5:41 PM
0
comments
Links to this post
Tuesday, May 12, 2009
the Star Trek reboot
Firstly, I think it shouldn't be called a prequal. It's probably fashionable to make prequals after the "Star Wars" movies but this is by no means a prequal.
I would rather call it a retelling of sorts.
What if James Kirk grew up without a father ?
What if Spock is more emotional than logical ?
Star Trek : The Next Generation (TNG) was the series that turned me into a "trekkie". Prior to watching that series, I had no idea who Captain Kirk was, let alone Spock. Truth be told, I fell in love with the Star Trek of Capt. Jean Luc Picard in the 24th century because of the tech. I was fascinated by the comm badge, the hypospray, VISORS, dilithium crystal powered cores, holodecks, warp drive engines, force fields and the LCARS console.
Apparently, though, I'm not hard core enough a "trekkie" because I've been trying to get myself to watch reruns of The Original Star Trek series (TOS) but have failed miserably to finish a single episode.
I did not like the original TV series but I definitely liked watching this Star Trek movie. Yup, I liked it, in spite of the flaws in the story telling and the scientific inconsistencies.
Oddly, I liked it not for the same reasons that I liked watching TNG (the tech) , Heroes (super powers) or Fringe (mystery behind William Bell), nope I liked it because ...
- James Kirk seems more complex and driven. He is motivated to live up to his parallel self in the other timeline.
- Spock is not stubbornly logical and is giving in to his human side.
- Bones' colorful rhetoric, specially when he's upset.
- Chekov, Scotty and Sulu for the comic relief
Posted by
Ham-the-geek
at
2:18 PM
0
comments
Links to this post
I DON'T want free laptops from Sony Ericsson
I got 3 forwarded e-mails urging me to forward the e-mail to 8 people for me to get a free Sony Ericsson laptop. As a bonus, if I send it to 20 people, I get a higher spec'd Sony Ericsson laptop.
I hate to break it to you folks but Sony Ericsson makes cellphones. Both the T18 and R320 are retired cellphone models from Sony Ericcson.
A quick google search got me to the following links, all of which says that this is a big hoax !!!
Posted by
Ham-the-geek
at
12:53 PM
1 comments
Links to this post
Monday, April 13, 2009
What Your Webmail Choice Reveals About You
I have accounts on all the free web mail services. You name it, I have it. It's partly because I work in web development but mostly because I love collecting e-mail addresses even if they get neglected every now and then.
However, my main web mail account is Gmail, it's been Gmail since 2004 and as the McDonald's ad goes," I'm Lovin It".
The Gmail personality description is so me :-) I wonder if they hired a psychologist for this article.
So which webmail service reflects your personality. Find out here.
Posted by
Ham-the-geek
at
9:31 PM
4
comments
Links to this post
Google Talk Group Chat on Pidgin
I'm not sure if it's just me but every time I am invited to a group chat on Gtalk I am given a link to log in to the gtalk web interface.
This has been somewhat annoying that Pidgin doesn't support group chats from Gtalk.
Apparently, I've been annoyed for nothing because Pidgin already supports group chats on gtalk.
I'm just not sure why pidgin doesn't automatically recognize that it's a group chat and just bring me into the conference like it does on Yahoo, MSN or the other IM services it supports.
When someone invites you to join a group chat, you get a message with some text that looks like
private-chat-xxxxxxx@groupchat.google.com and a link that launches your browser that leads you to a page that launches gtalk gadget. Note that "xxxxx" represents some random string that is most likely used to identify the group chat room.
So here's how to join a Gtalk group chat from Pidgin using the above information :
1. Click Buddies from the menu
2. Then click Join Chat
3. In the account drop down, make sure you use a Gtalk account.
4. For the Room textfield, paste private-chat-xxxxxxx
5. For the Server textfield, paste groupchat.google.com
6. Click JOIN
Posted by
Ham-the-geek
at
1:50 PM
2
comments
Links to this post
Saturday, April 11, 2009
Recursively add folders and files in CVS
One thing I really like about subversion is that an "svn add" on a folder recursively adds the folders and files inside that directory.
It's not the case with CVS, you can always do a "cvs import" but if you really need to use "cvs add", then you may find the following useful:
To recursively add directories inside a folder that is already under CVS :
find . -type d -print | grep -v CVS | xargs -n1 cvs add
To recursively add files inside a folder that is already under CVS :
find . -type f -print | grep -v CVS | xargs -n1 cvs add
Posted by
Ham-the-geek
at
11:35 PM
0
comments
Links to this post
Labels: cvs, version control
ExtJS Tip : Recursively Opening Nodes in a TreePanel
There was one client who requested an improvement that stuck in the Ajax File Storage UI package that I developed.
This client wanted the user interface to open a particular folder based on the url. For example, http://mysite.com/filemanager/?folder_id=100 should return a page that launches the UI and opens the folder with id 100.
This is a perfectly valid request but there were a few challenges, namely ;
- the treepanel nodes are loaded using ajax
- the nodes or folders to open could be several levels deep
The back-end component involved generating a list of folder_id's that led to the target folder_id. If the target folder is 3 levels deep, this folder list would have 3 folder_ids. Luckily this wasn't too hard to do in OpenACS as the heirarchy of folders in the file storage package is easy enough to get from the database.
The front-end solution is a javascript function that goes thru this list and opens each folder based on the id's on that list. Just in case it is useful to someone using the ExtJS treepanel, here's the code for that function.
asyncExpand : function(x) {
var treepanel = Ext.getCmp('treepanel');
var node = treepanel.getNodeById(this.config.initOpenFolder);
if(!node) {
var x = x+1;
var nextnodeid = this.config.pathToFolder[x];
var nextnode = treepanel.getNodeById(nextnodeid);
nextnode.on("expand",this.asyncExpand.createDelegate(this,[x]), this, {single:true});
nextnode.expand(true);
} else {
node.select()
node.fireEvent("click",node);
}
}
You will notice that it is an example of a recursive function or a function that calls itself. Allow me to break it down for you.
var treepanel = Ext.getCmp('treepanel');
Of course you need a treepanel, the one I use just happens to have the id "treepanel"
var node = treepanel.getNodeById(this.config.initOpenFolder);
this.config.initOpenFolder is the variable that holds the folder_id that the UI should open into by default. The script calls getNodeById in the hopes of getting a reference to that folder on the treepanel
If the node does not exist on the first level of the tree, we presume that it maybe on succeeding levels. This is where we make use of the folder_id list that the back-end should create for you, this list should be a javascript array.
if(!node) {
var x = x+1;
var nextnodeid = this.config.pathToFolder[x];
var nextnode = treepanel.getNodeById(nextnodeid);
nextnode.on("expand",this.asyncExpand.createDelegate(this,[x]), this, {single:true});
nextnode.expand(true);
} else {
node.select()
node.fireEvent("click",node);
}
In this case it is this.config.pathTofolder. This part of the function ...
- gets the next id on the list
- gets a reference to the node with that id
- assigns a function to the expand event of the node to call asyncExpand with the index of the next folder_id on the list.
When asyncExpand is called again, it will check to see if a node with a folder_id that matches this.config.initOpenFolder exists. If not, it will get a reference to, assign a listener to the expand event and call the expand function of the node with the given index (x) .
The process repeats until the folder with id equal to this.config.initOpenFolder is found.
Posted by
Ham-the-geek
at
8:57 PM
0
comments
Links to this post
Labels: extjs, javascript, treepanel
