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
// Make site private | |
function make_wordpress_site_private(){ | |
global $wp; | |
if (!is_user_logged_in() && $GLOBALS['pagenow'] !== 'wp-login.php'){ | |
wp_redirect(wp_login_url($wp -> request)); | |
exit; | |
} | |
} |
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
// 1) Fill password var with your secret password. | |
// 2) Contact secure coding dojo admin to update generated hash/salt values. | |
const crypto = require('crypto'); | |
const validator = require('validator'); | |
password = 'insert-your-password-here'; | |
var isStrongPass = validator.matches(password,/.{8,}/)==true && validator.matches(password,/[a-z]{1,}/)==true && validator.matches(password,/[A-Z]{1,}/)==true && validator.matches(password,/[0-9]{1,}/)==true; | |
if(!isStrongPass){ |
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
# http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html | |
pip install elasticsearch-curator -t /path/to/project-dir | |
pip install requests-aws4auth -t /path/to/project-dir |
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
## USAGE EXAMPLES | |
# installs CoreEditor (the IDE), ManagedDesktop (.NET framework applications), NetCoreTools (.NET core applications), NetWeb (ASP.NET) + active product using provided Product Key | |
# choco install visualstudio2017enterprise.pls -y --params "/Features:Microsoft.VisualStudio.Workload.CoreEditor,Microsoft.VisualStudio.Workload.ManagedDesktop,Microsoft.VisualStudio.Workload.NetCoreTools,Microsoft.VisualStudio.Workload.NetWeb /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" | |
# silent bare minimum installation with product key activation. The minimum installation contains only the Core Editor workload (Microsoft.VisualStudio.Workload.CoreEditor) | |
# choco install visualstudio2017enterprise.pls -y --params "/ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" | |
# silent bare minimum installation without product key activation | |
# choco install visualstudio2017enterprise.pls -y |