Tip of the day

Remember how great Authenticator Plus is? Recently a coworker told me about another great thing it can do – categories!

If you have 2FA set up for many accounts like I do, it gets to be a pain scrolling through that list to find the one you want. Categories to the rescue! From the settings menu go to manage categories, from there you can create new categories and put authenticators in them. Categories in Authenticator Plus work more like tags than folders, you can put one authenticator in as many categories as you want. Sorry readers, that was a lie. The interface is kind of confusing, so I thought categories worked like tags, but they are actually folders. Either way they’re still really useful. Once you have your categories set up, you can switch between them from the hamburger menu. The categories list is at the top where it’s easy to find.

Now that I have my authenticators sorted into work and personal categories, it’s so much easier to find the one I want.

Javascript tip of the day

Javascript has a delete operator! Okay maybe that’s not news for people who do more frontend work than I do, but I was surprised to learn that. If you have a javascript object and want to remove one of its properties, it’s really easy. All you need to do is delete There’s more detail here if you’re interested. Now if only it wasn’t such a hassle to iterate over an object’s properties…

Ember tip of the day

Lately I’ve been working with Ember components, which are really pretty cool. For anyone who doesn’t know, in Ember components let you encapsulate layout and functionality neatly together so you can reuse things all over your app without making a huge mess.

Ember components have a lifecycle you should know about and a set of lifecycle hooks you can call. Those hooks are really handy, they let you do all kinds of things at different points in the component’s lifecycle. Be warned, though: you MUST call


at the beginning of your lifecycle hook or your component will break in deeply weird ways. When you implement a lifecycle hook in your code, you’re actually overriding a method in the base Ember component. If you don’t call this.super(), the original function doesn’t get called and shockingly enough, it does a bunch of things that are necessary to make your component work right :)

Because Ember is open source, you can go have a look at what the base lifecycle functions do. Here’s the init function, which calls this.super() itself before it does the rest of its setup. Reading the code yourself totally isn’t necessary, but it’s interesting and might help you remember why it’s so important to call this.super().

Productivity tip of the day

You might have noticed I like watching conference talks and recommending my favourites, and you might have gotten the wrong idea about my attention span from that :) I actually have a terrible time concentrating on watching a video if that’s all I’m doing, my mind wanders and when I come back to the video I have no idea what’s going on so I have to skip it back to catch what I missed. After that happens a few times in a row I give up and go do something else.

Fortunately, I have a trick to keep myself focused. It’s kind of a ridiculous trick but hey, maybe it’ll work for you. What I do is open up the talk I want to watch in one window, and in another window I open up a silly clicking game like Diggy’s Adventure or Clicker Heroes and play that while I listen to the talk. The reason having those open in separate windows is important is so you can alt-tab to the talk easily if you want to see the current slide.

For me games like those are the digital equivalent of doodling, they give me just enough to do to stay focused but not so much that I get distracted from the talk I’m trying to listen to. They’re also great for convincing myself that I’m really just playing games with a talk on in the background, which makes it not feel like work so I actually do it.

If you want to watch more recorded talks but never seem to get around to it or your mind wanders when you do get around to it, try a really low impact game. It might help and definitely can’t make it worse :)

Linux tip of the day

Take out the trash! Unlike Windows, Linux (at least my distro, Mint) doesn’t have a recycling bin/trashcan icon on the desktop to remind you to empty your trash directory once in a while. That really adds up if you forgot to empty your trash for, uh, a while. Technically you can just hunt down your trash directory and delete everything inside it, but do you really want to have to remember the path? And remember how to find it if you delete a file on a USB drive?

trash-cli to the rescue! The terminal command to install it is sudo apt-get install trash-cli (at least on systems with apt-get), and to run it you just type trash-empty. Thanks as usual to stack overflow for that answer.

When I finally ran that on my laptop, I got 3.6gb back. Not bad for under a minute of work :) If you’re new to Linux like me, don’t forget to take out the trash.


Lastpass tip of the day

LastPass tries to be helpful by filling in form fields for you, but sometimes it gets it wrong. If you see it fill in the wrong data or if you just mysteriously struggle to sign into services that use 2FA (for me LastPass was helpfully inserting an old 2FA code when I tried to sign into AWS, which meant AWS thought my authenticator app was wildly out of sync and would make me resync it every time I tried to log in), follow these steps and see if it helps.

In case that link ever stops working, you’ve got to find the problem site in your vault, click the little wrench icon to edit that site, then click the little wrench icon again in the edit popup to edit form fields, then delete all the fields with bad values. There may be quite a few of these.

Credit where it’s due, one of my coworkers told me about this. Thanks Logan, I don’t know if I ever would have found that on my own!

App of the day

Today’s app is Authenticator Plus It’s available for both Android and iOS and will save you a lot of hassle if your phone dies on you like mine did. On an unrelated note, I do not recommend the Nexus 5x but you can’t buy new ones anyway so that’s kind of a wash.

Authenticator Plus, on the other hand, is great! It stores your accounts in your dropbox so you can simply sync them onto another device if you can’t use your usual device (don’t forget to factory reset it if you lost it!) instead of going through the slow and tedious process of using recovery codes to get back into your accounts. Don’t worry, you have to set a master password to access your accounts on a new device.

Full disclosure: Authy does the same thing and is free where Authenticator Plus is paid. One of my coworkers likes it and another one didn’t like the onboarding process, so you’re going to have to make your own decision there :) I started with Authenticator Plus and can’t be bothered to switch everything to Authy just to try it out so I’ll be no help there.

And while I’m at it, don’t use SMS for your two factor auth! Sure, odds are against anyone bothering to attack you personally but why take the risk?

Link of the day

How do you know when to take someone’s advice and when to ignore it? Today’s link lays out a few simple steps to figure out When ignoring advice makes sense. There’s no shortage or advice for programmers out there, but there’s just no way all of it works for every single programmer. If you have a process for evaluating advice, you can be sure that the advice you reject really doesn’t work for you. If you just flail around and try stuff, well maybe the things you don’t like really don’t work for you, but on the other hand maybe they just feel weird and that makes you want to stop and go back to normal before you’ve really given them a chance.

Go forth and ignore some advice, safe in the knowledge that you gave it a fair shot and it really didn’t work for you :)

Git tip of the day

Today’s tip is a very simple git feature that I always seem to forget. Maybe by putting it on my blog I’ll finally remember it exists!

git reset --hard origin/<branch name>

What this does is force your local branch to really for really real match the state of the remote branch. If somebody reverts a bad commit on a remote branch and your local repo insists your copy is a commit ahead of the remote no matter how many times you try a simple git reset, then that command up there is what you need to fix things.

Quick guide to Chef + OpsWorks for Java devs who have other things to do

First, a caveat: I learned this on EC2 instances and make no promises that it will work in any other setup. That said:

  • The recipe runlist is not anywhere in your custom cookbooks, it’s in the layer settings for each layer in your stack.
  • If you add a new cookbook, recipes absolutely have to go in the recipes folder under the [cookbookname] folder.
  • Data that your recipe expects, such as “node[‘datadog’][‘jmx’][‘instances’]” must exist in an attributes file or your stack settings or something, but doesn’t necessarily have to have a value. The structure just needs to exist with the expected names.
  • Cookbooks have metadata ( where you define the version number of your cookbook and which other cookbooks it depends on. You can optionally list the recipes inside the cookbook but you don’t have to.
  • If you update your cookbook you can update that cookbook on your instances without redeploying them by running the Update Custom Cookbooks command from your stack (the run command button is beside the stack settings button on the “Stack” page for your stack).
  • Once you’ve updated your cookbook you can run your updated recipes almost the same way, just select “Execute Recipes” instead of “Update Custom Cookbooks” in the dropdown and put a list of recipes to execute in the field below the dropdown.