One-time Dependency Setup/Configuration
wget https://getcomposer.org/download/1.1.0/composer.phar && chmod +x composer.phar && sudo mv /usr/local/bin/composer && composer self-update
| <?php | |
| # Fill our vars and run on cli | |
| # $ php -f db-connect-test.php | |
| $dbname = 'name'; | |
| $dbuser = 'user'; | |
| $dbpass = 'pass'; | |
| $dbhost = 'host'; | |
| $link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
| <?php | |
| /* | |
| * Using a key => value pair with the yield keyword is | |
| * the cleanest method I could find to add identifiers or tags | |
| * to asynchronous concurrent requests in Guzzle, | |
| * so you can identify which response is from which request! | |
| */ | |
| $client = new GuzzleHttp\Client(['base_uri' => 'http://httpbin.org']); |
| --- | |
| # SSH server settings, in line with https://stribika.github.io/2015/01/04/secure-secure-shell.html | |
| # Before using, change myhosts to your hosts' nickname and myuser to your username (two instances! make sure you replace both or you'll be locked out of ssh!) | |
| - hosts: myhosts | |
| become: true | |
| remote_user: myuser | |
| tasks: | |
| # Key exchange, ciphers and MACs | |
| - lineinfile: dest=/etc/ssh/sshd_config regexp='^KexAlgorithms' line='KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256' | |
| build:install-vendor: | |
| stage: build | |
| image: <any-image-with-composer> | |
| before_script: | |
| - composer config -g cache-dir "$(pwd)/.composer-cache" | |
| script: | |
| - composer install --ignore-platform-reqs --no-dev --optimize-autoloader --no-ansi --no-interaction --no-progress | |
| cache: | |
| paths: | |
| - .composer-cache/ |
| <?php | |
| /** | |
| * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
| * @author Phuong LE <[email protected]> <@> | |
| * @copyright Copyright (c) 2019 Menincode (http://www.menincode.com) | |
| */ | |
| namespace MyNameSpace\Catalog\Setup; | |
Symptom:
General system exception happened. SQLSTATE[22003]: Numeric value out of range: 167 Out of range value for column 'value_id' at row 1, query was: INSERT INTO
catalog_product_entity_varchar(row_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (
| import http from 'k6/http'; | |
| import { check, sleep } from 'k6'; | |
| export const URL = 'https://test.k6.io'; | |
| export default function () { | |
| let res = http.get(URL); | |
| check(res, { | |
| 'resource returns status 200': (r) => r.status === 200, | |
| }); |
composer install - Install dependenciesbin/magento setup:install - Install Magentobin/magento setup:upgrade - Update database schemabin/magento setup:di:compile - Compile dependency injectionbin/magento setup:static-content:deploy - Deploy static assets