Archive for February, 2007

note to self: speed up wordpress

ways to speed up wordpress.

Check this out later.

Determine the size of Java objects at runtime.

This is a great summary of how to do this with the new Instrument package in Java 5+.

The article boils it down very well, but the ultra nutshell version is that you define a class that gets loaded as a “pre-main” agent. First, create a simple implementation of java.lang.instrument.Instrument, creating a manifest file, putting the class file into a jar (with the manifest). Then, start your java application (like tomcat or whatever) with -javaagent:jarfile. Finally, in your code, call your SizeAgent class like this:

   try {
      int size = SizeAgent.sizeOf("some java object, like maybe this string");
   } catch (IllegalStateException e) {
      // size agent is not loaded by -javaagent switch
   }

Funny Jobs vs Gates Cartoon

here.

Let’s Search on the Googe

Nice typo.

the googe

The Next Big Language

A nice one from Stevie.

Reality Clarification Field

Steve Jobs gets it, not surprisingly I suppose. The big question is this:

Jobs can convince smart software people to go along with crazy, unrealistic ideas. Can he convince the idiots at the big music companies of the harsh reality of the digital future? That DRM will never work?

I doubt it. They’ll only be convinced when their business is dead and gone.

How to install a private mail server certificate on Mac OS X

If you run your own SSL mail server (imap or pop or smtp), you probably have a self-signed certificate. This will make your Mail application complain that the certificate is not trusted. Since you can trust your own self-signed cert, you need to add your certificate to the trusted list on your own mac. Here is how (on Tiger, maybe a little different for other versions):

  1. Download your CA certificate and put on your desktop. Call it mycert.crt or whatever.
  2. Make sure you’re logged in an a user with administrative privileges.
  3. Open /Applications/Utilities/Keychain Access
  4. Select File - Import
  5. Select the file mycert.crt
  6. Chose “X509 Anchors” as the destination for the import. Note: don’t import it to the login keychain.
  7. Give your password when prompted.

That’s it. Now restart Mail and it should not complain about the self-signed certificate.