Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user| <?php | |
| $yii = dirname(__FILE__) . '/framework/yii.php'; | |
| $config = dirname(__FILE__) . '/protected/config/main.php'; | |
| if (isset($_SERVER['REMOTE_ADDR']) && in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1'))) { | |
| defined('YII_DEBUG') or define('YII_DEBUG', true); | |
| ini_set('display_errors', 'on'); | |
| error_reporting(E_ALL); | |
| } |
| <?php | |
| // ISO 3166-1 alfa-2 | |
| // Polish names of countries of the world | |
| // Polskie nazwy krajów świata | |
| $countries = [ | |
| 'AF' => 'Afganistan', | |
| 'AL' => 'Albania', | |
| 'DZ' => 'Algieria', | |
| 'AD' => 'Andora', | |
| 'AO' => 'Angola', |
| <?php | |
| /** | |
| * CsNumberValidator class file. | |
| * @copyright 2014 Paweł Bizley Brzozowski | |
| */ | |
| /** | |
| * CsNumberValidator is the same as CNumberValidator but allows comma instead of dot before decimals. | |
| * So now 123,45 is valid number. |
| <?php | |
| return [ | |
| 'Africa/Abidjan', | |
| 'Africa/Accra', | |
| 'Africa/Addis_Ababa', | |
| 'Africa/Algiers', | |
| 'Africa/Asmara', | |
| 'Africa/Asmera', | |
| 'Africa/Bamako', |
| /** | |
| * Join array elements with a string. | |
| * This method works with multidimensional arrays. | |
| * | |
| * @param string|array $glue the string for the array to be joined with or | |
| * the array itself if $array is null | |
| * @param array|null $array array to implode or null if array is provided as | |
| * first parameter. | |
| * @return string imploded array | |
| * @throws \yii\base\InvalidParamException |
| <?php | |
| $countries = [ | |
| 'AF' => Yii::t('app/countries', 'Afghanistan'), | |
| 'AL' => Yii::t('app/countries', 'Albania'), | |
| 'DZ' => Yii::t('app/countries', 'Algeria'), | |
| 'AS' => Yii::t('app/countries', 'American Samoa'), | |
| 'AD' => Yii::t('app/countries', 'Andorra'), | |
| 'AO' => Yii::t('app/countries', 'Angola'), | |
| 'AI' => Yii::t('app/countries', 'Anguilla'), |
| <?php | |
| namespace app\models; | |
| use yii\base\Model; | |
| use Yii; | |
| /** | |
| * Simplified model with validation rules. | |
| * All characters are allowed (you want emojis in the password? Go ahead). |
| <?php | |
| function sortByDependency($input) | |
| { | |
| $output = []; | |
| $checkList = []; | |
| $inputCount = count($input); | |
| // while not all items are resolved: |
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user| let currentTime = Math.floor(Date.now() / 1000); | |
| let tokenExpiration = pm.environment.get("token_expiration"); | |
| if (tokenExpiration && tokenExpiration <= currentTime) { | |
| let apiUrl = pm.environment.get("api_url"); | |
| let refreshToken = pm.environment.get("refresh_token"); | |
| if (refreshToken) { | |
| pm.sendRequest( | |
| { | |
| url: 'http://' + apiUrl + '/oauth/v2/token', | |
| method: 'POST', |