Install the OpenSSL on Debian based systems
sudo apt-get install openssl| <?php | |
| namespace App\Domain\Doctrine\DBAL\Platforms; | |
| use Doctrine\DBAL\Platforms\PostgreSQL100Platform as PostgreSqlPlatformBase; | |
| class PostgreSqlPlatform extends PostgreSqlPlatformBase | |
| { |
docker-compose up --build -d
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build -d
docker-compose -f docker-compose-db.yml up --build -d
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build --force-recreate -d
docker-compose up -d db
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d alice_dash_app
docker-compose down
docker-compose ps
| More recent resolution: | |
| 1. cd ~/../../etc (go to etc folder in WSL). | |
| 2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line). | |
| 3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line). | |
| 4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian). | |
| 5. cd ~/../../etc (go to etc folder in WSL). | |
| 6. sudo rm -Rf resolv.conf (Delete the resolv.conf file). | |
| 7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and | |
| secondary. |
| <?php | |
| // Generate a new random password for an eZ Platform user. You have to run the SQL update statement yourself, with the correct user ID. | |
| $password = bin2hex(random_bytes(8)); // 16-char hex password | |
| print("New password: $password\n"); | |
| $hash = password_hash($password, PASSWORD_DEFAULT); // this is bcrypt, for now | |
| print("New password hash: $hash\n"); | |
| print("Update SQL:\nUPDATE ezuser SET password_hash = '$hash', password_hash_type = 7 WHERE contentobject_id = INSERT YOUR ID HERE, ADMIN IS 14;\n"); |
| # send logs for all traffic (including non-html) to google analytics | |
| # | |
| # in server block: | |
| # set $google_analytics_id "UA-THECORRECT-ID"; | |
| # include /srv/nginx/google_analytics; | |
| # | |
| # in location blocks: | |
| # post_action @ga; | |
| # | |
| # notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day. |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| stdout: | |
| type: stream | |
| path: "php://stdout" | |
| level: debug | |
| stderr: | |
| type: stream | |
| path: "php://stderr" | |
| level: warning |
| URL="http://stackoverflow.com/" | |
| # store the whole response with the status at the and | |
| HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL) | |
| # extract the body | |
| HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') | |
| # extract the status | |
| HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') |
yum install xorg-x11-server-Xvfb
yum install xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
rpm -ivh wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm