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 you are debugging a code in editors like Visual Studio Code (VSCode) or Sublime | |
# Text and if you see that breakpoints are getting triggered due to WordPress Ajax | |
# requests, then XDEBUG Remote Debugging can be disabled for Ajax Requests by | |
# adding code below in .htaccess file. | |
<If "%{REQUEST_URI} =~ /admin-ajax/"> | |
php_value xdebug.remote_enable 0 | |
</If> |
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
diff -Naurw single-sign-on-client/includes/callback.php single-sign-on-client-modified/includes/callback.php | |
--- single-sign-on-client/includes/callback.php 2018-04-12 13:54:50.000000000 +0530 | |
+++ single-sign-on-client-modified/includes/callback.php 2018-08-01 16:32:47.515616000 +0530 | |
@@ -18,6 +18,23 @@ | |
$options = get_option( 'wposso_options' ); | |
$user_redirect = wpssoc_get_user_redirect_url(); | |
+// If error is present in the url, pass that error to login page | |
+$error_code = isset( $_REQUEST['error'] ) ? $_REQUEST['error'] : ''; | |
+$error_description = isset( $_REQUEST['error_description'] ) ? $_REQUEST['error_description'] : __( 'Error occurred during login. Error Code: ' ) . strtoupper( $error_code ); |
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 -- sh -c "su www-data -s /bin/sh -c 'cd /var/www/html/test-site && wordmove pull -tpmudv -e staging'" |
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 add . | |
git stash | |
git pull --rebase | |
git stash pop | |
git status | |
git commit | |
git push |
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
// Purpose of the command is to clone remote site on local machine. | |
// NOTE: It is required to have wordmove installed, WP installed at /var/www/html/test-site & wordmove yml config to be present in /var/www/html/test-site directory | |
alias clone_site='sudo chmod -R 775 /var/www/html/test-site && sudo chown -R www-data:sumit /var/www/html/test-site && sudo -- sh -c "su www-data -s /bin/sh -c '"'"'cd /var/www/html/test-site && wordmove pull -tpmudv -e staging'"'"'"' |
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
cp -r --no-preserve=mode,ownership /files/from/folder/* /copy/to/this/destination/ |
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
{ | |
"breadcrumbs.enabled": true, | |
"phpcs.enable": true, | |
"phpcs.showSources": true, | |
"phpcs.executablePath": "/usr/local/bin/phpcs", | |
"phpcs.autoConfigSearch": true, | |
"phpcs.ignorePatterns": [ | |
"*/vendor/*", | |
"*/vendors/*", | |
], |
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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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
netstat -tulpn |
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
// @codingStandardsIgnoreLine. -> Ignore One Line | |
// @codingStandardsIgnoreStart. -> Start Ignoring Piece of Code | |
// @codingStandardsIgnoreEnd. -> End Ignoring Piece of Code. #2 & #3 are used in conjunction to ignore a block of code. | |
// WPCS: XSS OK. -> Suppress XSS warning. Use only when you know that the text is safe |
OlderNewer