View phpbrew ext installs
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 w mysql | |
# default: | |
# bcmath, bz2, calendar, cli, ctype, dom, fileinfo, filter, ipc, | |
# json, mbregex, mbstring, mhash, pcntl, pcre, pdo, pear, phar, posix, | |
# readline, sockets, tokenizer, xml, curl, openssl, zip | |
phpbrew install php-{version} +default +dbs +intl +soap | |
phpbrew ext install gd | |
phpbrew ext install iconv -- --with-iconv=/usr/local/opt/libiconv |
View update.sh
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/sh | |
CURRENT_VERSION=$(ls -la | grep \ web | awk '{ print $11 }' | sed -e 's/phpMyAdmin-\(.*\)-all-languages/\1/') # ' | |
VERSION_CONTENT=$(curl -s https://www.phpmyadmin.net/home_page/version.json | php -r 'echo json_decode(file_get_contents("php://stdin"), true)["version"];') | |
LATEST_VERSION=$(echo "$VERSION_CONTENT" | head -n1) | |
LATEST_VERSION_DL_URL="https://files.phpmyadmin.net/phpMyAdmin/${LATEST_VERSION}/phpMyAdmin-${LATEST_VERSION}-all-languages.zip" | |
PHP_VERSION="php8.2" | |
if [ ! -f config.inc.php ] |
View Woocommerce number of all orders between dates
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
SET @prefix = 'wp_'; | |
SET @date_from = '2020-01-01'; | |
SET @date_to = '2020-12-31'; | |
SET @query = CONCAT('SELECT sum(woim.meta_value) number_of_item_sold, woi.order_item_name | |
FROM ', @prefix, 'woocommerce_order_itemmeta as woim | |
LEFT JOIN ', @prefix, 'woocommerce_order_items as woi ON woi.order_item_id = woim.order_item_id | |
LEFT JOIN ', @prefix, 'posts as p ON woi.order_id = p.ID | |
WHERE woim.meta_key = \'_qty\' | |
AND p.post_status = \'wc-completed\' |
View build
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 | |
env=$1 | |
if [ "$env" == "" ] | |
then | |
echo "env missing" | |
exit 1 | |
fi |