This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function checkSsl($domain, $daysThreshold = 7) | |
{ | |
$port = 443; // Default port for HTTPS | |
$timeout = 5; // Timeout for the connection | |
// Open a connection to the domain | |
$context = stream_context_create([ | |
"ssl" => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PhpOffice\PhpSpreadsheet\Spreadsheet; | |
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; | |
$page = 1; | |
$limit = 100; | |
$sql = "TODO"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docker Hosts Update Script | |
This shell script updates the `/etc/hosts` file on a Docker host machine by mapping container IP addresses to specified hostnames or container names. | |
Author: | |
https://github.com/faiyazalam | |
Parameters: | |
--containers: Comma-separated list of Docker container names. | |
--urls: Comma-separated list of corresponding hostnames. If not provided, defaults to container names. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Example Usage: bash update_hosts_for_docker_containers.sh --containers="my_container_id_1,my_container_id_2" --urls="example1.com,example2.com" | |
#Author: https://github.com/faiyazalam | |
containers="" | |
urls="" | |
# Parse arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM pimcore/pimcore:PHP8.1-fpm | |
RUN apt-get update | |
RUN apt-get install -y build-essential libtool autoconf uuid-dev pkg-config libsodium-dev libzmq3-dev | |
RUN git clone https://github.com/zeromq/php-zmq.git | |
RUN cd php-zmq && phpize && ./configure | |
RUN cd php-zmq && make && make install | |
RUN docker-php-ext-enable zmq | |
RUN cd /var/www/html/ && rm -rf php-zmq/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install -y build-essential libtool autoconf uuid-dev pkg-config libsodium-dev libzmq3-dev | |
git clone https://github.com/zeromq/php-zmq.git | |
cd php-zmq | |
phpize && ./configure | |
make && make install | |
docker-php-ext-enable zmq | |
#now restart php-fpm container | |
#container info: | |
#No LSB modules are available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//inside webpack config file | |
var Encore = require('@symfony/webpack-encore'); | |
var dotenv = require('dotenv'); | |
Encore | |
// ... | |
// define the environment variables | |
.configureDefinePlugin(options => { | |
const env = dotenv.config(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
redis: | |
image: redis:alpine | |
command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] | |
db: | |
image: mariadb:10.7 | |
working_dir: /application | |
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1] | |
volumes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin/console pimcore:migrations:migrate -s pimcore_core -n | |
Run this command after composer update. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a sample command: | |
/usr/local/bin/ea-php72 /home/atunp/public_html/bin/console app:test |
NewerOlder