Idea: using a URI for sending email
25 Nov 2004In order to send an email over SMTP, you need 2 sets of information:
In order to send an email over SMTP, you need 2 sets of information:
There’s only one way to check if podcasting can change your life, and that is by diving completely into it. Since last week, I am the proud owner of a 20GB iPod, (the first Apple product I have ever bought) and it is hard not to be enthusiastic about it. It might not be the cheapest hard-disk MP3 player around, but it is by far the most funky. Especially the user interface was very intuitive, which is important for the ain’t-gonna-RTFM person that I am.
I have one server with apparently an exceptional stability:
While working on some bandwidth-related stuff (my bandwidth calculator), I came across an excellent article on “latency vs. bandwidth” by Stuart Cheshire. It was originally written in 1996, so focuses a lot on modems, but Fact 1, 2 and 4 are still valid.
I remember when I saw my first double-neck guitar, I was really impressed. That seemed like a huge thing to have hanging from your neck. They became really popular in the Led Zeppelin, Yes and The Who era. The idea is to have 2 guitars handy, like a 6-string and a 12-string, or a bass and a guitar, a fretted and a fretless bass, or 2 guitars in a different tuning. But obviously it’s also one of those macho “size-matters” things. The guitarist with the double-neck here is Jimmy Page from Led Zeppelin.
There are two main tools to keep track of your CPU usage: top
and vmstat
.
Let’s say you need an (approximate) count of the number of lines in a huge file. The most obvious way of calculating this would be using wc
, but this actually can be quite slow:
> time wc -l /var/log/squid/access.log
2812824 /var/log/squid/access.log
real 0m43.988s
# (counting is done at 64.000 lines/sec)
You have a huge file that contains one line per request/transaction. Some lines are of one type (e.g. ‘HIT’), some of another (e.g. MISS). Let’s say you want to calculate the hit-rate, but as fast as possible.
We take a Squid log file of about 140MB. How long does it take to count how many lines it has?
$ time wc -l /var/log/squid/access.log
845212 /var/log/squid/access.log
real 0m6.523s
(about 21.4 MB/s or 130.000 lines/s)
If your Squid server logs the referers of its request (i.e.
--enable-referer-log
before compiling andreferer_log /var/log/squid/referer.log
in your squid.conf
file),#!/bin/bash