Let’s say you have this IOT device like a motion detection camera. Which sends you emails. Emails you keep in a separate IMAP mailbox. Lots of emails. So you want to delete those emails in some automated fashion, because doing that daily is oh so boring (remember, lots of emails).
Wouldn’t it be great if there was like some handy command line tool that would delete the oldest emails and keep like a 1.000 or 500 of them only? Well yes, that way I could script that annoying job and run it daily.
I didn’t find something that already did this. So I figured I’d be able to whip something up in an hour or so using PowerShell, or maybe a small .NET console application using an existing IMAP library.
Well, 3 different IMAP libraries and about 4 hours later I did have something rudimentary that finally did what it was supposed to do. Delete the oldest email, and leave the most recent 1000 (or whatever number you want) behind. That took longer than expected, so to regain as much time spent on this as possible I threw the ImapCleanup tool on GitHub, including binary downloads. I hope someone else will find this useful as well.
Beware though. This tool deletes emails. Be careful which mailbox you point this at, and make sure you test it in advance on a dummy mailbox. Maybe your email server behaves differently than mine, and important emails get digitally shredded by mistake.
A while ago I saw this Facebook post in a breakcore group pass by with a call for submissions for a compilation album on some net-label. So I checked some of my unfinished tunes and found something suitable to finish and submit.
So here it is. The album turned out to be a “glorious mess” of very different types of breakcore tunes. Check it out if you want to be surprised and feel like listening to a something different. I bet you’ll find something cool you like in there. If not, no big loss. You can listen to the full album here and on Bandcamp, and download for free if you want.
Years ago I ran into a website offering crude design advice. I thought it would be funny to make something similar for programming advice or guidelines. I started with a one-page website with a bunch of tips and then after a while forgot about it. Recently I ran into that project again and figured I might as well put it out here for the heck of it.
So here it is, some good fucking programming guidelines for you developers out there to have a laugh with, or perhaps even find a few useful tips and links in there. I swear, most of those tips are actually valid, even though they are presented in a tongue in cheek way.
So have fun with it. I know I did when I built the damn thing.
Log files are dull to look at. Lines and lines of text and no pretty colors to make it nicer to look at and easier to spot those weird errors you can’t simulate on your machine.
Vim rocks and writing a syntax file is supposed to be a breeze judging from the vast amount of syntax plugins out there. I didn’t quite find one I liked for syntax highlighting HTTP log files, so I thought I’d get down and dirty with some vimscript myself and see if I could hack something together.
It turned out alright I think. So to share the fun I’m hosting the logsyntax.vim plugin on Github and the vim.org scripts library for all to use. It highlights dates, HTTP verbs, URLs, IP addresses etc for IIS, W3C extended, NCSA and probably a bunch more typical log formats.
A while ago I noticed that some of my older posts had some silly misspellings in it, so I was looking for a way to spell check all my posts in one shot. I couldn’t really find anything that was free, so I figured I’d try to write something myself to do this for me.
I knew about the free and open source Hunspell spell checker and that you can use it from the command line. So I thought using that together with the WordPress export XML file which has all your post’s content it should be possible to spell check the whole lot.
The end result is a PowerShell script which reads out the XML export file and runs it through Hunspell, parses the spelling errors found and finally bundling it all into a simple HTML report.
It worked nicely for me, even though it’s pretty crude and simple. I only had to use this once, so I don’t see the point of fine-tuning it a lot further.
However this could be handy for others who want to do the same thing, so I cleaned it up a bit, slapped a readme file on it and posted it on Github as the WordPress full site spell checker.
Check it out if you want to spell check your WordPress blog in a single run and maybe this will be good enough to get your job done. You find more info on how to set up and use it on the Github page.
Space invaders. Probably one of the first computer games I ever played on a console. The blocky invaders have turned into pieces of geek culture all by themselves showing up all over the place from graffiti to tattoos and post-it art. So at one point I ran into this image on Flickr with yet another space invader on it and thought it would be great to use that as a desktop wallpaper somehow. I tried it out but didn’t like the result enough so I decided to make my own. From there I had a template to create some more and now I’m putting them up here for you to download. Yay!
All images are Creative Commons licensed so you can use them quite freely and share them with anyone you like. To maintain the crispness of the awesome gradient backgrounds (yeah, that’s about how far my Gimping skills go) all images are saved in PNG format for maximum quality. I’m also sharing the original GIMP XCF project files with these so that you can go ahead and create your own smashing mash-up of the space invader wallpaper suited to your own personal taste. There’s a template in there with the space invader ranging from very small to rather large. New backgrounds, new resolutions, new compositions, it’s all within your grasp if you get yourself a free copy of GIMP. Don’t forget to link back here if you create something truly awesome btw. I don’t mind some kick-ass wallpapers myself.
All files are released under the Creative Commons Attribution-Share-Alike license just to keep things a tad fair and make sure that everyone finds it way to the source files and gets the same chances of being creative with them. It’s all about the sharing baby!
Images are available in a blue, gold and green background and in 1024×768, 1280×1024, 1440×900 and 1680×1050 screen sizes.
Click the images to get a larger preview. To download you just click that little blue arrow appearing in the right upper corned when hovering the thumbnail.
Can’t see a widget? No problem, click here for direct linkage.