Skip to content

Instantly share code, notes, and snippets.

Avatar

Oleg Ishenko varinen

View GitHub Profile
View medium-nginx-le-multiple-wb-04
version: "3"
services:
db_node_domain_2:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
View medium-nginx-le-multiple-wb-04
version: "3"
services:
db_node_domain:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
View medium-nginx-le-multiple-wb-01-1
version: "3"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
View medium-nginx-le-multiple-wb-02
letsencrypt-proxy:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- letsencrypt-certs:/etc/nginx/certs
- letsencrypt-vhost-d:/etc/nginx/vhost.d
- letsencrypt-html:/usr/share/nginx/html
environment:
- DEFAULT_EMAIL=some_email@yourdomain.tld
View medium-nginx-le-multiple-wb-03
version: "3"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
View nginx-le-multiple-wb
├── repository_root
│ ├── proxy
│ │ ├──docker-compose.yml
│ ├── site1
│ │ ├──docker-compose.yml
│ ├── site2
│ │ ├──docker-compose.yml
@varinen
varinen / gist:6785074
Created Oct 1, 2013
An SQL query generated by Magento's tax calculation resource model on a shop that uses the FireGento_GermanSetup extension. This query fetches tax rates that satisfy a tax request object with key 1|3|1|DE|79|12345 (store ID = 1, customer tax class ID = 3, product tax class id = 1, country code = DE, region id = 79 "Niedersachsen", and postcode =…
View gist:6785074
(SELECT
`main_table`.`tax_calculation_rate_id`,
`main_table`.`tax_calculation_rule_id`,
`main_table`.`customer_tax_class_id`,
`main_table`.`product_tax_class_id`,
`rule`.`priority`,
`rule`.`position`,
`rate`.`rate` AS `value`,
`rate`.`tax_country_id`,
`rate`.`tax_region_id`,
@varinen
varinen / file_custom_option_script.php
Last active May 25, 2018
Dynamically adding a file type custom option to multiple products (IDs 100, 101, and 102) in Magento.
View file_custom_option_script.php
<?php
require_once 'app/Mage.php';
Mage::app('default');
$productIds = array(100, 101, 102);
$option = array(
'title' => 'Test Option',
'type' => 'file',
'is_require' => 1,
@varinen
varinen / mysql4-install-0.1.0.php
Created Dec 17, 2012
One possible approach to adding attribute sets and groups in Magento
View mysql4-install-0.1.0.php
<?php
/**
* Installer script
*
* @category Solvingmagento
* @package Solvingmagento_Samples
* @author Oleg Ishenko <oleg.ishenko@solvingmagento.com>
* @copyright Copyright (c) 2012 - 2013 Oleg Ishenko
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @version GIT: <0.1.0>