Archive for February, 2008

Platform-Independent Bitwise Rotation function

A simple macro to rotate the bits of an unsigned 32-bit value. using shift-left and shift-right we can achieve rotate-left and rotate-right.

#define rotlFixed(x,n) (((x) << (n)) | ((x) >> (32 - (n))))

#define rotrFixed(x,n) (((x) >> (n)) | ((x) << (32 - (n))))

The macro above can be trivially converted to a function and used in C# for example.

JavaScript font detector

I found this little JavaScript utility that tests for the existence of a specific font on the client machine.
I thought it would be very handy to use for my church’s website (coming soon) which will probably have some content written in the Coptic language.

Most probably we will be using Athanasuis font.

Anyways, I want to save the script here in case the original site goes down or something.

The script is released under Apache License, Version 2.0

You Suck At Photoshop

I stumbled on this series of youtube episodes at digg.com and I think they are amazing.

if you have a few minutes check them out. each episode is like 5 minutes long.

Here is episode #2 but definitely check out the other episodes as well in the related videos section.