Wednesday, October 24th, 2007
I recently found that you can close bash file descriptors fairly easily, it goes like this: exec 0>&- # close stdin exec 1>&- # close stdout exec 2>&- # close stderr Which makes it easy to daemonize things using only bash (lets face it there are times when you JUST don’t need anything more than [...]
Sunday, October 14th, 2007
Lets say you want to run some command, such as /bin/long-command on a set of directories. And you have a lot of directories. You know it’ll take forever to complete serially, so you want to cook up a way to run these commands in parallel. You know the server CAN handle more than one command [...]
Wednesday, October 10th, 2007
We’ve been asked how we manage serving files from Amazons very cool S3 service at WordPress.com… This is how. (covering a requested image already stored on S3, not the upload -> s3 process) A request comes into pound for a file. Pound hashes the hostname (via a custom patch which we have not, but may, [...]
Wednesday, October 10th, 2007
for i in $(/sbin/ifconfig | grep addr: | cut -d’:’ -f2 | cut -d’ ‘ -f1 | grep -Ev ‘^$’); do echo -n $i”, “; done | sed -r s/’, $’/”/g; echo
Saturday, October 6th, 2007
this is amazing: http://jan.kneschke.de/2007/10/7/wormhole-index-reads and I cant wait to try it somewhere!
Wednesday, October 3rd, 2007
This leaf is capable of running a script on the local server in response to the !deploy channel command. For security you have to authenticate first. To do so you send it a message with a password. it then it http authenticates against a specific url with your nickname and the mesage text as the [...]
Tuesday, October 2nd, 2007
This handy little bot keeps track of RSS feeds, and announces in the channel when one is updated. (note: be sure to edit the path to the datafiles) Each poller runs inside its own ruby thread, and can be run on its own independent schedule require ‘thread’ require ‘rss/1.0′ require ‘rss/2.0′ require ‘open-uri’ require ‘fileutils’ [...]
Tuesday, October 2nd, 2007
This bot is perfect for anything where you need to easily build IRC channel notifications into an existing process. It’s simple, clean, and agnostic. Quite simply you connect to a TCP port, give it one line, the port closes, the line given shows up in the channel. eg: echo ‘hello’ | nc -q 1 bothost [...]
Tuesday, October 2nd, 2007
What an awesome awesome thing for people who use IRC in their day to day lives! I’ll post a couple of utility leaves here real quick. Link: http://www.shutupgeorge.com/al-docs/