# Download stable release of xdebug from https://xdebug.org/download.php
wget -c "https://xdebug.org/files/xdebug-2.5.3.tgz"
# Extract archive
tar -xf xdebug-2.5.3.tgz
cd xdebug-2.5.3/
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 namespace App\Lib; | |
/** | |
* This class is customized specifically for the CRMLS | |
* ( California Regional Multiple Listing Service ) | |
*/ | |
class rets extends phRETS { | |
public $rets_url = 'http://rets.mrmlsmatrix.com/rets/login.ashx'; |
- Amex Card:
^3[47][0-9]{13}$
- BCGlobal:
^(6541|6556)[0-9]{12}$
- Carte Blanche Card:
^389[0-9]{11}$
- Diners Club Card:
^3(?:0[0-5]|[68][0-9])[0-9]{11}$
- Discover Card:
^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$
- Insta Payment Card:
^63[7-9][0-9]{13}$
- JCB Card:
^(?:2131|1800|35\d{3})\d{11}$
- KoreanLocalCard:
^9[0-9]{15}$
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
SELECT | |
t.TABLE_SCHEMA AS `db` | |
, t.TABLE_NAME AS `table` | |
, s.INDEX_NAME AS `inde name` | |
, s.COLUMN_NAME AS `field name` | |
, s.SEQ_IN_INDEX `seq in index` | |
, s2.max_columns AS `# cols` | |
, s.CARDINALITY AS `card` | |
, t.TABLE_ROWS AS `est rows` | |
, ROUND(((s.CARDINALITY / IFNULL(t.TABLE_ROWS, 0.01)) * 100), 2) AS `sel %` |
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
#!/usr/bin/env bash | |
human_size() { | |
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "<1kb"; } ' | |
} | |
# change your connect settings (DSN) | |
# redis_cmd='redis-cli -h host -p 6379 -a pass' | |
redis_cmd='redis-cli' |
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 | |
if which php; then | |
currentVersion = $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) | |
if [ $(echo "$currentVersion >= 80" | bc) -eq 1 ]; then | |
echo "PHP Version is valid ..."; | |
else | |
sudo apt update && sudo apt install php8.1-cli -y < "/dev/null" | |
fi | |
else |
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
alias paratest='php bin/console test:init:database:pool -e=test 10 && vendor/bin/paratest -f -p 10 —max-batch-size 5 —coverage-html=build/coverage' |
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
#!/usr/bin/env bash | |
if [ "$EUID" -ne 0 ];then | |
>&2 echo "This script requires root level access to run" | |
exit 1 | |
fi | |
if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then | |
>&2 echo "WORDPRESS_DB_PASSWORD must be set" | |
>&2 echo "Here is a random one that you can paste:" |
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 | |
$fiber = new Fiber(function(array $files): void { | |
foreach ($files as $file) { | |
unlink(__DIR__.'/'.$file); | |
Fiber::suspend($file); | |
} | |
}); | |
$files = [ |
OlderNewer