Skip to content

39th Week of 2021

Computer Science

GNULinux

(../computer_science/gnu_linux/curl.md)

  • New: Fetch a website that requires auth.

    curl -u username:password 
    

(../computer_science/gnu_linux/docker.md)

  • 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.md)

  • New: Pre-commit.

    (https://github.com/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.

(../computer_science/gnu_linux/netcat.md)

  • New: Test TCP connections.

    nc -v -z -w 3  
    

    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.

(../computer_science/gnu_linux/wget.md)

  • New: Redirect output to stdout.

    wget -qO- 
    

Programming

(../computer_science/programming/python/pip.md)