Skip to content

Instantly share code, notes, and snippets.

View okovalov's full-sized avatar
🏠
Working from home

Oleksandr Kovalov okovalov

🏠
Working from home
View GitHub Profile
@okovalov
okovalov / sample.js
Created September 9, 2016 17:39 — forked from chrisabrams/sample.js
Bluebird promise chain example
Promise = require('bluebird')
var A = function() {
return new Promise(function(resolve, reject) {
var result = 'A is done'
console.log(result)
resolve(result);
})
To be able to use Fabric for deploy you must have some things done:
- you need to be able to ssh to the server where the deployemnt is meant to be done.
- your Python version should match a certain required one
- you must have `pip` installed
- you must have `virtualenv` installed
- you must have `fabric` installed inside your virtual environment (please read about virtual env below)
Note about SSH: Basically Fabric uses ssh to connect to the sever so before you even
start with Fabbric please make sure your computer (user) public key is added to the
server's authorized hosts and you are able to ssh to the server without prompting
@okovalov
okovalov / pre-commit
Last active October 6, 2016 14:55 — forked from CamdenSegal/pre-commit
Run phpunit pre-commit stop commit if failed.
#!/usr/bin/php
<?php
## SETUP
$isPhpCsPass = false;
$isPhpMdPass = false;
$isPhpUnitPass = false;
## PHPCS
@okovalov
okovalov / !README.md
Created March 3, 2017 14:59
Binary Bot (https://bot.binary.com) Sample Price Actions
<xml xmlns="http://www.w3.org/1999/xhtml" collection="true">
<block type="procedures_defreturn" id="Hfg.=dQz#4Of#xazXz^=">
<mutation>
<arg name="__input_list"></arg>
</mutation>
<field name="NAME">getOddEvenStats</field>
<comment pinned="false" h="80" w="160">Describe this function...</comment>
<statement name="STACK">
<block type="variables_set" id="|wA=5Q0c;Co3:F/VO;1u">
<field name="VAR">__f__list</field>
sudo apt-get install mint-meta-mate
switch to it
Install google chrome
sudo apt-get install git mc vim php openssh-server nfs-kernel-server
sudo apt-get install php php7.0-mcrypt php7.0-xml php-all-dev php7.0-curl php7.0-gd php7.0-intl php7.0-mbstring php7.0-zip php7.0-mysql
add to sources
echo "Setting permissions 777 to ./var"
sudo find ./var/ -type d -exec chmod -R 777 {} \;
php bin/magento cache:clean;
php bin/magento setup:upgrade;
php bin/magento setup:di:compile;
php bin/magento indexer:reindex;
echo "Setting permissions 777 to ./pub"
sudo find ./pub/ -type d -exec chmod -R 777 {} \;
#echo "Setting permissions 755 to ./.htaccess"
#sudo find ./.htaccess -type f -exec chmod -R 755 {} \;
Taken from https://www.howtoforge.com/tutorial/how-to-install-magento-with-nginx-on-ubuntu/
How to Install Magento with Nginx on Ubuntu 16.04
Prerequisites:
Ubuntu 16.04 - 64 bit.
Root Privileges.
Step 1 - Install Nginx
Pre-reqs
a) install VirtualBox and Vagrant
b) add homestead box (once vagrant is installed) - vagrant box add laravel/homestead
1) create local directory (source code would be placed there)
mkdir ~/prj/Commer/v2/lac2-magento.dev
1.a) cd ~/prj/Commer/v2/lac2-magento.dev/