Testing Charm, a console based blogging application

Posted: July 7th, 2011 | Author: Rob Searles | Filed under: General | Tags: , , | Comments

One of my favourite blog is Motho ke motho ka botho. It’s all about Linux and getting the most out of old and low powered machines. As you probably expect, it heavily promotes console based applications – which is great for me and my continual search for lightweight efficiency (read as happily playing about with new things and possibly not getting too much done).

In the list of software is a little application called Charm. This is a console based publishing tool for (amongst others) Wordpress. Well, I had to give it a go – which is exactly what I am doing right now. It is pretty simple to set up, and fortunately allowed me to switch my editor from Vim to Emacs (and start flamewares…now).

I still have to have a good poke around, I don’t know if it can schedule posts, or save as drafts etc etc, but so far it looks pretty good. I also want to test out Emacs’s Weblogger Mode, the quest for my console based utopia continues.


Live Unsigned Server Stack

Posted: June 22nd, 2011 | Author: Rob Searles | Filed under: Servers | Tags: , , , , , | Comments

Disclaimer: this post is definitely sponsored by 6sync – they bake delicious virtual servers.

As mentioned in a previous post, the Live Unsigned website is now very generously hosted by 6Sync.

This is great for a couple of reasons. Firstly, Live Unsigned has a decent server in which to grow. Secondly, and most importantly, it meant I had a blank canvas to work with to get the server exactly as I wanted it. Things like this are fun! The setup I went with in the end was Debian 6, Nginx, MySQL, PHP5.3 (with PHP-FPM), Memcache and finally postfix for the mail serving. Following is a little description of each step required.

Read the rest of this entry »


Live Unsigned Sponsored by 6Sync

Posted: May 13th, 2011 | Author: Rob Searles | Filed under: General | Tags: , , | Comments

A number of weeks ago, the lovely people at 6sync were nice enough to host Live Unsigned*, in exchange for a plug or two on this blog.  To me, this seemed like a very fair exchange, also it meant that I had a nice clean server which I could set up just as I wanted so as to handle the increasing traffic Live Unsigned is getting.

Over the next few posts I’ll be outlining how I set up the server, along with any issues and gotchas, plus I’ll most probably be talking about Biscuit – 6sync’s control panel.

For all you cynics out there, don’t worry, I’ll be maintaining my editorial integrity. This blog is not going to turn into one big advert! But, I do want to say a big thanks to Mario and the 6Sync team.

* For those of you that don’t know, Live Unsigned is a weekend project that my girlfriend Elizabeth and I are running in order to keep ourselves sane!


Amazon S3: easily bulk delete buckets

Posted: May 11th, 2011 | Author: Rob Searles | Filed under: General, Linux, Tutorials | Tags: , | Comments

With Jabbakam we save a lot of images. All these images are stored in Amazon’s S3. Recently I thought I’d delete some of the test buckets.

Not as easy as I first thought. It turns out that you have to empty buckets before you can delete them. Fair enough, but there didn’t seem to be a way to easily bulk delete hundreds of images.

After some Googling I found Robert LaThanh’s S3Nukem which looked like it would do the job. All I needed to do now was fire up an EC2 instance, install and run. The steps were as follows:

  1. Create an EC2 instance on AWS (I used Ubuntu on a medium instance)
  2. make sure it is all up-to-date
    apt-get update
    apt-get upgrade
  3. install ruby (if not already installed)
    apt-get install ruby1.8 ruby1.8-dev

    (not sure about ruby1.8-dev, but added just in case)

  4. install Ruby Gems
    apt-get install rubygems
  5. install right_aws and s3nukem
    gem install right_aws
    cd /tmp
    wget http://github.com/lathanh/s3nukem/raw/master/s3nukem --no-check-certificate
    chmod +x s3nukem
  6. run
    ./s3nukem -t 20 -a  -s

Several hours and over 15 million deleted images later it was all done and I shut down the instance.


Emacs Weekly Tip #4: Super Quick Navigation with Registers

Posted: May 9th, 2011 | Author: Rob Searles | Filed under: Emacs | Tags: , | Comments

If like me you are constantly bouncing about between different places within a file, or even between multiple buffers then you should save a lot of time by using Registers.

Registers are a handy little tool that enable you to save a snippet of information for the length of your session. This snippet of information can be either text, numbers, rectangles and even window configurations.

For the benefit of this tip, however, we’ll be saving a position within the register. It is so simple, it is actually quite silly.

When you are at a position you want to save, simply enter:

C-x r <space> q

This will save your current location into the register “q”. You can replace “q” with any single character. For some reason I always use “q”, “w”, “e”, “r” etc. but you can use whatever you want.

To remember this command, you simply need to think about saving a space in a register called q.

Jumping back to the position saved in the register is just as simple

C-x r j q

You are jumping to register q

Once you have the hang of it, it’s pretty effortless.

Soon you’ll be jumping about like a maniac!


Emacs Weekly Tip #3: Learn Org-Mode

Posted: April 18th, 2011 | Author: Rob Searles | Filed under: Emacs | Tags: , | Comments

As my aversion to all things rodent orientated increases and my use of Emacs grows so too does my use of org-mode.

Org-Mode probably doesn’t need any introduction. It can be used for pretty much any sort of organising you require, from sketching out blog posts (this article was drafted in Org-Mode before being published to Wordpress) to a full productivity and GTD suite.

The Emacs tip this week isn’t about highlighting all the useful features Org-Mode has to offer, but instead it is more of a “How-to-Learn” rather than a “How-To”.

Read the rest of this entry »


Emacs Weekly Tip #2: Recent Files with recentf

Posted: April 11th, 2011 | Author: Rob Searles | Filed under: Emacs | Tags: , | Comments

In my daily Emacs activities I open a lot of files. However, during the week I am normally opening the same files as I’m generally working on the same stuff. Emacs’s Recent Files (recentf) feature generates a list of my recently used files and allows me to display that list so I can quickly open any of them.

To enable recentf mode, add the following into your Emacs init file (which you are version controlling right?)

;; recentf stuff
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)

If you use Tramp a lot you may want to disable the auto-cleanup command for Recentf. This is simply because every now an then, if enabled, the auto-cleanup feature scans a list of your recent files, and tries to stat them to see if they should remain in the list. Obviously, if it tries to stat any remote files this may cause your system to temporarily hang.

;; recentf stuff
(require 'recentf)
(setq recentf-auto-cleanup 'never) ;; disable before we start recentf!
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)

Now use Emacs for a bit to generate a list of your recently used files. Next time you open Emacs, simply hit C-x C-r and you’ll be greeted with a list of your recently used files.

A great time saver.

For more info, visit the Emacs Wiki page.


Awesome WM Clicky Widget

Posted: April 6th, 2011 | Author: Rob Searles | Filed under: Linux, Tutorials | Tags: , | Comments

Awesome WM Clicky WidgetAs some of you know, whilst Emacs is my editor (et al.) of choice my favourite window manger is Awesome. Awesome is, according to the website,

.. extremely fast, small, dynamic and heavily extensible using the Lua programming language

I’ve never delved into Lua before, but since using Awesome I’ve had to play around with a bunch of config files. They have always looked very clean and simple so, this weekend, with a spare couple of hours to kill I thought I’d have a play around with Lua and see if Awesome really is as “heavily extensible” as the claims make out.

A couple of weeks ago I set up real time web analytics on a number of sites with Clicky. Clicky have an incredibly simple API which I thought would be perfect to play around with.

I decided to try and build a widget that displays the total visitors and actions for a specified website. Really simple, but also quite useful. I had never written anything in Lua before, or even played around with widgets too much in Awesome. Fortunately both Awesome and Lua made the whole thing fantastically easy and fun. What follows is the code I wrote, use it if you want to, it’s just an example of what I did with my first attempt, so feel free to extend it as you want.

Read the rest of this entry »


Emacs Weekly Tip #1: Version Control Emacs.d

Posted: April 4th, 2011 | Author: Rob Searles | Filed under: Emacs | Tags: , | Comments

Welcome to the first of my weekly Emacs top tips.

This first tip is something that I’m seeing more and more people do, especially with the excellent Emacs Starter Kit aiming to get Emacs newbies up and running quickly:
Version control your emacs.d directory.

This technique is especially useful if you have a number of development machines that you work from (desktop, laptop, remote server).  This is the reason why I started to version control my .emacs.d directory. Whilst my configuration is still very basic (for now) I find it invaluable.

Whilst it is useful to version control your configuration file, a happy side effect of the increasing prevalence of services like GitHub is that you can see other Emacs users’ setups. It is great to look at these, borrow some ideas and lean some new techniques. After some Googling, I’ve quickly compiled the  list below from GitHub, which is by no means exhaustive:

So what are you waiting for? Put your Emacs config directory into Git, share it on GitHub and post the respoitory URL in the comments below.


Introducing Emacs Weekly Tips

Posted: April 1st, 2011 | Author: Rob Searles | Filed under: Emacs | Tags: , | Comments

As regular readers of my poor, infrequently updated blog may know my editor of choice is the wondrously magnificent Emacs.  One of the reasons I like Emacs is because there is so much more to learn. I can easily imagine that one could spend every day for a whole year learning a new technique, mode or snippet within Emacs and still not come close to learning all there is to know about it.

Sadly, I’m not dedicated enough to learn a new tip every day.

However,  I am going to try and learn one a week. My aim is to pick up a new Emacs top tip, use it for a week and post about it here on my blog. This should hopefully increase my knowledge of Emacs and server as a repository of this information.

So, tune in every Monday for my Emacs Tip of the Week!

For those that can’t wait, there are loads of great places for all things Emacs out there. Check out: