Profile cover photo
Profile photo
Luke Plant
205 followers
205 followers
About
Luke's posts

Post has attachment
New blog post: The very minimum you need to know about words - http://lukeplant.me.uk/blog/posts/the-very-minimum-you-need-to-know-about-words/

Help! It seems I've forgotten the passphrases on my id_rsa/id_dsa files. However, something has remembered them (ssh-agent?), and must be unlocking these files for me, because I can happily use these files for logging in to other machines. I'm using Gnome and ssh-agent. I don't normally have to do anything other than log in to be able to use my id_rsa file.

So how do I persuade my computer to produce unprotected versions of id_rsa/id_dsa, or the passphrases on them?

The simplest thing that will actually work.

In programming, I basically agree with "do the simplest thing that could possibly work". But too often, I see "do the first stupid thing that comes into your head". These things are not the same.

We've recently bought a house. We quickly found that the electric shower fuses after 10 minutes of use. It turns out that it has been connected to a socket circuit, instead of having its own high amperage circuit. The process probably went like this:

* Well, there are some wires here, which are live, and not too far away. Let's try them!
* Turn it on  - yay it works!
* Wiring a house properly is hard, let's go shopping!

Of course, the test didn't ensure that it would continue working after 10 minutes, or that you have a system that isn't going to burn your house down. Tests only ever test that something works in one particular instance, in an extremely narrow set of conditions, not that it is robust or correct.

"Do the simplest thing that could possibly work" is fine for coming up with possible solutions. And a test can help prove something is viable. But that is just the beginning! Tests do not begin to show that your code is correct - you are actually going to have to think for that.

Find the simplest thing that will actually work.

Post has attachment
Romanesco broccoli - from Morrisons! I had seen pictures of this before, but not in real life. The fruit and veg section in Morrisons is quite cool these days. 
Photo

Post has attachment
This seems like a good case for "let's not add any more verbs to HTTP", or, "if we had a time machine, we'd go and tell the past not to  add so many".

Or "I'm only going to use GET and POST".

But to actively remove things that are already understood and widely used (even if you personally don't use them, and even if they are a fraction of GET+POST in terms of quantity), and would cost millions to replace, seems to require much stronger justification.  And there are things like OPTIONS which really don't translate well into either GET or POST.

Post has attachment
Why is PEP8 important ,even down to whitespace around punctuation

?For the same reasons that most' normal 'people will get tripped up reading this paragraph

.Technically ,there 's nothing I'  m writing that can 't be deciphered-there 's no absolute reason behind traditional conventions

-

but they are conventions, and sticking to them helps reading to flow!

So, all I want to do is get my last photo from my instagram feed, using the API, and a script. This requires getting an access token for OAuth2 authentication, and a ridiculous amount of work AFAICS.

Note this is my feed (OK, my clients, but still a single known user, for whom I have username and password). The script will run on a server completely automated, so a solution involving manual prompts or browsers is out of the question. The script needs to keep working not just once.

The only solution I've seen is this:

Start off the process using a browser to get an initial access token and refresh token, storing these in a DB and refreshing as necessary.
http://stackoverflow.com/questions/9809742/how-to-automate-login-to-google-api-to-get-oauth-2-0-token-to-access-known-user

So you have to start with a browser (which is failure already), and then you need a persistence mechanism as well?

I am missing something major, or is this insane? There is no programmatic way to get an access token in OAuth2?

I heard OAuth2 was bad, but surely not that bad?

Post has attachment
Idea: for DRM systems like Amazon's kindle which allow remote deletion etc., the seller should be forced by law to describe purchases as 'renting' and not 'buying'.  Could this work?

Or is it possible that Amazon is already guilty of violating things like the UK Trade Descriptions Act by failing to be clear about this?

http://www.bekkelund.net/2012/10/22/outlawed-by-amazon-drm/

Post has attachment
Haven't laughed so much in a while: Feel Inside (And Stuff Like That) - Flight Of The Conchords (Red Nose Day 2012) [Lyrics]

You can skip to about 4:35 if you don't know the Flight of the Conchords

Post has attachment
Help! I'm stuck on an internet connection that is blocking port 22, so I can't ssh to a server I need to access.

How do I get through? If I had a proxy I could use corkscrew http://www.mtu.net/~engstrom/ssh-proxy.php to get through. But I don't have one. I tried using an open proxy but with no success.

I don't have root access on any public internet server, so I can't set up my own proxy service. (And I'd need a way to ssh in first Is there a way to do this?
Wait while more posts are being loaded