Author: Jason

  • Ordered list with letters in Twenty Twelve

    UPDATE: It turns out I was wrong. type= is deprecated. The correct way to do this is style="list-style-type:lower-alpha". I updated my post to reflect that.
    It appears there is a bug in Twenty Twelve as of this writing where specifying the type of an ordered list is not respected. So you can’t get an OL of letters. The second list below should have letters.

    1. first line
    2. second line
    1. first line
    2. second line
    1. first line
    2. second line
    1. first line
    2. second line
  • A word on WordPress security

    First of all, I am not an expert on security. So please check this info for yourself, and don’t be shy to suggest improvements either.
    In order to keep your WordPress site secure, one of the things you can do is slow down a potential brute force attack, so the attacker can try fewer login/password combinations per second.
    There is an excellent plugin by convissor over at wordpress.org called Login Security Solution that does just that. I have been running it for a while now and it is very good. It emails you if your site is under attack and informs you about what its doing. It also ensures users have secure passwords. I have mentioned it before.
    Recently I have had a few attacks and encountered a minor problem with the plugin. Daniel has been extremely proactive in tracking down the issue. But during the process I found that the attacks were coming from 3 IPs.
    That made me think I should ban those IPs. And that led me to fail2ban. This is an excellent tool that monitors for failed login attempts and simply temporarily bans that IP using your firewall.
    In debian you install it with aptitude install fail2ban. If you want to enable apache monitoring, you need to add:

    [apache]
    enabled = true
    

    to /etc/fail2ban/jail.local
    restart fail2ban and that’s it. Within minutes of me activating it, it had already banned a few IP addresses due to failed ssh login attempts.

  • Lego Brick Separator

    Lego Brick Separator

    We got some Lego for my son the other day and it came with a Lego Brick Seprarator which has to be the best invention since Lego itself. It makes short work of stubborn bricks that are stuck together. As a kid I used to resort to using my teeth to separate them. This thing makes it easy.

  • .bash_profile vs .bashrc in OS X Terminal.app

    .bash_profile vs .bashrc or why does OS X ignore my .bashrc in Terminal.app?

  • Keyboard shortcut to un-minimise a window in OS X

    It’s a bit fiddly but it can be done.
    Cmd+m to the item you want to un-minimise, then while still holding cmd, press Option. Release Cmd and then finally release Option.

  • Cmd+m to Minimise a window in OS X

    Cmd+m to minimise a window in OS X

  • Insert a new heading after numbered list in org-mode

    In org-mode in emacs, M-<RET> will add either a new heading or if your insertion point is between a list item and a heading, it will add a new list item. This is not always desirable. To add a new heading try C-U M-<RET>.
    I only discovered this as I got frustrated with org-mode insisting on adding an item to the list rather than creating a new heading. The emacs way around problems like this is to prefix the command with C-U to make it do something slightly different.

  • Collaborative online $\LaTeX$ documents

    writelatex.com is awesome. Edit your $LaTeX$ document and see the changes almost immediately.

  • Collaborative online $\LaTeX$ documents

    writelatex.com is awesome. Edit your $LaTeX$ document and see the changes almost immediately.