Skip to content

39th Week of 2021

Computer Science

GNULinux

cURL

  • New: Fetch a website that requires auth.

    curl -u username:password [url]
    

Docker

  • New: Remove unused data.

    Use docker system prune.

    And for automated clean up:

    Add the following line to crontab -e:

    0 3 * * * /usr/bin/docker system prune -f 2>&1 > /dev/null
    

    -f prevents manual confirmation from being asked.

Git

  • New: Pre-commit.

    pre-commit/pre-commit is a framework for managing and maintaining multi-language pre-commit hooks.

    You can skip specific hooks with:

    SKIP=no-commit-to-branch pre-commit run --all-files
    

    Which is useful if a CI runs for the main branch so that it doesn't complain about running in it.

netcat

  • New: Test TCP connections.

    nc -v -z -w 3 [host] [port]
    

    Options: * -v: verbose * -z: just check if the port is open and exit (without sending any data) * -w 3: 3 seconds timeout

    If it exists with return code 0, it means that the connection succeeded.

wget

  • New: Redirect output to stdout.

    wget -qO- [url]
    

Programming

pip

  • New: Pip-tools.

    jazzband/pip-tools are a set of tools to keep your pinned Python dependencies fresh.

    Usage of pip-compile and of pip-sync.