Sometimes when an application in Windows hangs, freezes and stops responding the only way to terminate it is to kill from the command line. The taskkill command in Windows serves for terminating tasks by name or by process id (PID). In this note i am showing how to find and kill a process by its […]
A Git commit ID is a 40 digits long SHA-1 hash, that can be abbreviated up to the shortest 4 digits version (7 by default). In this note i am showing how to abbreviate the long hash to a short hash in Git and how to display the abbreviated hashes in the outputs of the […]
In Git we can gracefully revert all changes to the specific commit without using the potentially dangerous git reset command. In this note i am showing how to undo local changes by making a rollback to the specific commit and how to revert a commit that has already been pushed to remote.
It may be useful to run an Ansible playbook on a local system. For example for putting a playbook in a crontab or for a new host provisioning. In this note i am showing the several ways to run Ansible playbook locally.
During troubleshooting of Ansible issues it is useful to know how to enable debug mode and increase the level of verbosity. To enable debug and increase verbosity in Ansible you can pass the corresponding environment variables on the command line or define these settings in Ansible configuration file. Warning: The debug output can also include […]
In this article i am showing how to clear Git history by removing all commits. You may need this if you want to delete sensitive data from the history of Git commits. After such cleanup you will have the latest version of your Git repository, but with the one commit only. Be aware that after […]
In Ansible playbooks, it is often a good practice to test if a variable exists and what is its value. Particularity this helps to avoid different “VARIABLE IS NOT DEFINED” errors in Ansible playbooks. In this context there are several useful tests that you can apply using Jinja2 filters in Ansible. In this article, i’ll […]
Every command or application returns an exit status, also known as a return status or exit code. A successful command or application returns a 0, while an unsuccessful one returns a non-zero value that usually can be interpreted as an error code. In Linux you can get the exit status of a last command by […]
To connect to a Git repository with authentication over HTTP(S), every time it needs to set a username and password. You can configure Git to remember a username and password by storing them in a remote URL or by using Git credential helper. In this article i am showing how to clone Git repository by […]
By default, the pip install command installs the latest version of a package. However, it is often necessary to install an old version of a package to much some specific requirements. In this post i am showing how to install the specific version of a package using the pip install command.