A pattern suggestion to integrate framework independent domain models into Magento.
We want to instantiate a domain model based on Magento configuration.
variable "create_vm" { | |
description = "If set to true, it will create vm" | |
type = bool | |
} | |
variable "create_vmss" { | |
description = "If set to true, it will create vmss" | |
type = bool | |
} |
<?php | |
namespace Vendor\Module\Plugin; | |
class CsrfValidatorSkip | |
{ | |
/** | |
* @param \Magento\Framework\App\Request\CsrfValidator $subject | |
* @param \Closure $proceed | |
* @param \Magento\Framework\App\RequestInterface $request | |
* @param \Magento\Framework\App\ActionInterface $action |
After you've completed this micro-tutorial you'll be making requests to your Redis cache from serverless functions with OpenFaaS. From there it's up to you to build something awesome.
Deploy OpenFaaS and the faas-cli
.
This guide is for OpenFaaS on Kubernetes, but if you're using Swarm that's OK - you'll just have to adapt some of the commands for setting up Redis. The OpenFaaS code will be the same.
#!/bin/bash | |
# Derived from | |
# https://github.com/btford/allthethings | |
# | |
# Licensed under WTFPL http://sam.zoy.org/wtfpl/ | |
# | |
pur=$(tput setaf 5) # Purple |
version: "2" | |
services: | |
varnish: | |
#hostname: magento2.docker | |
image: meanbee/magento2-varnish:latest | |
environment: | |
- VIRTUAL_HOST=magento2.docker | |
- VIRTUAL_PORT=80 | |
- HTTPS_METHOD=noredirect | |
ports: |
<?php | |
namespace Demo\Navigation\Plugin\Layer; | |
use Magento\Catalog\Model\ResourceModel\Layer\Filter\Attribute; | |
use Magento\Framework\App\RequestInterface; | |
use Magento\Catalog\Model\Layer\Filter\ItemFactory; | |
use Magento\Catalog\Model\Category; | |
use Magento\Catalog\Model\Layer\FilterList; | |
use Magento\Catalog\Model\Product; |
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/
#!/usr/bin/env bash | |
PROGNAME=$(basename $0) | |
function usage { | |
echo "usage: $PROGNAME [-n NAMESPACE] [-m MAX-PODS] -s SERVICE -- COMMAND" | |
echo " -s SERVICE K8s service, i.e. a pod selector (required)" | |
echo " COMMAND Command to execute on the pods" | |
echo " -n NAMESPACE K8s namespace (optional)" | |
echo " -m MAX-PODS Max number of pods to run on (optional; default=all)" |