Archive for April, 2010

Imageshack upload snippet in CURL/Bash with username

Wednesday, April 28th, 2010

You’ll need curl and xclip

sudo apt-get update && sudo apt-get install curl xclip
Code:
#!/bin/bash

curl -H Expect: --cookie "myimages=imageshackregistrationcode;" -F fileupload="@$1" -F xml=yes -# "http://www.imageshack.us/index.php"|awk -F"[<|>]" '$2=="image_link" {print $3}'|tee >(xclip -i)
EOF

You won’t have error reporting, so be careful.

claws-mail and switching filtering rules around

Wednesday, April 28th, 2010

If you’re like some of us, you filter the bejesus out of your mail. Being the postmaster recipient for an organization with under a thousand users, I get a little bit of mail.

So some of the claws-mail rules that I use, I wanted to move to folder rules. Some others I wanted to stay in filtering to run automatically. Ultimately it meant I was going to have to copy a crapload of rules into vim and paste them back and forth.

Fortunately, claws-mail stores all of its rules crap in ~/.claws-mail/matcherrc

So I shut down claws, edit the file and move everything where it needs to go. Firing claws back up showed that I had everything exactly how I wanted it.

I’m pretty new to claws but this was just a godsend. I had a lot of rules that needed to  move.