$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$cookieManager = $objectManager->get('Magento\Framework\Stdlib\CookieManagerInterface');
// set cookie value
$cookieManager->setPublicCookie('key', 'value');
//get cookie value
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 | |
docker-compose stop && docker-compose -y rm && docker pull && docker-compose up -d |
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
var rulesMap = [ | |
{ | |
package: 1, | |
rules: [ | |
{ | |
conditions: [ | |
{ field: "sph", operator: "lower", values: [-4], "logic": "||" }, | |
{ field: "sph", operator: "above", values: [3], "logic": "||" }, | |
{ field: "cyl", operator: "lower", values: [-2], "logic": "||" }, | |
{ field: "cyl", operator: "above", values: [2] } |
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
(function() { | |
/** | |
* Private variables | |
*/ | |
var TAB_FILL_IT_ONLINE = 1; | |
var TAB_UPLOAD = 2; | |
var TAB_SEND_IT_LATTER = 3; | |
var TAB_SAVED_PRESCRIPTION = 4; |
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
;(function($) { | |
'use strict'; | |
/** | |
* Global event class for publish and subsribes events | |
* Singleton | |
* | |
* @method getInstance returns singleton of Gevent | |
*/ | |
var _Gevent = (function() { |
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 | |
MAGENTOFOLDER=/var/www/magento/current | |
echo "Cleaning..." | |
rm -rf ${MAGENTOFOLDER}/var/view_preprocessed/ | |
rm -rf ${MAGENTOFOLDER}/pub/static/frontend/Komplizierte/ | |
echo "Cleaning finish! Refresh browser page." |
./bin/magento deploy:mode:set developer
cd /var/www/magento; wget https://gist.githubusercontent.com/mborodov/f02a2dd9660c33a9f0f2/raw/ac5f34061b67de2373ee9ca6d9c4742ddfc95ebf/clean.sh; chmod +x ../clean.sh
Игра заканчивается после того, как один из игроков потерял все очки влияния. Побеждает тот игрок, у кого на тот момент очков влияния больше всего. Это правило не позволяет скучать «убитым» в ожидании конца партии, не дает лидеру сильно выбиться вперед и порой приводит к парадоксальным ситуациям.
Каждый игрок кладет себе 1 Штурмовик, 2 Исследователя и 4 Разведчика. В первый круг (первый ход всех игроков) лимит карт в руке составляет 3 карты, во второй круг – 4 и далее, как обычно, по 5. Для удобства слежения, какой сейчас круг, предлагается использовать кубик. Также автор хоумрула ввел правило, что если за круг никто из игроков не купил карт в торговом ряду, они все сбрасываются.
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 | |
// for log errors | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
// autoload classes | |
include_once __DIR__.'/vendor/autoload.php'; | |
// define variables | |
const APPLICATION_ID = 'local.56d4c44e94a076.41291969'; |