Friday, 11 July 2014

windows updates could learn a lot from the ubuntu unattended-upgrades package

I was already pretty darn impressed with the ease, and simplicity of upgrading the entire operating system. Seriously, it's as simple as one single command:

sudo do-release-upgrade

But what I now wanted, was a simple way to keep a bunch of ubuntu servers patched up with the latest upgrades. Keeping things nicely up-to-date between major releases. I toyed with some fancy, centrally managed solutions, like the ubuntu landscape offering, even puppet or chef. But ultimately, if you've only got a handful of servers; why not just go for something dead simple...

sudo apt-get install unattended-upgrades

Done. The machines will email you if they need an occasional reboot. But otherwise, they will keep themselves up-to-date, without bothering you too much.

There's a bunch of other stuff you can tweak - nicely detailed on the ubuntu wiki. For bonus points: if you plop your /etc/apt/apt.conf.d/50unattended-upgrades file into dropbox, and symlink it on each server, you can ensure all machines are using the same upgrade settings. Easy peasy...

Actually: to be fair, windows update services is pretty cool too. But for only a handful of machines, it's a bit over the top (imho).

Tuesday, 8 July 2014

howto: send emails from ubuntu server, via gmail, with 2-step verification

I've done this about 10 times over the last few years, and every single time, no matter how hard I try, I always forget something...

Fortunately, there's some nice simple instructions here: http://www.havetheknowhow.com/Configure-the-server/Install-ssmtp.html

While this guide is great, there's two little extra things you will want to check:

  • Are the messages actually being sent? Take a look at /var/log/syslog -- any problems will show up there
  • If you are getting authorization errors, and you know it's the right password -- perhaps you have 2-step verification turned on. In which case, you'll need to create a new application-specific password, and use this in the ssmtp.conf file instead.
Maybe I'll remember next time...
(unlikely)

Friday, 31 May 2013

What is the best way to upgrade an existing BizTalk application?

I recommend a claw hammer, over the more traditional ball peen. It helps with uninstalls.

Thursday, 28 March 2013

.net reflector is free** again - why didn't anybody tell me?

Well "almost" free - the functionality that I loved about it most - the ability to rewrite IL - is available in two free products...

  1. Telerik's JustDecompile - takes the place of .NET Reflector; and doesn't cost a cent.
    This in itself is nothing earth shattering. There are a stack of other free de-compilers. However, when you add on...
  2. Reflexil - you regain the awesome ability to edit assemblies as you please. Make those locked down private method's public, adjust resources, or just rewrite chunks of code.
Neat...

Thursday, 28 February 2013

The compiler made me do it...

From the 3proxy FAQ...

Q: Why the code is so difficult and non-intuitive?
A: First, I'm not programmer. Second, . Third, . Fourth, the aim is to support different platforms. It's well known - the worse code is, the better it compiles.
This chap is way too harsh on himself. Sounds to me like he is a programmer - and of the highest order.

It's so good, I'm using in my next code review.

Friday, 22 February 2013

Asus Eee complains about 'Assuming drive cache: write through'

I had an old Asus Eee kicking around. Seemed like a perfect candidate for a headless Ubuntu 12.10 server.

That is, until it booted the first time, and played back the following message, over and over again:
[sdb] Asking for cache data failed
[sdb] Assuming drive cache: write through

Everything works fine. But the message is, err, annoying to say the least. Fortunately, the easy fix is to just turn off the buggy drivers. Which is a doddle. Just edit /etc/rc.local and add a line to turn it off.
rmmod ums_realtek

Reboot to make sure it kicks in, and we're done.

Source: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/925760

Wednesday, 31 October 2012

Change your ubuntu computer name

This is an incredibly easy (trivial even) task - but it involves two steps. Which means I always forget one of them. So this might stop me from doing it in future...

Say you want to change your computer name to be: bender.example.org
  1. Edit the /etc/hostname file
        sudo nano /etc/hostname
    There's only one line in this file, change it to the desired computer name.
    In this case: "bender".
  2. Edit the /etc/hosts file
        sudo nano /etc/hosts
    Leave the first loopback (127.0.0.1) line alone, but change the second one to list both your computer name, and the fully qualified domain name (if it has one).
    In this case: "127.0.0.1    bender.example.org    bender"
Now you're changes will stick after a reboot, and you can still SSH into your machine. 'cause it's always embarrassing when you can't connect to the computer you just renamed...