Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
| Mining ETH with GPU | |
| Check gpu: | |
| Minimum Ram of GPU is 4GB | |
| Command: | |
| # nvidia-smi | |
| Download packages: | |
| # wget https://github.com/Lolliedieb/lolMiner-releases/releases/download/1.84/lolMiner_v1.84_Lin64.tar.gz | |
| # tar -xvf lolMiner_v1.84_Lin64.tar.gz |
| docker-compose run certbot certonly -d example.com --manual --preferred-challenges dns --dry-run |
| <?php | |
| function enqueue_select2_jquery() { | |
| wp_register_style( 'select2css', '//cdnjs.cloudflare.com/ajax/libs/select2/3.4.8/select2.css', false, '1.0', 'all' ); | |
| wp_register_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.4.8/select2.js', array( 'jquery' ), '1.0', true ); | |
| wp_enqueue_style( 'select2css' ); | |
| wp_enqueue_script( 'select2' ); | |
| } | |
| add_action( 'admin_enqueue_scripts', 'enqueue_select2_jquery' ); |
| <?php | |
| /** | |
| * Plugin Name: Disable Native Login | |
| * Plugin URI: https://cs.cementhorizon.com/ | |
| * Description: Disable the native username password login in wordpress | |
| * Version: 1.0.0 | |
| * Author: Gene Wood | |
| * Author URI: https://cs.cementhorizon.com/ | |
| * License: GPL2 |
| Kubernetes | |
| Create secret: | |
| kubectl create secret generic <secret-name> --from-literal=username=<username> --from-literal=username=<password> --from-literal=address=<ip-address> | |
| Create Deployment: | |
| kubectl create deployment <deployment-name> --image <docker-image-name> --dry-run=client -o yaml > deployment.yaml | |
| Create Service: | |
| kubectl expose deployment <deployment-name> --type LoadBalancer --port 80 --dry-run=client -o yaml > loadbalancer.yml |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| // Object to query string | |
| params = { keyword: 'test', startDate: '20-02-2022' }; | |
| urlParams = new URLSearchParams(params).toString(); //"keyword=test&startDate=20-02-2022" | |
| // Query string to Object | |
| search = "keyword=test&startDate=20-02-2022" | |
| queryParams = new URLSearchParams(search) | |
| getParams = Object.fromEntries(queryParams); |
| ### Remove all file .snap | |
| rm $(find . -name "*.snap") | |
| ### File .htaccess force https | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{HTTPS} off | |
| RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
| RewriteCond $1 !^(index\.php|resources|robots\.txt|public) |
Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
| Spectacle | |
| Copyclip2 | |
| VsCode | |
| Chrome | |
| LastPass | |
| Tunnelblick | |
| Homebrew |