Posts tagged: BLOGS

Blog comments via Mastodon

Blog comments via Mastodon

I’ve replaced my Disqus comment integration with a Mastodon-powered solution. On posts where I’ve enabled comments, you’ll now see a “Load Comments” button and a “Reply” button, both of which talk to the Mastodon API.

Adding commenting to a static site is an interesting puzzle.

GatsbyJS

This past week I started playing with GatsbyJS, a static site generator and framework centered around React.

I successfully used today it to generate a static version of this blog (I’m in the process of selecting the static site tool that will replace my vintage 2008 Django-based engine).

The componentization that React brings isn’t much of a win for me here, i.e. I’m not likely to be building components for my blog that I reuse elsewhere.

History lesson

This has been going around – give people a peek at what commands you run most often. I ran this on my server, where I spend most of my shell time:

> history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n",a[i],i}}'|sort -rn|head
  103   hg
   81   cd
   67   ll
   29   ./manage.py
   23   ab
   21   re-ap
   17   hgup
   14   svn
   13   cat
   12   ls

Notes:

  • Mercurial has pushed my use of Subversion way down.
  • I can’t remember what I was benchmarking with ab, but I’m sure it’s faster now!
  • re-ap is my alias for restarting Apache (re-po restarts Postfix, re-my restarts MySQL, etc.).
  • hgup is a simple shell script that updates the live instance of my site by fetching from the Mercurial repository in the staging instance. It would make a neat Django custom management command, but not one tied to a particular app.

Comment Spam Stats

Since January 12th:

  • Valid comments accepted by Akismet: 36
  • Spam comments accepted by Akismet: 17
  • Spam comments rejected by Akismet: 814

I don’t have a number for false positives, but given that I’ve received zero email complaints I’ll assume the number is low if not zero. This gives Akismet about a 98% success rate on catching spam, which is pretty good. It makes my life better. Having more spam comments than real comments get through the gates can be really depressing for a blog owner.

Comment Spam

Other than using Akismet, the anti-comment-spam measures I have in place here are pretty primitive. I block some common patterns and blacklist some IPs. (I don’t have plans to make it any more sophisticated since I’ve told myself any new blog engineering effort needs to go to the new Django-based version, not the old PHP5 one.)

I was looking at server logs this week and noticed an unusual number of POST requests, then realized that they were foiled comment-spam attempts. I counted them up: