News aggregator

Steve Kemp: So here's a proof of concept

Planet HantsLUG - Sat, 14/06/2014 - 17:35

The simplest possible DNS-based service which I could write to explore Amazon's DNS offering has to be dynamic DNS, so I set one up..

The record skx.dhcp.io can be updated to point to your current IP by running:

curl http://dhcp.io/set/efa6961c-f3dd-11e3-955b-00163e0816a2

Or to a fixed IP:

curl http://dhcp.io/set/efa6961c-f3dd-11e3-955b-00163e0816a2/1.2.3.4

The code is modular and pretty nice, and the Amazon integration is simple.

(Although I need to write code to allow users to sign-up. I'll do that if it seems useful, I suspect there are already enough free ddns providers out there - though I might be the first to support IPv6 when I commit my next chunk of work!)

Categories: LUG Community Blogs

Steve Engledow (stilvoid): Simple mail transfer pondering

Planet ALUG - Sat, 14/06/2014 - 01:54

tl;dr I like the MIT license, mutt, tagging things, and synchronising my data between my devices.

Simplicity

As I meander through my life and career, one thing stands out as becoming more and more important as time goes by; I've noticed a definite trend in myself towards desiring simplicity above all else.

When I say that, I don't mean that I have a hankering to live in a cave and subsist on fruit. I like the complicated things that my life involves but I increasingly like to deal with them in simple ways. I find that I don't have the appetite or inclination to see an argument through nor the patience for dealing with irrationality; I'll just state my case clearly and succinctly and step away until everyone has calmed down and can accept my point.

When it comes to code, the difference is clear. If starting something new, I'll write down a set of features I want then refine them until I have a clear idea of how the system works before writing a single line of code. If I'm brave, I'll embrace TDD. In the old days, I'd get a vague idea in my head and design the rest in my head while I'm churning out code.

Recently, as an example, I refactored someone else's code from a general-purpose, multi-featured single class into several small functions that are individually very short and meaningful and all hang together to perform just the required behaviour and nothing else.

This all leads me deeper and deeper into the Unix philosophy (of which I've always been a fan) of having lots of tools that each do one thing well that can be combined in any way necessary. Which leads me into deeper and deeper suspicion of the GNU environment (see my rant about netcat). I'm not saying GNU is bad, it's just that I'm less immediately bought into the GNU way being always the right way.

Related to my bent for simplicity, I choose to license the things I write under the MIT license these days where I'd previously chosen the GPL. Socialism is a nice ideal but in practice it's just too complex to work as intended. Both benevolent dictatorship and co-operative anarchy are much simpler and seem far more likely to result in a better society (though not both at once ;)). I guess that sums up how I feel about the GPL these days. #cueflamewar

Discoveries

With apologies to the Linux Voice crew, here are a few discoveries I've made recently:

offlineimap

I don't know why I hadn't investigated this before but offlineimap has recently made dealing with my email much more bearable. For years I've been switching between various GUI clients and in recent months I'd decided to switch to mutt and make a real go of it. I've been enjoying mutt but not it's in-built IMAP support. Offlineimap means I don't have to care about mutt's weaknesses and I can just focus on its strengths as the best client for reading, replying to, sorting, and above all deleting email :)

notmuch

On a very related note, I also discovered notmuch which is a tool for indexing and tagging a collection of email. I'm now using mutt-kz (because it integrates with notmuch) to sort my email into (virtual) folders based on tags that I apply both through hooks in offlineimap and in the course of dealing manually with my email. Notmuch also makes it very easy to find old emails when I need to refer back to something.

syncthing

I've never been very good at backups. I've never had the patience to set up something robust and to ensure that the right things will be plugged in to the right machines and that they'll be at the right network locations at the right times based on a carefully designed backup schedule. Because of my crappy attitude I've lost some precious data in the past.

Through the Bad Voltage podcast, I discoverd Syncthing which is sort of like a replacement for dropbox except that it synchronises folders between your own machines rather than between your machine(s) and a (possibly evil) server.

To summarise how it works, once you've got the service running on two machines, you copy the ID from each to the other and then specify repositories which are just directories that you give a shared name so that machine A can store files from the "Photos" repository in one place while machine B stores them in another place. Adding extra machines to the network is easy and each repository can be configured to share with any number of the machines in your network.

My current set up is:

Machines:

  • Home desktop machine (media server)

  • Work laptop

  • Linode VPS (where this blog is hosted)

  • My Nexus 4 phone

Repositories:

  • One with an eCryptfs folder where I store private keys and the like - shared between my desktop, laptop, and VPS

  • podcasts - my VPS downloads podcasts into this folder directly from RSS feeds and synchronises to my laptop and phone

  • photos - synced between my desktop, VPS and laptop because I want to make sure I never lose them

It's incredibly simple to use and configure and thus far, it works very well and gives me just what I needed.

Categories: LUG Community Blogs

Steve Kemp: Amazon's Route53 API is nice.

Planet HantsLUG - Fri, 13/06/2014 - 16:03

It is unfortunate that some of the client libraries are inefficient, but I'm enjoying my exposure to Amazon's Route53 API.

(This is unrelated to the previous post(s) about operating a DNS service..)

For an idea of scale I host just over 170 zones at the moment.

For the first 25 zones Amazon would charge $0.50 a month, then $0.10 after that. Which would mean:

25 * $0.50 + 150 * $0.10 = $12.50

That seems reasonably .. reasonable.

Categories: LUG Community Blogs

Jono Bacon: FirefoxOS and Developing Markets

Planet WolvesLUG - Fri, 13/06/2014 - 00:40

It seems Mozilla is targeting emerging markets and developing nations with $25 cell phones. This is tremendous news, and an admirable focus for Mozilla, but it is not without risk.

Bringing simple, accessible technology to these markets can have a profound impact. As an example, in 2001, 134 million Nigerians shared 500,000 land-lines (as covered by Jack Ewing in Businessweek back in 2007). That year the government started encouraging wireless market competition and by 2007 Nigeria had 30 million cellular subscribers.

This generated market competition and better products, but more importantly, we have seen time and time again that access to technology such as cell phones improves education, provides opportunities for people to start small businesses, and in many cases is a contributing factor for bringing people out of poverty.

So, cell phones are having a profound impact in these nations, but the question is, will it work with FirefoxOS?

I am not sure.

In Mozilla’s defence, they have done an admirable job with FirefoxOS. They have built a powerful platform, based on open web technology, and they lined up a raft of carriers to launch with. They have a strong brand, an active and passionate community, and like so many other success stories, they already have a popular existing product (their browser) to get them into meetings and headlines.

Success though is judged by many different factors, and having a raft of carriers and products on the market is not enough. If they ship in volume but get high return rates, it could kill them, as is common for many new product launches.

What I don’t know is whether this volume/return-rate balance plays such a critical role in developing markets. I would imagine that return rates could be higher (such as someone who has never used a cell phone before taking it back because it is just too alien to them). On the other hand, I wonder if those consumers there are willing to put up with more quirks just to get access to the cell network and potentially the Internet.

What seems clear to me is that success here has little to do with the elegance or design of FirefoxOS (or any other product for that matter). It is instead about delivering incredibly dependable hardware. In developing nations people have less access to energy (for charging devices) and have to work harder to obtain it, and have lower access to support resources for how to use new technology. As such, it really needs to just work. This factor, I imagine, is going to be more outside of Mozilla’s hands.

So, in a nutshell, if the $25 phones fail to meet expectations, it may not be Mozilla’s fault. Likewise, if they are successful, it may not be to their credit.

Categories: LUG Community Blogs

Paul Tansom: Beginning irc

Planet HantsLUG - Thu, 12/06/2014 - 17:27

After some discussion last night at PHP Hants about the fact that irc is a great facilitator of support / discussion, but largely ignored because there is rarely enough information for a new user to get going I decided it may be worth putting together a howto type post so here goes…

What is irc?

First of all, what on earth is it? I’m tempted to describe it as Twitter done right years before Twitter even existed, but I’m a geek and I’ve been using irc for years. It has a long heritage, but unlike the ubiquitous email it hasn’t made the transition into mainstream use. In terms of usage it has similarities to things like Twitter and Instant Messaging. Let’s take a quick look at this.

Twitter allows you to broadcast messages, they get published and anyone who is subscribed to your feed can read what you say. Everything is pretty instant, and if somebody is watching the screen at the right time they can respond straight away. Instant Messaging on the other hand, is more of a direct conversation with a single person, or sometimes a group of people, but it too is pretty instantaneous – assuming, of course, that there’s someone reading what you’ve said. Both of these techonologies are pretty familiar to many. If you go to the appropriate website you are given the opportunity to sign up and either use a web based client or download one.

It is much the same for irc in terms of usage, although conversations are grouped into channels which generally focus on a particular topic rather than being generally broadcast (Twitter) or more specifically directed (Instant Messaging). The downside is that in most cases you don’t get a web page with clear instructions of how to sign up, download a client and find where the best place is to join the conversation.

Getting started

There are two things you need to get going with irc, a client and somewhere to connect to. Let’s put that into a more familiar context.

The client is what you use to connect with; this can be an application – so as an example Outlook or Thunderbird would be a mail client, or IE, Firefox, Chrome or Safari are examples of clients for web pages – or it can be a web page that does the same thing – so if you go to twitter.com and login you are using the web page as your Twitter client. Somewhere to connect to can be compared to a web address, or if you’ve got close enough to the configuration of your email to see the details, your mail server address.

Let’s start with the ‘somewhere to connect to‘ bit. Freenode is one of the most popular irc servers, so let’s take a look. First we’ll see what we can find out from their website, http://freenode.net/.

There’s a lot of very daunting information there for somebody new to irc, so ignore most of it and follow the Webchat link on the left.

That’s all very well and good, but what do we put in there? I guess the screenshot above gives a clue, but if you actually visit the page the entry boxes will be blank. Well first off there’s the Nickname, this can be pretty much anything you like, no need to register it – stick to the basics of letters, numbers and some simple punctuation (if you want to), keep it short and so long as nobody else is already using it you should be fine; if it doesn’t work try another. Channels is the awkward one, how do you know what channels there are? If you’re lucky you’re looking into this because you’ve been told there’s a channel there and hopefully you’ve been given the channel name. For now let’s just use the PHP Hants channel, so that would be #phph in the Channels box. Now all you need to do is type in the captcha, ignore the tick boxes and click Connect and you are on the irc channel and ready to chat. Down the right you’ll see a list of who else is there, and in the main window there will be a bit of introductory information (e.g. topic for the channel) and depending on how busy it is anything from nothing to a fast scrolling screen of text.

If you’ve miss typed there’s a chance you’ll end up in a channel specially created for you because it didn’t exist; don’t worry, just quit and try again (I’ll explain that process shortly).

For now all you really need to worry about is typing in text an posting it, this is as simple as typing it into the entry box at the bottom of the page and pressing return. Be polite, be patient and you’ll be fine. There are plenty of commands that you can use to do things, but for now the only one you need to worry about is the one to leave, this is:

/quit

Type it in the entry box, press return and you’ve disconnected from the server. The next thing to look into is using a client program since this is far more flexible, but I’ll save that for another post.

Categories: LUG Community Blogs

Paul Tansom: Beginning irc

Planet ALUG - Thu, 12/06/2014 - 17:27

After some discussion last night at PHP Hants about the fact that irc is a great facilitator of support / discussion, but largely ignored because there is rarely enough information for a new user to get going I decided it may be worth putting together a howto type post so here goes…

What is irc?

First of all, what on earth is it? I’m tempted to describe it as Twitter done right years before Twitter even existed, but I’m a geek and I’ve been using irc for years. It has a long heritage, but unlike the ubiquitous email it hasn’t made the transition into mainstream use. In terms of usage it has similarities to things like Twitter and Instant Messaging. Let’s take a quick look at this.

Twitter allows you to broadcast messages, they get published and anyone who is subscribed to your feed can read what you say. Everything is pretty instant, and if somebody is watching the screen at the right time they can respond straight away. Instant Messaging on the other hand, is more of a direct conversation with a single person, or sometimes a group of people, but it too is pretty instantaneous – assuming, of course, that there’s someone reading what you’ve said. Both of these techonologies are pretty familiar to many. If you go to the appropriate website you are given the opportunity to sign up and either use a web based client or download one.

It is much the same for irc in terms of usage, although conversations are grouped into channels which generally focus on a particular topic rather than being generally broadcast (Twitter) or more specifically directed (Instant Messaging). The downside is that in most cases you don’t get a web page with clear instructions of how to sign up, download a client and find where the best place is to join the conversation.

Getting started

There are two things you need to get going with irc, a client and somewhere to connect to. Let’s put that into a more familiar context.

The client is what you use to connect with; this can be an application – so as an example Outlook or Thunderbird would be a mail client, or IE, Firefox, Chrome or Safari are examples of clients for web pages – or it can be a web page that does the same thing – so if you go to twitter.com and login you are using the web page as your Twitter client. Somewhere to connect to can be compared to a web address, or if you’ve got close enough to the configuration of your email to see the details, your mail server address.

Let’s start with the ‘somewhere to connect to‘ bit. Freenode is one of the most popular irc servers, so let’s take a look. First we’ll see what we can find out from their website, http://freenode.net/.

There’s a lot of very daunting information there for somebody new to irc, so ignore most of it and follow the Webchat link on the left.

That’s all very well and good, but what do we put in there? I guess the screenshot above gives a clue, but if you actually visit the page the entry boxes will be blank. Well first off there’s the Nickname, this can be pretty much anything you like, no need to register it – stick to the basics of letters, numbers and some simple punctuation (if you want to), keep it short and so long as nobody else is already using it you should be fine; if it doesn’t work try another. Channels is the awkward one, how do you know what channels there are? If you’re lucky you’re looking into this because you’ve been told there’s a channel there and hopefully you’ve been given the channel name. For now let’s just use the PHP Hants channel, so that would be #phph in the Channels box. Now all you need to do is type in the captcha, ignore the tick boxes and click Connect and you are on the irc channel and ready to chat. Down the right you’ll see a list of who else is there, and in the main window there will be a bit of introductory information (e.g. topic for the channel) and depending on how busy it is anything from nothing to a fast scrolling screen of text.

If you’ve miss typed there’s a chance you’ll end up in a channel specially created for you because it didn’t exist; don’t worry, just quit and try again (I’ll explain that process shortly).

For now all you really need to worry about is typing in text an posting it, this is as simple as typing it into the entry box at the bottom of the page and pressing return. Be polite, be patient and you’ll be fine. There are plenty of commands that you can use to do things, but for now the only one you need to worry about is the one to leave, this is:

/quit

Type it in the entry box, press return and you’ve disconnected from the server. The next thing to look into is using a client program since this is far more flexible, but I’ll save that for another post.

Categories: LUG Community Blogs
Syndicate content