__________ _____ ____________________.______________ _________
\______ \/ _ \ / _____/\__ ___/| \_ _____// _____/
| ___/ /_\ \ \_____ \ | | | || __)_ \_____ \
| | / | \/ \ | | | || \/ \
|____| \____|__ /_______ / |____| |___/_______ /_______ /
\/ \/ \/ \/
| ############ WordPress #################### | |
| # Disable logging for favicon and robots.txt | |
| location = /favicon.ico { | |
| try_files /favicon.ico @empty; | |
| access_log off; | |
| log_not_found off; | |
| expires max; | |
| } |
| #!/bin/bash | |
| # This script rotates the screen and touchscreen | |
| # by Ruben Barkow-Kuder: https://gist.github.com/rubo77/daa262e0229f6e398766 | |
| #### configuration | |
| # find your Touchscreen device with `xinput` | |
| TouchscreenDevice="$(xrandr |grep eDP|cut -d" " -f1)" | |
| if [ "$1" = "--help" ] || [ "$1" = "-h" ] ; then |
| /* | |
| DO NOT COPY\PASTE. Take only what you need carefully. | |
| The following code is just a few **examples** of optimizations that you can do in functions.php file. | |
| */ | |
| <?php | |
| // disable google fonts | |
| add_filter( 'elementor/frontend/print_google_fonts', '__return_false' ); |
| import json | |
| import socket | |
| CANARY_FILE = "opencanary.log" | |
| INFORMATION_LOG = 1001 | |
| BRUTE_FORCE_LOG = 6001 | |
| PORT_SCAN_LOG = 5001 | |
| HTTP_SCAN_LOG = 3000 |
Recently WooCommerce has added a lot of improvements to the plugin which we really appriciate but at the same time a lot of bloated features has alos been added to the plugin like Marketing Hub, a completely useless menu taking extra space among the other important menu items. Now if you find Marketing Hub to be useful, you can keep it.
But just in case you are looking for a way to remove these features that you no longer need from your WordPress Admin menus, take a look at the following code snippets. Please note: though I will show you how you can remove the Marketing Hub from your WP Admin menu list completely and make sure WooCommerce doesn't execute codes for that feature you don't need, you can do the same for other WooCommerce features as well like Analytics.
If you are using WooCommerce <= v4.2, you can simple add this one line of code in your theme's functions.php f
| #!/bin/bash | |
| ####### Configuration ##### | |
| # Azure Setup: https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows | |
| AzureSubscriptionKey="" | |
| AzureEndpoint="" | |
| # IFTTT Setup: https://ifttt.com/maker_webhooks | |
| IFTTTKey="" | |
| IFTTTEventName="" |
Docker Desktop for Windows v2, which uses WSL2, stores all image and container files in a separate virtual volume (vhdx). This virtual hard disk file can automatically grow when it needs more space (to a certain limit). Unfortunately, if you reclaim some space, i.e. by removing unused images, vhdx doesn't shrink automatically.
wsl --shutdown
Optimize-VHD -Path "$($env:LOCALAPPDATA)\Docker\wsl\data\ext4.vhdx" -Mode Full| class Software { | |
| [string]$Name | |
| [string]$Id | |
| [string]$Version | |
| [string]$AvailableVersion | |
| } | |
| $upgradeResult = winget upgrade | Out-String | |
| $lines = $upgradeResult.Split([Environment]::NewLine) |