Ysx's comments

Ysx | 8 years ago | on: How “Exit Traps” Can Make Bash Scripts More Robust and Reliable

Beware that you can only have one EXIT handler. I've used this in the past figuring it's analogous to Go's `defer`, but unfortunately not.

e.g this script:

    #!/bin/bash
    trap 'echo Handler 1' EXIT
    trap 'echo Handler 2' EXIT
Will only call 'Handler 2' on exit.

Ysx | 9 years ago | on: Show HN: Your precise age updated live

Have tried similar, and included a widget on my phone's home screen. Moved too slowly to be motivating/demotivating, though could be interesting longer-term.

Ysx | 9 years ago | on: Pushing your website to Android without an app

It's a quiet notification - no sounds or buzzing, only visible if you pull down the top bar. It's intended for contextual use, ideally you'd pair it with a physical call-to-action.

Google are sensitive about the spam potential, to the point where they proxy beacon URL resolution through their servers.

Ysx | 9 years ago | on: Linux Sysadmin/DevOps Interview Questions

> > A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?

> My favourite way of fixing it is by running /bin/chmod. It blows minds of most smart-asses who ask this question.

----

Not sure what I'm missing here?

    $ docker run -it ubuntu
    # chmod 444 /bin/chmod
    # /bin/chmod
    bash: /bin/chmod: Permission denied
page 2