Code

 

  • Archives

  • Categories

This always annoys me. Mac OS X’s Terminal’s prompt not loading promptly.

Sometimes it is something to do with Apple system logs. You can clear them through this:

sudo rm -f /private/var/log/asl/*

It works for me and I’m a happy user again, now the prompt in Terminal starts quickly when I start a new Terminal tab. Hope it helps.

 

Probably about time:

PHP 4 and MySQL 4 End of Life Announcement

First up, the announcement that developers really care about. WordPress 3.1, due in late 2010, will be the last version of WordPress to support PHP 4.

For WordPress 3.2, due in the first half of 2011, we will be raising the minimum required PHP version to 5.2. Why 5.2? Because that’s what the vast majority of WordPress users are using, and it offers substantial improvements over earlier PHP 5 releases. It is also the minimum PHP version that the Drupal and Joomla projects will be supporting in their next versions, both due out this year.

Finally!

 

Just realized this is a faster Ubuntu aptitude source in Singapore: http://ubuntu.oss.eznetsols.org/ubuntu/

You can change the source using:

sudo nano /etc/apt/sources.list

This is now my /etc/apt/sources.list:

deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid main restricted
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid main restricted

deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid universe
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid universe
deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-updates universe
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-updates universe

deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid multiverse
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid multiverse
deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-updates multiverse
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-updates multiverse

deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-security main restricted
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-security main restricted
deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-security universe
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-security universe
deb http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-security multiverse
deb-src http://ubuntu.oss.eznetsols.org/ubuntu/ lucid-security multiverse

 

This is the directory or folder where MSN or Windows Live Messenger custom emoticons are located:

For Windows XP:

C:\Documents and Settings\ [Your user name] \Local Settings\Application Data\Microsoft\Messenger\ [Your Live ID] \ObjectStore\CustomEmoticons

For Windows Vista or Windows 7:

C:\Users\ [Your user name] \AppData\Local\Microsoft\Messenger\ [Your Live ID] \CustomEmoticons

In my case (email removed), it is found in “C:\Users \kahwee \AppData \Local \Microsoft \Messenger \something@example.com \ObjectStore \CustomEmoticons”.

For Mac OS X (Snow Leopard)’s Microsoft Messenger:

/Users/ [Your user name] /Documents/Microsoft User Data/Microsoft Messenger Data/ [Your Live ID] /ObjectStore/CustomEmoticons

In my case, it is found in “/Users /kahwee /Documents /Microsoft User Data /Microsoft Messenger Data /something@example.com /ObjectStore /CustomEmoticons”

You can backup your custom emoticons by copying the directory to your flash drive or something. As far as I know, you cannot transfer Mac OS X’s Microsoft Messenger custom emoticons to your Windows’ Live Messenger and vice versa.

 

The worst part of SVN is that it’s got lots of .svn folders hidden in every single versioned directory. It has never occurred to me how terrible an idea this is until I delete a directory. I had this weird deja vu that I’m going to regret issuing that rm -rf command but I did so anyway. It’s versioned, I tell myself.

Ah, but there’s a catch

No. Once I did that I spend the next 30 minutes trying several commands to recover it, such as svn revert and svn update. They don’t work because the current directory’s .svn folder is still there and it’s just silly SVN’s way of knowing its there. Every command to revert led me, falsely, to believe my folders are all still there.

So I downloaded an entire new copy of the files I just deleted and put them back. That failed as the files I have restored manually don’t have the .svn folders. I tried committing the restored copies and the SVN server will just say the “Commit failed” with the reason “Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request for ‘…’”.

Don’t tell me what I can’t do!

Well… The thing is I wasn’t convinced. In an act of folly I deleted the parent directory which now resulted in the whole project just dead basically. Fantastic.

I should add that at this moment it all came back to me. I am certain this SHITuation happens to me at least a dozen time especially when I’m half awake.

As least Git doesn’t have that issue. Every time I use SVN, I have this feeling I’m walking on thin rope fearing to offend the Tiki gods. I guess I’m just not smart enough for SVN.

 

It’s late at night and I am still coding my project. Worst of all is that the code that I am (possibly) more proud of than the rest of the code I have is the isNumeric function:

var isNumeric = function isNumeric (s) {
        return !isNaN(parseFloat(s));
}

There, here is it. The rest of the code very well deserves to be deleted. Unpresentable, at best.

 

It’s time to abort. My project is quite some trouble. I left the implementation to the very last stage. Apparently that is quite a bad idea. I have the following greeting message staring at me:

kahwee@ubuntu:~/Project/src$ python twisted.py
Traceback (most recent call last):
  File "twisted.py", line 1, in <module>
    from twisted.internet import protocol, reactor
  File "/home/kahwee/Project/src/twisted.py", line 1, in <module>
    from twisted.internet import protocol, reactor
ImportError: No module named internet

I can never figure out why I can’t install Twisted. In the end I give up. Don’t have much time left. Tick tock tick tock. I am using Ubuntu 10.04.

 

WordPress powered and Django inspired.
Love and elephants come after.
RSS: Posts and comments.