linux


howto use ansible to setup a node.js gaming application 1

As IT systems become more complex and the need for better solutions to manage hundreds and thousands of services and applications increases, administrators have realized that using traditional operational methods to manage scalable systems are not working any more. Tools for configuration management and automation become essential. Such tools can be used to install a […]


rsync remote port

If you are running ssh on a non standard port you can still use rsync over ssh with the following syntax. rsync is a powerful tool to create simple backup and deployment workflows. Here are some examples with common rsync use cases … Copy files from remote to local The options “-av” are the most […]


python yum check-update howto

If you are running an rpm based Linux system like CentOS you might want to automatically and regularly check if security-updates are available. You can use existing commandline tools or python scripts. This article is about checking if linux host is up-to-date with python yum module – without scraping the cli tool. The yum commandline […]


sed delete line

In this article I want to explain how you can use sed to automatically delete a line from a file or a stream. This can be useful in the following cases: delete the first line of a file to implement a simple resource pool (e.g. available IP addresses can be managed in a simple text […]


sed remove line break vs replace newline with other tools

sed replace newline (or 5 ways to remove line breaks with sed, python, tr, perl, xargs) 1

When you are automating tasks you often come to the point where you have to remove newlines / line breaks from documents or ASCII streams to use this output as parameters for the next steps. There are many options how this can be done. Especially in Big Data streaming you should also consider the performance […]


Simply serve local directory via HTTP with python webserver 1

Sometimes you quickly need to exchange some files between networked machines. A really easy way that mostly also works through firewalls is to serve them via a local webserver. Python offers a really simple module for that: python -m SimpleHTTPServer To serve a local directory just run: [email protected]:~$ python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 […]


How to save a remote server SSL / TLS certificate locally as a file

In linux you can just use the openssl commandline tools to download any certificate from a remote web-server and store it in a local file. Show the certificate chain and public key of a web-server openssl s_client -connect slash4.de:443 -showcerts To directly extract the certificate and save it to a file you can use these […]


How can I download an entire website to static files and harden my CMS?

You can easily harden your wordpress/CMS installation by downloading it to static files and only publishing those static files to the internet. Security vulnerabilities are regularly found in all common used CMS systems – if you just need your CMS to publish content (no interaction like comments) then the following is an option to really […]