Subversion @ GitHub

I wanted to use Subversion to checkout one of my GitHub repo branches, because an svn checkout only downloads the files it needs, not a full copy of every file ever added. But I discovered that GitHub sunset Subversion integration earlier this year. Sad face. Still, I suppose the economics justify that decision. As a consequence of my research, which was a bit sketchy because there is still heaps of documentation out there referring to the GitHub features which no longer exist, I did happen to learn about:

Mail log IP address count

The following monster will parse the mail log and report on unique host connections along with a count.

cat /var/log/mail.log | \
  grep ' connect from unknown' | \
  awk '{ print $8 }' | \
  sort | \
  sed -n 's/.*\[\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\)\].*/\1/p' | \
  awk '{count[$1]++} END {for (word in count) print count[word], word}' | \
  sort -n