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 […]

Get a filename only list of files in a folder

To get a list of all files in a folder without path, you can use the following snippet: $> find ../PATH/TO/FOLDER/TO/LIST/FILES/FROM -type f -printf “%f\n” Example result: 5ed8d879-9203-4c26-afe4-4eee702ffcc7.ttf 25h-icons.woff 6ab1eb08-75f2-4c1a-9911-2752e3fd6ec9.woff ada6576a-cbce-4da0-994b-b4719f95ac06.eot dc80306d-6b3e-422b-85c3-bad65f5446d4.woff 1791f364-9061-4459-a14d-0b188cfd7193.woff2 fb754dec-aa8f-444c-be48-868464c47ab0.woff 20988062-bfc8-4c30-9306-8053b179b381.eot 79de9df8-0826-46b9-beea-eb39122d4762.woff2 087e5c21-3358-4cf3-9d2c-289a03a48292.eot 7869ff0a-c18f-4ce1-bf07-fbf5b7172b66.ttf c932b9cc-bd91-4ee0-889b-302d53093448.woff2 c9fa0fce-5615-4509-af40-370a4032df9a.woff2 08bae5d9-f7bd-4e7f-8446-be05a16cc9e6.ttf 56ce7ab2-c49f-4aa1-85ce-f1823fc02355.woff bedf9150-5659-4119-9640-0f16e67d82b9.woff2 9131f395-46ef-4940-8480-8ff008c42e59.woff 77fac51a-d062-438a-a493-6b67508aa97f.woff bb8422a9-7303-4111-8be4-7de2f583aaf3.woff2 746ffa4d-bd68-4487-bb7a-0c90d07c6533.woff2 5fdc935e-9e30-442a-bbe9-8d887b858471.woff 616c4c87-a077-43f4-a9f4-f01267c13818.ttf 084ad33e-9248-40f7-b5ce-1d9dee2809c4.eot d399cbfa-b9be-47ac-983c-3600c2684bb2.ttf 295ff20c-2b48-4fa6-be92-a53bbf9bbbb4.ttf 25h-icons.ttf 2f8b7d6e-428d-4cc1-a456-712fc6aa2123.woff2 9322b01d-540d-464b-8990-dcbfa6a03ce8.eot […]

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”: […]

Get the currently installed Java version and vendor on Ubuntu / Debian Linux

To day I had to  figure out the Java version installed on my machine while digging through some problems with my IntelliJ IDE. This is how you can get the currently installed Java version and vendor on Ubuntu or other debian derivatives on bash. $> sysinfo That gives you something like that: Java Version: 1.8.0_131 […]

Tunnel MySQL through SSH

Recently I had the challenge, that the MySQL database of one of the Magento shops I maintain wasn’t accessible directly through the Net. The access was restricted to the Webserver only. So I had to tunnel MySQL through SSH. And that worked like that: edit the ssh config (~/.ssh/config) on the remote Webserver Host * […]

Mount ssh filesystems under Linux or how I mounted my webspace into my root server

Today I had to mount a ssh filesystem under Linux. The reason was, that I had the perception that I would be a very cool idea, to use my old webspace package from all-inkl.com, that I only kept because of the 10 included domains, as a backup storage for my root server.The plan was to […]

Split webm files into chunks on Linux

Today I had to split webm files into chunks on Linux.  The reason was, that I recorded  a screencast for a documentary. Therefore I used the Nimbus Chrome Browser Plugin (https://nimbus.everhelper.me/screenshot.php). The problem was, that the resulting video files in webm format were much to big to upload them to our Confluence Wiki. That’s why […]

GIT – reconnect remote branch

Sometimes it is necessary to remap a local git  branch to a remote one (reconnect remote branch). For me it was the case, because I accidentally removed all origins in a multi-origin setup. Hence I got the following error message when trying to pull without naming remote and branch, although I re-added and fetched all […]