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 | |
# Location: Anywhere | |
# Add existing 'ubuntu' user to 'www-data' group | |
sudo usermod -a -G www-data ubuntu; | |
# Set the ownership of the files/directories | |
sudo chown -R www-data:www-data /var/www/html/; | |
# Set group ownership inheritance |
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
/* Please add the following code at the bottom of the wp-config.php file */ | |
define('FS_METHOD', 'direct'); | |
define('FS_CHMOD_DIR',0755); | |
define('FS_CHMOD_FILE',0644); |
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 | |
// Add this code to your theme functions.php file or a custom plugin | |
add_action('init', 'register_order_status'); | |
//add status after completed | |
add_filter('wc_order_statuses', 'add_delivered_to_order_statuses'); | |
//Custom Statuses in admin reports | |
add_filter('woocommerce_reports_order_statuses', 'include_custom_order_status_to_reports', 20, 1); | |
// for automate woo to check order is paid | |
add_filter('woocommerce_order_is_paid_statuses', 'delivered_woocommerce_order_is_paid_statuses'); |
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
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 |
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
// Kills all httpd process from running | |
sudo killall httpd | |
// Disables startup loading when system starts | |
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist |
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 | |
/* Credit: https://github.com/hbattat/verifyEmail */ | |
function verifyEmail($toemail, $fromemail, $getdetails = false) | |
{ | |
// Get the domain of the email recipient | |
$email_arr = explode('@', $toemail); | |
$domain = array_slice($email_arr, -1); | |
$domain = $domain[0]; |
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
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr |
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
#Export database with all procedures, functions, views & triggers along with the table structures and their data. | |
mysqldump <other mysqldump options> --routines export.sql |
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
// you should run this commend once you are logged into the server | |
mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt <database> > export.sql |
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
scp [email protected]:youfile.zip /local/directory |
NewerOlder