Posts Tagged ‘tools’

Testing Email in Django The Easy Way

Wednesday, January 20th, 2010

Today a coworker showed me a very easy way to test django code that sends emails.  It’s straight from the documentation:

Another approach is to use a “dumb” SMTP server that receives the e-mails locally and displays them to the terminal, but does not actually send anything. Python has a built-in way to accomplish this with a single command:

python -m smtpd -n -c DebuggingServer localhost:1025

This command will start a simple SMTP server listening on port 1025 of localhost. This server simply prints to standard output all e-mail headers and the e-mail body. You then only need to set the EMAIL_HOST and EMAIL_PORT accordingly, and you are set.

Rot13 Utility

Friday, January 11th, 2008

Rot13 is a common method for obfuscating text, often used to randomize passwords or to hide “spoilers” from online discussions. The tool I most commonly use to translate rot13′d text is http://www.rot13.com/, and that works well for translating long sections of ciphertext back in to plaintext. However, often there is just one or a few words to be translated from plaintext to ciphertext, and I find the site to be too much overhead for the task.

That’s why I made a simple php script on my website to do my rot13 translations from now on. The key difference between mine and rot13.com is that the form on mine uses the GET method rather than POST. This allows me to make a firefox bookmark to translate text directly from the url bar. To do this, bookmark this url: http://timsaylor.com/tools/rot13.php?plaintext=%s. Then in the bookmark’s properties add a value to the keyword field. My keyword is “rot”, so now whenever I type “rot [text]” into my url bar, it sends that to my script and opens a page with the ciphertext.

It’s just a simple utility, and writing this blog post about it took longer than actually making the script itself. I just had to rot13 something today, though, and I remembered wishing that I could do it more simply. A quick search turned up this rot13 php function, which meant all the hard work was done. I just wrapped that up in an html form and put it online. The source is here.

Maker Faire Videos

Thursday, September 20th, 2007

I’ve been planning to go to the Maker Faire in Austin, Texas this October, and I’m surprised none of you are interested in going too. If you’re not familiar with the kind of stuff that’ll be there, here’s some videos showing the cool stuff at the first two faires.

http://revision3.com/systm/makerfaire
http://revision3.com/systm/maker07

Check out information about this years faire at http://www.makerfaire.com.

Using Screen for Unreliable Connections

Friday, June 8th, 2007

The other day I was working in a coffee shop and their internet connection went down a couple times. Unfortunately, I was ssh’ed into another box where my work was. Fortunately, I was using screen. I figured my session would disconnect and be sitting there ready for me to reconnect when the link came back up. Sure enough, it was. Saved me a lot of hassle reopening my files and saving more frequently. Here’s the article that describes how to reconnect to a lost screen session after your ssh session times out (not that it’s that difficult, but I’m sure I’ll forget and have to reference this).