Category Archives: Code

Software Development

Why do I have AWS free tier charges?

The short answer: you left a light turned on somewhere in the world. Turn them all off and you’re done.

The longer answer:

  • The AWS free tier covers you for one (1) machine running all month. If you leave one machine running all month, and then have a second machine running for a day, you will pay for that day.

How to incur AWS Free Tier Charges by Mistake

There are 2 easy ways to do this by mistake:

  • You are testing multi-server deployments. With 2 servers running, your free tier is just half the month. The second half of the month will cost you about $15+VAT. As soon as you turn on a second machine you risk overrunning your free tier quota. If like me you accidentally leave 3 or 4 machines switched on for most of a month, then your ‘free’ tier has suddenly cost you $50.
  • The second is that you have machines in more than one region. Your typical console view hides shows only one region so you can easily forget that you have machines switched on elsewhere in the world.

How do I stop it?

Turn off your machines with Right-Click — Terminate in the EC2 Management console.
If you’re repeatedly spinning up test machines, don’t forget to do this every-time you finish work.

BootCamp Drivers direct download—further help

If you’ve downloaded bootcamp drivers for Macs to run Windows 7 or 8, but still have problems, here’s my summary of the main issues and solutions I know of:

  1. The download file won’t open; or it doesn’t seem to work somehow; or doesn’t contain all the drivers you expect Do the download again using a download manager because sometimes the download appears to finish but hasn’t really. There are a couple of download managers I know of for OS X:
    Folx by Eltima, who have been doing Mac software for years
    iGetter has been working well for a decade
  2. You get an error message saying that the drivers can’t be installed on this computer model.In this case you may have one of 3 problems:
    1. You clicked the wrong download link. Check the instructions on finding your ModelIdentifier again carefully, and try again.
    2. Some Macs only get drivers for 32-bit versions of Windows and some only get drivers for 64-bit versions of Windows so if you install the wrong one, you’ll have to start again.
    3. Back to item one – your download didn’t work properly. Get a download manager and try it again
  3. If you no longer have OS X on your machine, or if you did the download in Windows anyway, then opening-a-bootcamp-driver-download-on-windows-7-or-8-with-7-zip is the page that explains how to open the pkg file and the dmg file in Windows
  4. And finally the really obscure one: All you get in your download is drivers for a Motoral modem. I’m not sure what’s going on here, so I’m grasping at straws but you could try this: in the download URL, replace the http://swcdn.apple.com/ by using nslookup to to see if you can change which server is ‘really’ serving your download, for instance:
    http://apple.vo.llnwd.net/
    http://swcdn.apple.com.akadns.net/
    http://95.140.227.134/

Build mod_jk for centos

This post https://www.centos.org/modules/newbb/viewtopic.php?topic_id=33416 tells you everything you need to know. I’ve reduced it to a script:

#!/bin/bash
# Build the mod_jk apache tomcat connector from src tarball and install it
#
set -x
srcball=$1
if [ -z "$srcball" ]; then
    echo The source tarball was not given - expected something like \"tomcat-connectors-versionxxx-src\" to be passed as parameter
    exit 1
fi

pushd /tmp
    curl http://mirror.rmg.io/apache//tomcat/tomcat-connectors/jk/$srcball.tar.gz -O

    if [ ! -f /tmp/$srcball.tar.gz ]
    then
      echo $srcball.tar.gz not found in /tmp/. Couldn\'t build mod_jk
      exit 2 
    fi

    tar xvf $srcball.tar.gz
    cd $srcball/native
    ./configure --with-apxs=/usr/sbin/apxs
    make
    cp ./apache-2.0/mod_jk.so /etc/httpd/modules/
popd