-P show proggress
rclone copy -P -v --multi-thread-streams=10 remote-230:/root/a ~/Videos/
openssl rand -base64 32 // config.inc.php $cfg['blowfish_secret'] = 'BX0pgCsYvLhoohqKaUgdTzr5T+Na0n/tKvat4i9bGfc=';
// .bashrc alias phpmyadmin="php8.0 -S localhost:8081 -t /home/user/tools/phpmyadmin"
| #!/bin/bash | |
| # gitup.sh | |
| # gitup.sh HEAD | |
| # gitup.sh HEAD~3 | |
| if [ ! -z "$1" ] ; then | |
| echo "Createing ../update.zip " | |
| git diff --name-only "$1" --diff-filter=d | |
| git archive -o ../update.zip HEAD $(git diff --name-only "$1" --diff-filter=d) |
| sshuttle --dns -r [email protected] -x 130.250.10.5 0/0 |
| if(responseCode.code === 200){ | |
| var jsonData = JSON.parse(responseBody); | |
| //postman.setEnvironmentVariable("usertoken1", jsonData.data.token); | |
| pm.collectionVariables.set("token", jsonData.data.token) | |
| } |
docker exec -it project_name_xxx_php_1 sh
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS;
pecl install xdebug-3.0.2;
docker-php-ext-enable xdebug;
pecl install pcov
composer require --dev pcov/clobber
vi /usr/local/etc/php/php.ini
| # php install | |
| ## apt | |
| sudo add-apt-repository ppa:ondrej/php | |
| ## set other version | |
| sudo update-alternatives --config php | |
| // sudo update-alternatives --set php /usr/bin/php7.1 | |
| apt-get install -y \ | |
| php8.2-cli php8.2-dev \ |
| RewriteEngine on | |
| # If a directory or a file exists, use it directly | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| # Otherwise forward it to index.php | |
| RewriteRule . index.php | |
| # Redirect HTTP to HTTPS | |
| RewriteCond %{HTTPS} off | |
| RewriteCond %{HTTP:X-Forwarded-Proto} !https |
| /** | |
| * ورودی تابع آبجکت DateTime است | |
| * خروجی این متد تاریخ اول و آخر هفته است | |
| * اول هفته شنبه و آخر هفته جمعه | |
| * خروجی نمونه | |
| * [ | |
| * 'from' => 2018-1-6, | |
| * 'to' => 2018-1-12 | |
| * ] | |
| */ |
| how detect system ? | |
| /usr/lib/systemd tells you you're on a systemd based system. | |
| /usr/share/upstart is a pretty good indicator that you're on an Upstart-based system. | |
| /etc/init.d tells you the box has SysV init in its history | |
| ----- OR | |
| strings /sbin/init | grep -q "/lib/systemd" && echo SYSTEMD | |
| strings /sbin/init | grep -q "sysvinit" && echo SYSVINIT | |
| strings /sbin/init | grep -q "upstart" && echo UPSTART | |
| ----- OR | |
| sudo stat /proc/1/exe |