• Generate selfsigned certificate and keystore JKS

    Generate SSL keys Execute each command individually: openssl genrsa -out key.pem openssl req -new -key key.pem -out csr.pem IMPORTANT: To use that in localhost development you have to set Common Name to localhost: CN=localhost openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem rm csr.pem Generate keystore from SSL keys Execute each command…

  • Ubuntu 18.04 LTS – Hibernate to Swapfile

    This is a short summary for the following instruction: https://ubuntuforums.org/showthread.php?t=1042946 Swapfile activation Hibernate activation

  • Windows copy files and exclude folders (node_modules)

    Using Xcopy create an excludes.txt file with following content: Now execute the following Xcopy command:

  • IntelliJ + Cmder

    File | Settings | Tools | External Tools Add new External Tool Name: Cmder Here Program: C:\\Cmder.exe Arguments: /SINGLE $FileDir$ Working dir: C:\ Close Settings and Open again File | Settings | Keymap: External Tools -> External Tools -> Cmder Here Right mouse click -> Add Keyboard Shortcut -> “Alt + D” Now you can…

  • GitLab CI + CD

    Find Docker image for the build Dependencies: node/npm java8 gradle sshpass For build you can use for example the following image: https://hub.docker.com/r/bulf/ubuntu-java8-gradle-docker/ For deployment you need sshpass, so you can take the following image: https://hub.docker.com/r/ictu/sshpass/ Runner see GitLab Runner Doc CI script see CI yaml docu Secret variables to use in CI script: GitLab -> Settings -> CI…

  • shell/bash

    Read a template file and replace placeholder script-template.txt #!/bin/bash echo “–TIMESTAMP–” gen-script.sh #!/bin/bash # Get variables timestamp=`date` # Replace placeholder content=`cat ./script-template.txt` content=`echo “${content/–TIMESTAMP–/$timestamp}”` # Generate a script echo “$content” > startup.sh chmod +x startup.sh  

  • netcup + froxlor + mail server (dovecot/postfix) + tls/ssl (Let’s Encrypt)

    You can use only one specific domain and ssl certificate in dovecot and postfix. So you have to create this specific domain and activate Let’s Encrypt for that, so that you can use those certificates for SSL/TLS. All the users with different domains and email-domains have to use this one specific domain to connect to…

  • Python snippet collection

    Timestamp with milliseconds import datetime print “Timestamp %s” % datetime.datetime.utcnow().strftime(‘%Y-%m-%d %H:%M:%S.%f’)[:-3] # Output: Timestamp 2017-05-07 21:32:42.379