Skip to content

5th Week of 2022

Life Management

News Management

Coding

Python

PDM

  • New: Introduce PDM.

    PDM is a modern Python package manager with PEP 582 support. It installs and manages packages in a similar way to npm that doesn't need to create a virtualenv at all!

Pytest

  • New: Introduce pytest-httpserver.

    pytest-httpserver is a python package which allows you to start a real HTTP server for your tests. The server can be configured programmatically to how to respond to requests.

DevOps

Infrastructure as Code

Ansible Snippets

  • New: Stop running docker containers.

    - name: Get running containers
      docker_host_info:
        containers: yes
      register: docker_info
    
    - name: Stop running containers
      docker_container:
        name: "{{ item }}"
        state: stopped
      loop: "{{ docker_info.containers | map(attribute='Id') | list }}"
    
  • New: Moving a file remotely.

  • New: Speed up the stat module.

    The stat module calculates the checksum and the md5 of the file in order to get the required data. If you just want to check if the file exists use:

    - name: Verify swapfile status
      stat:
        path: "{{ common_swapfile_location }}"
        get_checksum: no
        get_md5: no
        get_mime: no
        get_attributes: no
      register: swap_status
      changed_when: not swap_status.stat.exists
    

Operative Systems

Linux

goaccess

  • New: Introduce goaccess.

    goaccess is a fast terminal-based log analyzer.

    Its core idea is to quickly analyze and view web server statistics in real time without needing to use your browser (great if you want to do a quick analysis of your access log via SSH, or if you simply love working in the terminal).

    While the terminal output is the default output, it has the capability to generate a complete, self-contained real-time HTML report (great for analytics, monitoring and data visualization), as well as a JSON, and CSV report.

Vim