- Go to
Admin > Stores > All Stores
- Click >
Create Web Site
- In the Name field, enter store name.
- e.g.
Japan
- e.g.
- In the Code field, enter a unique string without spaces and >
Save Web Site
- e.g.
super_jp
- e.g.
- Create Store
- Create Store View
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
find -L app/design/frontend -regex '.*\(shipping\|billing\|shipping_method\|payment\).phtml' -exec grep -L formkey {} \; \ | |
| xargs sed -i 's/<\/form>/<?php echo $this->getBlockHtml("formkey") ?><\/form>/g' | |
find -L skin/frontend -name 'opcheckout.js' -exec grep -L form_key {} \; \ | |
| xargs sed -i 's/if (elements\[i\].name=='\''payment\[method\]'\'') {/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g' |
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
ssh -L 4369:localhost:4369 -L 9001:localhost:9001 ip -N | |
erl -name debug@127.0.0.1 -setcookie your_cookie -run observer |
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
Source: https://dba.stackexchange.com/questions/83125/mysql-any-way-to-import-a-huge-32-gb-sql-dump-faster | |
innodb_buffer_pool_size = 4G | |
innodb_log_buffer_size = 256M | |
innodb_log_file_size = 1G | |
innodb_write_io_threads = 16 | |
innodb_flush_log_at_trx_commit = 0 | |
Why these settings ? | |
innodb_buffer_pool_size will cache frequently read data |
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 | |
/** @var $coll \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection */ | |
$coll = $this->_objectManager->create(\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::class); | |
// add filter by entity type to get product attributes only | |
// '4' is the default type ID for 'catalog_product' entity - see 'eav_entity_type' table) | |
// or skip the next line to get all attributes for all types of entities | |
$coll->addFieldToFilter(\Magento\Eav\Model\Entity\Attribute\Set::KEY_ENTITY_TYPE_ID, 4); | |
$attrAll = $coll->load()->getItems(); |
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
alias Rebirth.Subscription | |
alias Ecto.Query | |
Subscription |> Query.where([s], not is_nil(s.user_id)) |
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
#include <FastLED.h> | |
#define NUM_LEDS 24 | |
#define NUM_DOTS 3 | |
#define DATA_PIN 0 | |
#define MAX_SPEED 60 | |
using namespace std; | |
CRGB leds[NUM_LEDS]; |
These are my solutions to the three concurrency exercises from Katrina Owen's Go Post.
I'm posting here with example output in the hopes that someone call tell me how to do it better
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 | |
class Dilmas extends \SplFloat | |
{ | |
public function __construct($value) | |
{ | |
$currency = json_decode(file_get_contents('http://api.fixer.io/latest?base=USD&symbols=BRL'), true); | |
$brl =(float) $currency['rates']['BRL']; | |
parent::__construct(((float) round($value / $brl, 2))); |