Create a bcrypt hash on commandline

Its easy to create a bcrypt hash  on commandline with this command: $> htpasswd -nbBC 10 USER PASSWORD Just replace the Placeholder USER and PASSWORD with the corresponding values. The Result should be something like that: USER:$2y$10$gfPbhclOrdjmMLEXSc5CTOWP5aBfjl59hhGvjp/qWXf1FfbQKb5ca The part before “:” is the username. The rest is the bcrypt password hash. The -C parameter specifies […]

Base64 encode on shell

Sometimes you need to encode a string  with a base64 encoding. For example when trying to send a HTTP request with a Basic Authentication header like that: ### own controller: POST http://thedomain.com/webhook/post?XDEBUG_SESSION_START=11931 Content-Type: application/json Authorization: Basic c25zOlVzZVRoZWZvcmNlCg== { “uuid”: “08e9a8d3-9279-4af5-88ff-ebe42359f0e0”, “eventname”: “peng.page.publish”, “data”: { “sitemap_id”: “1234”, “locale”: “de_DE”, “path”: “unigue/page/path”, “title”: “Testpage over API”, “meta_title”: […]

Setup monit behind Apache proxy under ISPConfig

Today I wanted to setup monit behind Apache proxy on my webserver, which runs ISPConfig (https://www.ispconfig.org/) under Debian. Monit is a OpenSource monitoring tool for Linux (see https://mmonit.com/monit/). Requirements I had the following requirements on the solution: monit should only be accessible from the server itself (localhost) monit should run under a special SSL-secured URL (not IP:PORT as […]

Mount ISO file under Ubuntu Linux

Today I had the challenge, that I wanted to copy a DVD and  play it with the VLC media player (http://www.videolan.org/vlc/index.html). Therefore I had to learn how to mount iso file(s) under Linux. In my case it was Ubuntu 16.04.1. (see also my article about how to get your Linux distribution and version). How to […]

Convert linefeeds for all files in a folder (CRLF to LF)

If you are working in teams using different operating systems, it could happen, that you get files with unsuitable linefeeds in it. For me as a Linux user the bad guys are normally CRLF’s (Carriage Return and Line Feed @see https://en.wikipedia.org/wiki/Newline). To just convert the CRLF’s in a single file to LF you can use the […]

Simple rsync based backup script

This simple bash script is able to backup all given files and folders to a backup destination. I use it to backup all my Raspberry Pis, Banana Pis and also my notebook to my Synology NAS. #!/bin/bash # Lockfilecheck for race condition protection exec 9>.backupLockFile if ! flock -n 9 ; then echo “Another instance is […]

Recover lost images from SD/MMC cards

A very nice and really working recovery tool is  PhotoRec. It’s a very cool commandline tool for Linux which is able to recover all images on a SD or MMC card that have been deleted accidentally. In my case my fingers where faster than my brain and so I had kicked three rally awesome images :-/. […]