These are some Ruby scripts I wrote. They took me about a day to write. It's a remote command system. So the server listens (on port 2000 by default) and you can send commands to it with the client like "shutdown" or "volume" to shut the computer running the server down or change the volume. The server uses multithreading so it can accept multiple connections. I also made a GUI for the client with TK which needs to be installed (I actually have no idea if it comes in stdlib or not). I know that the socket library does come in stdlib though, which is what I used for the networking. The server commands are hard coded for Linux right now. It would be really easy to code it for Mac, or BSD (or even Windows). I had some major problems getting it to run with root privleges but in the end I made a very simple wrapper in C which I made belong to root and then I made it a setuid executable. I could go into tons of detail about that... but I won't. Anyways, I know that as soon as I share this something in my brain will make me never want to touch it again. Whatever. Anyone can do whatever they want with these scripts, I don't care.
rcClient
rcServer