• Deleting Amazon AWS Glacier vaults and archives

    I once used Arq – a backup program for Mac – to backup all my documents to Amazon’s AWS cloud. I decided to use Glacier, a low-cost and long-term option to do this.

    However, it all got out of sync and Arq wanted to re-back everything up when I reinstalled my Mac OS X, so I decided to ditch it.

    That left me with many vaults on Amazon Glacier that I couldn’t get rid of – but was still paying for. The AWS Console only allows you to delete vaults if they are empty.

    There’s this error message. How annoying!

    Screen Shot 2014-06-25 at 11.01.08 am

    There is a way to delete the archives and vaults, but it takes a few steps. Here’s how I did it.

    1) Find a VPS provider and spin up a new server

    I used Digital Ocean. It’s quick and cheap and easy. I used a VPS because at the end, I can nuke it and not worry about having programs I will no longer need installed on my computer.

    Screen Shot 2014-06-25 at 10.34.48 am

    I installed Ubuntu 12.04.4 x64

    2) SSH into your new VPS

    Once you’ve SSHed into the server, you’ll have to install a bit of software.

    I used this “Perl Multithreaded multipart sync to Amazon Glacier service.

    To install, I ran this commands:

    sudo apt-get update
    sudo apt-get install software-properties-common python-software-properties
    sudo add-apt-repository ppa:vsespb/mt-aws-glacier
    sudo apt-get update
    sudo apt-get install libapp-mtaws-perl
    

    That will install the software needed to interface with Glacier.

    From there, you’ll need to get your Amazon security tokens to the software can connect to the cloud.

    You’ll need to put it into a config file. Here’s an example of what it should look like:

    key=YOURKEY
    secret=YOURSECRET
    #region: eu-west-1, us-east-1 etc
    region=us-east-1
    #protocol=http (default) or https
    protocol=http
    

    I called my file: glacier.cfg

    Once you’ve done that, you’ll need to get the “inventory” of each vault you want to delete.

    To do that, log into the AWS Console and go to the Glacier section. Find the region the vault is stored.

    You’ll see a list of the vaults:

    Screen Shot 2014-06-25 at 10.51.21 am

    Then run this command for each of the vaults:

    mtglacier retrieve-inventory --config glacier.cfg --vault vault-name
    

    Replace “vault-name” with the name of the vault you see in the list.

    If you’ve done it correctly, you should see something like:

    MT-AWS-Glacier, Copyright 2012-2014 Victor Efimov http://mt-aws.com/ Version 1.115
    
    
    PID 2551 Started worker  
    PID 2551 Retrieved Inventory, job id XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  
    OK DONE
    

    Do it for each of the vaults you want to delete.

    Once you’ve done that, you’ll need to wait a while. Possibly a few hours. I waited about eight or so.

    After you’ve waited, there are a few more commands to run:

    Firstly, you’ll need to download the inventory. Replace “vault-name” twice. Once for the name of the vault and once so the vault’s name matches the log file.

    mtglacier download-inventory --config glacier.cfg --vault vault-name --new-journal vault-name.log
    

    You’ll see a similar message as above.

    Then, you need to purge the vault. Here’s the command. Don’t forget to replace the “vault-name” and make sure the .log file matches what you set it to in the previous step.

    mtglacier purge-vault --config glacier.cfg --vault vault-name --journal vault-name.log
    

    It should then run through the vault and delete the archives. Depending on how many archives are in the vault, it may take a while. It took me about 10-15 minutes to delete 20,000 archives – so don’t get impatient. Just let it run.

    Once that’s done, you may have to wait a while again. Then the vaults will be empty. You can then delete from the AWS Glacier Console!

  • Codefellas: NSA satire

    Codefellas

    This is really cool, or as John Birmingham puts it over at cheeseburgergothic.com:

    Dunno if anyone but me has been watching Wired’s Codefellas series, but it’s one of the sharpest little blipverts of modern satire I’ve come across of late.

    It’s basically an updated Odd Couple meme, set in the NSA, with Oscar and Felix swapped out for Topple, an ageing Cold Warrior and Nicole, a code hacker from Special Projects.

    So, here are the links:

    Ep1 (When Topple met Winters) http://www.youtube.com/watch?v=aHz7iYMqSZQ

    Ep2 (Meet Big Data) http://www.youtube.com/watch?v=RA_nM1k5B2g

    Ep3 (How to Hack a Website) http://www.youtube.com/watch?v=WW6GE-kmP64

    Ep4 (The AntiSocial Network)
    http://www.youtube.com/watch?v=M3gKCMSgZ4k

    Ep5 (Spy vs. Spy) http://www.youtube.com/watch?v=ogJbS84ZhQY

    Ep6 (Blackmail) http://www.youtube.com/watch?v=BTMYBmesKn8

    Ep7 (Reasons the NSA Should Hire Buzzfeed Staffers) http://www.youtube.com/watch?v=4t-tDNhP10Q

  • The Kindle Doctor – How to fix a Kindle (step by step)

    A while ago, I wrote a quick post on how I accidentally broke my Kindle, but then fixed it again.

    It’s been quite a popular post, and I’ve had a few comments and emails from people on how I managed to do it.

    The other day, I found a cheap 3G Kindle (Model: D00901) on eBay. But it had a busted screen. So I decided to buy it for my sister, along with a replacement screen, and publish a quick “howto” on opening, operating on, and replacing a broken LCD screen on the D00901 Kindle 3 model.

    First up, get a replacement screen. Easiest way is to put the model number and the word screen into an eBay search. You’ll get a few options. I got a new screen, posted, for about $45 AUD. I’m sure if you look really hard you might find a cheaper option.

    Anyway, wait for it to turn up. When it does, you’re nearly there. You’ll also need a small Philip’s head screwdriver.

    1-start

     

    Next step, crack open the plastic shell on the back of the Kindle. I do this by a crude method of using a small screwdriver. There are several tabs that hold it on tight that you’ll have to pull apart gently.

    Eventually, and with a tiny bit of pressure, you’ll get the plastic back off. There are no screws that hold the back bit on.

    This is what you’ll see.

    1.5-back-battery

    Take out the screws which hold in the battery (see the red ovals above) then put them and the battery to one side. Then get ready, then get ready – there are 15 tiny screws to take out for the next step.

    2-main-board-screws

    Once you’ve taken out the screws, the main board isn’t quite ready to be removed.

    You now need to carefully disconnect the ribbons. Some have a little lock mechanism. You lift up gently with a normal screwdriver (the brown bit of plastic) then slide the ribbon out. The one down the bottom lifts up (it’s the modem’s antenna), the one with the red/black cable pulls out (don’t yank, edge it out bit-by-bit with a screwdriver).

    Again, be very careful here.

    3-main-board-ribbon

     

    If you’ve done it all correctly, the board will then lift out.

    Put to one side.

    Now the screws which hold in the LCD screen. There’s two at the top, and two on the side.

    Undo them, put the screws to one side.

     

    4-side-case-1

     

    Final stretch, I promise.

    The red ovals below have screws which hold the screen holder in. The blue boxes show the location of some tabs. The big purple box down the bottom – that’s just a warning. That’s the on/off switch and it’s easily damageable, so keep an eye out.

    5-side-case-2

     

    Once you’d done that, the metal chassis will lift out.

    6-take-apart

     

    The screen will fall away. Discard the broken screen.

    7-cracked

     

    Carefully place in the new one, then go backwards through these instructions.

    A few notes: 

    • The little ribbons are fragile. They also need to be carefully replaced, or buttons won’t work.
    • The screen is fragile, don’t break it again!
    • Before you put all the screws back in, put the battery in and see if everything works properly. Nothing worse that having to undo everything again because you forgot one little ribbon… I speak from experience on that point.

    Easy. Any questions? Comment below.

     

  • Goodbye Google Reader

    Dear Google Reader,

    You were great. I used you regularly, but alas you’ve decided to leave.

    It was all so matter of fact. You abruptly announced that you would cease-to-be July 1 2013. I clicked “okay”, and that was that.

    A relationship of years, ended with a simple blue button. I suppose that’s what I liked about you in the first place. You were efficient.

    Google Reader

    You gave me a few months to gather my stuff. A few months to move on.

    It was hard. Copies of you sprung up over the internet almost overnight. But they weren’t as good. I should know, I tried them all.

    Sure me and the other RSS readers had some fun, but it was never the same. They were never as fast as you. They were never as snappy. Some were too complicated, others lacked any depth what so ever.

    Well Google Reader, I’m just writing to let you know that I have found a perfect match. I don’t want to gloat or anything – it’s nothing like that – but my new RSS reader is so much better.

    It even has a snazzier name: NewsBlur.

    Funny thing is that I’d tried NewsBlur before. It was a bit slow and the design wasn’t great, so I moved on. Lucky I don’t stick with first impressions.

    NewsBlur rolled out a new design the other day. It fixed its speed and now its wonderful. Wonderful. I couldn’t be happier.

    It’s even got a premium pricing model. $24 a year. That’s cheap. And you know what? That’s worth paying. It’s worth paying for things that are good, because it means the designers and developers have a reason to keep pushing forward, rather than letting it all stagnate before letting it die.

    It also has a really good iPhone and iPad (and Android) app. They are polished, and fast.

    So dear Google Reader. Thanks for the good times. I am sorry to see you go. It hasn’t been easy, but – for now at least – NewsBlur is great. I couldn’t be happier.

     

     

     

  • Will the body count ever stop?

    I am a massive fan of Midsomer Murders. What’s not to like?

    Episode after episode you sit down to Bumbling Barnaby and his trusty sidekick wandering around a picturesque village, asking probing questions, but – quite frankly – often doing it so badly the only reason the killer is caught is because they are the only ones left.

    For a while I had a bit of a game going between friends and family. Midsomer Murders starts at 8:30pm on TV. Everyone has half an hour to text each other to lock in what they think the a) body count will be, and b) who they think the murderer is.

    Inevitably, all the players would watch their a) body count guesstimate again be eclipsed by a show which has more death per episode than the entire James Bond series and b) their chosen murder suspect quickly included in said death toll.

    I had a real knack for locking in my murder suspect, only to see them crushed against piles of bottled sauce with a forklift before being thrown naked into a sterilizer (yes this happened) at around 9:05pm.

    The world now has 95 episodes of Midsomer Murders. More are planned. It’s a show – as my friend Viv put to me once – not about Barnaby but about the countryside. It’s also a show about blood. There are sites which track how many people die (and how), and the statistics are worrying:

    • 265 Murders
    • 16 historical including one possible
    • 11 suicides including three historical
    • 15 accidental deaths including two historical
    • Nine natural causes where murder is suspected or relevant to the plot
      • One of which may have been a murder
    • One unexplained death
    • One historical death by firing squad
    • One historical massacre (numbers not specified)

    That means 2.7 confirmed murders, on average, per episode. Or 324 deaths, averaging 3.4 an episode (this doesn’t include the massacre, but does include possible historical deaths). In one high death, particularly gruesome episode where there was bleeding to death from a spear wound, a bow and arrow murder and an iron bar to the head, Sgt. Scott asked:

    “Is the body count always this high in Midsomer”

    Barnaby replied:

    “It has been remarked on”

    Classic Barnaby.

    Interestingly, there’s been no episode where any media picks up on 265 murders as a story. Wikipedia has this as the summary for episode 93:

    The murder of a journalist has chilling echoes of a 1960s horror film starring Midsomer’s own Stella Harris. When Stella’s more famous sister returns after a 40-year family rift, the killings escalate, each reminiscent of a movie plot. Is life – and death – imitating art?

    That seems to be more about a movie, rather than a solid investigative news story. It’s about time some of the hacks from Badgers Drift got it on this and exposed the murderous hellhole for what it really is.

    They could begin by exposing that the most popular form of murder is a stabbing or a slashing, followed up by shooting or a bash around the head. There’s also been a lot of suicides.

    I decided the other day to try and graph the types of deaths in Midsomer, and started logging each episode:

    Midsomer Deaths

    I only got through eight episodes for a couple of reasons, the main being the writers would keep coming up with new ways for people to die, the graph would never make sense. It’d just be a series of small bars. Categorising the deaths was also difficult. In which category do you put “run over by car and then injected with pure liquid nicotine” or “rendered unconscious by concentrated valirium in drink and then drowned.”

    Viv reckons I need a column “only in Midsomer”, which is a great idea, but it would dwarf the rest of the results, and again not show very much. The writers are indeed very creative. So creative that in at least one episode, the cause of death for one poor electrocuted burgler is never made entirely clear. One presumes it’s accidental, but with Midsomer, you’d never know. Maybe Joyce knocked him off?

    Looking at the table, you can see how creative they really are. Obviously they need the grizzly deaths and it keeps it exciting. I added a new column in each time I needed a new category, and you can see how the thought process from episode to episode. “How about we write an episode where someone dies because the murderer withholds vital medication to keep the heart going?” says one writer. “Perfect,” the others reply. (See episode five – a below average two murders (and a tragic accident) – but still rather inventive.

    Viv also pointed out to me that Midsomer Murders is a highly successful English TV export, sold to many countries. The names of the show change from market to market, apparently in Russia it’s called “Very English Murders”. Nothing says Very English like a dubbed Russian accent taking the role of Barnaby.

    The different promos television networks run vary widely too:

    And finally a very dark ad from the Hallmark Channel (who else?) asking “Will the body count ever stop?”

    I wonder if I can get that on a greeting card?