sudo apt-get update && sudo apt-get upgrade
sudo apt-get install software-properties-common \
nginx wget zip unzip git curl file certbot python3-pip \
python3-dev python3-venv redis-server mariadb-server \
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install software-properties-common \
nginx wget zip unzip git curl file certbot python3-pip \
python3-dev python3-venv redis-server mariadb-server \
| # first install required package | |
| sudo apt-get install ippserver | |
| # create working directory for example PDF | |
| mkdir PDF | |
| # example for working virtual printer | |
| ippserver -2 -M "HP" -P -d /home/pop/PDF -k -c /home/pop/PDF -m "XM80" -n 127.0.0.1 -l "ipp://127.0.0.1:8085" -p 8085 -vvv "Dev Printer1" | 
| --first install: | |
| sudo apt install v4l2loopback-dkms | |
| sudo apt install ffmpeg | |
| --then run: | |
| ffmpeg -loop 1 -re -i /path/to/picture.png -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video0 | |
| var temp = $.event.dispatch; | |
| $.event.dispatch = function(event, arg2, arg3){ | |
| // the event that is passed is the native event, if you want the jquery | |
| // event, you need the fixed event. | |
| console.log(jQuery.event.fix( event ), arg2, arg3); | |
| temp.call(this, event, arg2, arg3); | |
| } | 
| #!/usr/bin/python3 | |
| import datetime | |
| import os | |
| import subprocess | |
| import tempfile | |
| import shutil | |
| from dateutil.parser import parse | |
| # Container names which you want to backup | 
| first install xdebug: | |
| sudo apt-get install php7.4-xdebug | |
| edit config file with the following, also check the zend version (20190902) if it is different on your machine: | |
| sudo nano /etc/php/7.4/mods-available/xdebug.ini | |
| zend_extension="/usr/lib/php/20190902/xdebug.so" | |
| xdebug.mode = debug | |
| xdebug.start_with_request = yes | 
| sudo certbot certonly --manual --preferred-challenges=dns-01 --email [email protected] --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.site1.com -d *.site2.net | 
| // put this code in your theme functions.php | |
| add_filter( 'wpwhpro/run/actions/custom_action/return_args', 'wpwh_fire_my_custom_logic', 10, 3 ); | |
| function wpwh_fire_my_custom_logic( $return_args, $identifier, $response_body ){ | |
| //If the identifier doesn't match, do nothing | |
| if( $identifier == 'update_status' ){ | |
| $order_id = WPWHPRO()->helpers->validate_request_value( $response_body['content'], 'order_id' ); | |
| $new_status = WPWHPRO()->helpers->validate_request_value( $response_body['content'], 'new_status' ); | |
| $order = new WC_Order($order_id); | |
| sudo apt-get update | |
| sudo apt install php-xdebug | |
| # [7.2] path may be different on your system, check it. | |
| sudo nano /etc/php/7.2/mods-available/xdebug.ini | |
| Add the following code into xdebug.ini file: | |
| zend_extension=/usr/lib/php/20151012/xdebug.so # [20151012] path may be different on your system, check it. | 
| // the easy way to have any subdomain without the need to generate new cert or add dns record everytime is to create CNAME | |
| for all subdomains using the * wildcard and then generate cert for all subdomain including the main domain with: | |
| sudo certbot -d *.example.com --preferred-challenges=dns-01 --agree-tos certonly --manual |