MacPorts does not work anymore (I fear some problem with SSL certs). It is unsable to surf the web but still work pretty well with its outdated iLife suite.
I have a gcc 4.x and the developer toolkit.
X11 Server works but it seems pretty slow to do run it as a remote display
The simplest application could be as a static http server, but seems a bit too much power hungry for this.
Another ideas is to recompile some embedded software like sqlite3 and use it as a "server database via ssh"... some other nice ideas?
Then I read where you can install El Capitan on these systems and it will do a microcode upgrade. There's a free download on Apple's site (sorry, don't have the URL handy). I downloaded it, ran it, but it still wouldn't install right.
But the u-code upgrade did allow me to install Mavericks on it whereas before that wouldn't work. So it's a reasonable system for someone to use again and I have it listed on eBay. Probably won't get much for it, and it's a lot of trouble to take pictures, fiddle with eBay listings, etc., but at least it will get used and not just thrown in the trash. I hate throwing away a system that's usable. I'd give it to someone I knew who could use it but everyone I asked already has a computer.
It would be too much power hungry for everything. You will have a better experience with any VPS you can buy on the cost of the power bill of that iMac and you will also get a modern OS for free.
It is too old and too slow even if you upgrade the RAM and change the disk to SSD.