These rules are adopted from the AngularJS commit conventions.
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 | |
# MySQL root password | |
ROOTPASS='password' | |
TIMEZONE='Europe/Moscow' | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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
<?php | |
$I = new RedirectsTester($scenario); | |
$I->wantTo('check 301 redirects are working'); | |
// First, test /login/ page gets rewritten to https:// | |
$I->seePermanentRedirectToHttpsFor('login/'); | |
$I->seePermanentRedirectToHttpsFor('login/?redirect_to=foo'); |
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
let mix = require('laravel-mix'); | |
let StyleLintPlugin = require('stylelint-webpack-plugin'); | |
mix.webpackConfig({ | |
plugins: [ | |
new StyleLintPlugin({ | |
files: './assets/sass/**/*.scss', | |
configFile: './.stylelintrc' | |
}), | |
] |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
<?php | |
$str = 'fD3_'; | |
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9'), ['_']); | |
$total = 0; | |
$brut = ''; | |
$len = strlen($str); | |
/** | |
* @see: https://www.programmingalgorithms.com/algorithm/brute-force?lang=PHP | |
*/ |