Replace author in docx files

Install python-docx and parallel: $ sudo apt install python-docx parallel Save this code as /usr/local/bin/docx_author: #!/usr/bin/env python ”’ Requirements: python-docx, parallel Usage: docx_author ‘Putin\ Huilo’ file.docx find /home/user/some_dir -type f -name “*\.docx” | parallel docx_author ‘Putin\ Huilo’ ”’ from docx Continue reading Replace author in docx files

nginx logs to ELK

1) Add this config to nginx # cat /etc/nginx/conf.d/03-jsonformat.conf map $upstream_response_time $temprt { default $upstream_response_time; “” 0; } log_format json_main escape=json ‘{ “@timestamp”: “$time_iso8601″, ‘ ‘”nginx_remote_addr”: “$remote_addr”, ‘ ‘”nginx_server_addr”: “$server_addr”, ‘ ‘”nginx_server_port”: “$server_port”, ‘ ‘”nginx_server_name”: “$server_name”, ‘ ‘”nginx_hostname”: “$hostname”, ‘ Continue reading nginx logs to ELK