Playing with OpenShift

Openshift is a Platform As A Service offering from RedHat, and has been there for a while now. It never really came up in my radar for some reason. Fortunately I took a dive into it last week and have really liked the whole service so far.

I chose the free accounts of course, since I’m the only one who visits my own site and I really don’t need to scale to the point where I’ll need the premium offerings. The free plan comes with three small ‘gears’, which is a container that comes with 512 MB RAM and 1 Gig of space. Into this, one can slot a cartridge.. which is basically a stack for a Programming language like Perl, or a DB like MySQL.

sandbox

I’ve kicked off with just one gear for now: I’ve wanted to try out Perl Dancer and this was just the opportunity I was looking for. There were straightforward instructions in the OpenShift docs, and I had an application deployed and ready in just a few minutes post-signup.

I spent another hour or so figuring out how Dancer did it’s magic, and have made trivial modifications in the router, views and templates to understand things better. I have a PerlBrew setup locally. Together with cpanm, I can install stuff on my laptop that is in sync with what is deployed on OpenShift’s cloud.

Here then is my first foray into web application development. I don’t expect the content or the layout to stay the same for long. Currently I have used Zen::Koans to print a random koan each time a particular page is queried.

Clipperz Password manager

A few weeks back I posted a list of services I used heavily, and my password manager, LastPass was the most worrying in the list.. both because of how accustomed to it I was, and due to it’s proprietary nature. It is with some relief that I can now remove that from my list of concerns. Say hello to Clipperz.

Clipperz may be like LastPass superficially: both are zero-knowledge online password managers where the encryption happens on the client side and only encrypted data is stored and sync’d on the server. The similarities end there.

Clipperz is committed to Free software, and their code is open source and available to any one who wants to self host. Passwords are stored in ‘cards’, and auto login is provided by setting up ‘Direct Logins’ for each card. Since the scrambled password is easy to copy and paste from the card itself, I don’t use the Direct Logins feature much.

An offline version allows you to download the entire database in a self contained html file, which is useful for backups and rare offline moments.

Clipperz is now accepting registrations through Bitcoin only, in an effort to further anonymize the service. I signed up when they were still a free service, and have still not started experimenting with Bitcoin. The developers — a couple of friendly guys in Italy — were nice enough to help me with it.

All in all, it is a pleasure to see such a useful, well built tool from such nice, principled folks.

Quassel IRC

I’ve used IRC on and off in the past few years, lurking as always. The client has almost always been irssi, which I played around with again yesterday. I was happy to find an alternative, quassel that fit my self hosting, multi-platform needs even better.

Setup took about ten minutes. I only had to install quassel-core on my VPS. It’s a headless server that allows configuration from quassel-client, which you can install on GNU/Linux, Windows, or Android. The channels you join are maintained on the core, so you can disconnect and reconnect from any client and still see what went on in the interim.

quassel

The channels I’m currently browsing are somewhat high on traffic, so it is a tiny bit distracting. Anyways, I plan to use this for a few months and see if I pick up anything interesting to try out next.

Reader Alternatives

Google has announced that Reader is going to be shut down soon. Being an RSS addict, this doesn’t affect me much because I’ve spent a lot of my time trying alternatives all these years. RSS applications have a nice amount of interop between each other, since an OPML file is all you need to export/import your feeds. So it isn’t too hard to switch to an alternative. Here are some I’ve tried and approve of:

  • Rnews – Self hosted. This is still hosted on my website and is my go-to reader for relaxed browsing. It supports categories, is fast, and my favourite: does not have an unread count.

  • Newsblur – Web/Android. This is my current favourite. I liked it enough to cough up for a yearly subscription. It has a decent Android app, and can occassionally get flaky with some feeds, but is overall an extremely good application.

  • Google Currents – Android. This is a google service, so be warned :) I put this is because it caches articles offline, so it is my favourite for offline browsing in my cab every day.

  • rss2email – Self hosted/Email. I love both email and rss so this is the best of all worlds. You run this python app as a cron job and add a few feeds to it. Periodically, you get an email each time a feed is updated. I use this for low-traffic feeds.

**Update**

  • TT-RSS – Self hosted/Android. This is actually the one I’ve settled with now. rss2email continues to mail me on low traffic sites, but for heavy, daily usage, ttrss beats all the others by a mile. It is self hosted, has an android app that is well worth the little it costs, and doesn’t have annoying delay that newsblur does whenever a folder is loaded.

Emacs animations

From this neat post on Sacha Chua’s blog, I discovered M-x animate-birthday-present, and spent some time on this lovely site. The latter link is a set of tutorials that starts with Lisp basics and very quickly dives into ASCII animations in Emacs.

Here’s a neat example: Paste the following code in a scratch buffer and evaluate it with C-x C-e.

(defun follow-sine ()
(dotimes (y 70)
(erase-buffer)
(newline (round (+ 10 (* 10 (sin (/ y 10.0))))))
(dotimes (over y)
(insert " "))
(insert "*")
(sit-for 0.1)))

Then run it in an empty buffer with this:

M-: (follow-sine)

You will get an asterisk moving across the screen in a pretty sine wave :)

More importantly, this is the first hands-on look I’ve had at how playing with Emacs Lisp functions can move stuff around on the screen. Well worth a look.

etckeeper

Today I re-discovered etckeeper, which allows `/etc` to be version-controlled with a VCS (git in my case). I decided to spend some time figuring it out and stop worrying about messing things up each time I wanted to experiment with something. It also hooks in to the package manager during an upgrade or install, so that’s ones less thing to worry about.

etckeeper is written by Joey Hess, whose ikiwiki platform I’m already using to power this site. Check out his neat, minimalistic setup here. His blog is always an interesting read.

It took me less than an hour to figure things out the first time. Now I have a neat setup that runs itself: each change made to one of my dotfiles or configuration files automatically pushes the changes to the backup server and keeps it in sync.

Best of all, there is no lock-in with a third party provider, and no worry about unsupported platforms.