Setting everything up
Ok, so here's the deal: I made my mind about moving to a different blogging platform for a while now. I used to have everything under Wordpress, but that proved to be a constant source of headaches.
The main problem was, I had my installation under shared hosting. That meant that all I got was access via FTP, no custom software installation and, worst of all, auto-updates for Wordpress triggered without warning. This was a problem because updating Wordpress would undo all my customizations, but not updating Wordpress left me open to several security bugs.
This, of course, led to the famed spam problem. I wrote a fairly simple spam detector that would catch around 99% of the spam, but it would break after every update. So as a result, one day I'd log into my control panel, and surprise! 900 spam comments to check. And I've also been kicked out of my own FTP several times, due to a fun IP check implemente by my soon-to-be-former hosting.
So I set myself to have a blog system to my taste.
The system in which I'm currently writing is written in Bash, and I'm typing this on ViM. This works for me because, in no particular order,
- I can write HTML without Wordpress re-writing it afterwards. Super useful for typing code.
- No security holes. Given that all the HTML will be static, I can forget about constant updates. Once I write the processing for comments (which will be available, in a process I'll explain in a future post) and I double check that it's secure, I'm done. No cookies, no magic_quotes, no SQL Injection.
- Easy to backup and migrate. Porting my old blog here will be hell, but porting this one somewhere is as easy as copying a folder, and problem solved.
I guess I'll eventually open source the code, but seriously, is just Bash code (89 lines and counting). It's a shame I couldn't get myself to write it in Haskell, but there was just too much string processing. Maybe next time.
There is a good chance that this post it's completely useless for you. It is useless to me too, but if I don't write posts I can't check whether my code is working correctly or not. In no particular order, the list of bugs I squashed with this:
- A problem with
sed
and newlines, solved via thetr
utility