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
| shpw swap images | |
| cat /proc/swaps or | |
| sudo swapon -s | |
| https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps |
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
| function load_ie_files(){ | |
| global $is_IE; | |
| if (!$is_IE) { | |
| } | |
| } | |
| add_action('wp_enqueue_scripts', 'load_ie_files'); |
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
| # reset to last commit | |
| git reset --hard HEAD | |
| # remove un-tracked files | |
| git clean -f -d | |
| # see changed files | |
| git status --short |
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
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
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
| terminal color-> | |
| text: #00FF00 | |
| bg: #000000 |
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 | |
| if (!isset($GLOBALS['_scb_data'])): | |
| $GLOBALS['_scb_data'] = array( 60, __FILE__, array( | |
| 'scbUtil', 'scbOptions', 'scbForms', 'scbTable', | |
| 'scbWidget', 'scbAdminPage', 'scbBoxesPage', 'scbPostMetabox', | |
| 'scbCron', 'scbHooks', | |
| )); |
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 | |
| /** | |
| * @param Mix $id will user id | |
| * @param String $user_login | |
| */ | |
| function login_user($id, $user_login) { | |
| wp_set_current_user( $id, $user_login); | |
| wp_set_auth_cookie( $id ); | |
| do_action( 'wp_login', $user_login ); |
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 | |
| function generate_username( $username ){ | |
| return username_exists($username) | |
| ? admin_theme_user_manager::generate_username( | |
| $username.mt_rand(1, 9) | |
| .mt_rand(1, 9) | |
| .mt_rand(1, 9) | |
| .mt_rand(1, 9) | |
| ) |
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
| if (!wp_check_password($pass, $user->get('user_pass'), $user->get('id'))){ | |
| return false; | |
| } | |
| $user = wp_signon(array( | |
| 'user_login' => $login, | |
| 'user_password' => $pass, | |
| )); | |
| if (is_wp_error($user)){ |
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
| if (!function_exists('update_user_status')){ | |
| include(ABSPATH . "wp-admin/includes/ms.php"); | |
| } | |
| if (!update_user_status($user_id, 'spam', $spam_value)){ | |
| return array(true, 'Unable to change spam status'); | |
| } |