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 OnBlurComponent({ onBlur }) { | |
const handleBlur = (e) => { | |
const currentTarget = e.currentTarget; | |
// Check the newly focused element in the next tick of the event loop | |
setTimeout(() => { | |
// Check if the new activeElement is a child of the original container | |
if (!currentTarget.contains(document.activeElement)) { | |
// You can invoke a callback or add custom logic here | |
onBlur(); |
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
cd wp-content/plugins/sitepress-multilingual-cms | |
wp shell | |
include 'sitepress.php' | |
icl_reset_wpml(blogid) |
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
# Redirect URL with query string to another URL | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} / | |
RewriteCond %{QUERY_STRING} ^lang=en | |
RewriteRule ^(.*)$ https://example.ch/ [QSD,R=301,L] |
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
// Enable WP_DEBUG mode | |
define( 'WP_DEBUG', true ); | |
// Enable Debug logging to the /wp-content/debug.log file | |
define( 'WP_DEBUG_LOG', true ); | |
// Disable display of errors and warnings | |
define( 'WP_DEBUG_DISPLAY', false ); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
AuthType Basic | |
AuthName "BETA Site" | |
AuthUserFile "/var/www/vhosts/rederp.ch/html/_beta.rederp.ch/.htpasswd" | |
Require valid-user | |
</IfModule> | |
wk:$apr1$R.JuDQ11$V6oReBCgR7Jc52.JJG6n9/ |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
AuthType Basic | |
AuthName "BETA Site" | |
AuthUserFile "/var/www/vhosts/rederp.ch/html/_beta.rederp.ch/.htpasswd" | |
Require valid-user | |
</IfModule> | |
wk:$apr1$R.JuDQ11$V6oReBCgR7Jc52.JJG6n9/ |
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
sudo apt-get install php7.2-gd php7.2-mysql php7.2-dom php7.2-cli php7.2-json php7.2-common php7.2-mbstring php7.2-opcache php7.2-readline |
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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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
sudo apt-get install php-mysql | |
sudo /etc/init.d/mysql restart | |
sudo php -S localhost:80 | |
mysql -h localhost -P 3306 -u root -p | |
CREATE DATABASE menagerie; |
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
git rm --cached -r . | |
git add . | |
git commit -m 'removed all and added with git ignore' | |
git push origin master |
NewerOlder