The 5 Rules to Effective Writing

Posted by John
on Wednesday, 26 September 2007

As posted by George Orwell

  • Never use a metaphor, simile, or other figure of speech which you are used to seeing in print.
  • Never use a long word where a short one will do.
  • If it is possible to cut a word out, always cut it out.
  • Never use the passive where you can use the active.
  • Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent.

Break any of these rules sooner than saying anything outright barbarous.

NET::SSH Fingerprint Faults

Posted by John
on Tuesday, 25 September 2007

Had a real headache today with NET::SSH complaining the remote host's fingerprint id didn't match up and thus it wasn't going to play ball.

Refreshing Your SSH Fingerprint

Thankfully a fix!

link

require 'rubygems'
require 'net/ssh'
include Net
domain = 'www.mydomain.com' # insert IP address or domain name here
begin
Net::SSH.start(domain, 'deploy') do |ssh|
# ...
end
rescue Net::SSH::HostKeyMismatch => e
puts "remembering new key: #{e.fingerprint}"
e.remember_host!
retry
end

Basically open up IRB in the console and alter the 'domain' to be your remote target.

'deploy' is the name of the user account you have used to setup your Rails app in your deploy.rb file.

Remember this 'deploy' account needs to be already created on your target server, otherwise it won't know what your talking about.

If it fails, try using 'root'

Then when you run the IRB script NET::SSH will remember the new fingerprint and thus your cap commands will start working again.

Thank god I found that, saved my neck he did.

...or Totally Ignoring It?

Now on top of this if you still get problems you can tell NET::SSH to totally ignore checking whether the key matches or not, this is good if all your normal SSH connections are fine but the Ruby NET::SSH library still won't play ball and you just want it working.

If you've put in a firewall on your Linux box via iptables you should be protected anyway, so not many security issues there.

This IRB script will tell NET::SSH to stop being paranoid and let you do your job.

require 'rubygems'
require 'net/ssh'
include Net
domain = 'www.mydomain.com'
begin
Net::SSH.start(domain, 'deploy', :paranoid => false) do |ssh|
# ...
end
end

Replace mydomain.com with your domain name and it'll get the message and let you do your job, bypassing it's fingerprint match.

John.

Exam Prep

Posted by John
on Tuesday, 25 September 2007

At the beginning of the year I decided to solidify my PHP skills with sitting the Zend PHP 5 exam. However soon after, work took over and so this was put back.

I did do all the revision but never got the time to book the day off for the exam, shame really.

However things have changed, I’m starting somewhere new and have promised myself that I’d get that exam out of the way before I start at the new place.

So the date is set for next week and I’ll be hitting the books from here till then, wish me luck; I really hope I pass this.

John.

AJAX + Prototype = Rockin!

Posted by John
on Wednesday, 19 September 2007

Ahh… times are good.

Not much of an article more of a message.

Well if you know I’ve spent the past 2-3 months putting together a neat little rails app called AtomPad , it’s really my take on BaseCamp and is a perfect platform to test my Ruby skills and sharpen my OOP mentality.

So far it’s proven to be pretty useful and today I’ve re-written the Reminders and Lists area to be a bit more AJAX powered. So now you can add, delete, even live-edit items right on the screen just by hovering over them; and all without one single refresh.

Plus you get version control so it records what things you change to your notes, so eventually if your in a team it’ll tell you who changed what, when and maybe why (eventually).

Very intelligent, very powerful and so damn cool.

AJAX + Prototype is most definitely king!

Apple iPhone - UK, November 9, £269

Posted by John
on Tuesday, 18 September 2007

Steve Jobs has confirming that the iPhone official launch date will be November 9 with a launch price of £269 inc VAT.

Being a developer I cannot tell you how much this potentially means to the wired world, this little box of tricks could finally give the Mobile-Web world the push it needs. For such a long time the mobile internet platform has been stalling compared to it’s desktop counterpart.

So much looking forward to getting one of these and seeing what makes it tick.

So much potential!

Full Story : Link