This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| /* | |
| Sample of the output: | |
| [ | |
| "GET -> api/monitor/routes", | |
| " -> api/monitor", | |
| "POST -> someRoute/test", | |
| "GET -> api/values", | |
| " -> Error", | |
| "-------- SECURED ROUTES --------", |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service| #! /usr/bin/env python3 | |
| """Fixing bluetooth stereo headphone/headset problem in debian distros. | |
| Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
| Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. | |
| This will be only fixes the bluez5 problem mentioned above . | |
| Licence: Freeware |
| <?php | |
| function utf8_encode_deep(&$input) { | |
| if (is_string($input)) { | |
| $input = utf8_encode($input); | |
| } else if (is_array($input)) { | |
| foreach ($input as &$value) { | |
| utf8_encode_deep($value); | |
| } | |
| unset($value); |
| public static string MD5Hash(string toHash) | |
| { | |
| string hashed; | |
| using (MD5 md5 = MD5.Create()) | |
| { | |
| hashed = string.Join(string.Empty, md5.ComputeHash(Encoding.UTF8.GetBytes(toHash)).Select(b => b.ToString("x2"))); | |
| } | |
| return hashed; |
| #!/usr/bin/env bash | |
| # Use this one-liner to produce a JSON literal from the Git log: | |
| git log \ | |
| --pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
| $@ | \ | |
| perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
| perl -pe 's/},]/}]/' |
| #!/bin/sh | |
| # | |
| # a simple way to parse shell script arguments | |
| # | |
| # please edit and use to your hearts content | |
| # | |
| ENVIRONMENT="dev" |
| <?PHP | |
| // Generates a strong password of N length containing at least one lower case letter, | |
| // one uppercase letter, one digit, and one special character. The remaining characters | |
| // in the password are chosen at random from those four sets. | |
| // | |
| // The available characters in each set are user friendly - there are no ambiguous | |
| // characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
| // makes it much easier for users to manually type or speak their passwords. | |
| // | |
| // Note: the $add_dashes option will increase the length of the password by |