- Download terraform binary
- Install Azure CLI
curl -L https://aka.ms/InstallAzureCli | bash - Login with
az loginyou will be taken to the browser and returned to the shell
- create app server looker-1
curl -L https://aka.ms/InstallAzureCli | bashaz login you will be taken to the browser and returned to the shell| #!/bin/bash | |
| MC_API_KEY="apikey:YOUR_KEY" | |
| MC_LIST_ID="YOUR LIST ID" | |
| # don't forget to update usN to your own MailChimp data center ID | |
| TOTAL_ITEMS=`curl --silent --request GET --url "https://usN.api.mailchimp.com/3.0/lists/$MC_LIST_ID/members?fields=total_items" --user $MC_API_KEY | jq -r ".total_items"` | |
| CHUNK_SIZE=1000 | |
| echo "id,email_address,status,avg_open_rate,avg_click_rate,timestamp_signup,last_changed,member_rating" > mailchimp_list.csv | |
| echo "action,timestamp,url,type,campaign_id,title,parent_campaign,subscriber_id" > mailchimp_list_activity.csv |
| <?php | |
| /** | |
| * Example of simple product POST using Admin account via Magento REST API. OAuth authorization is used | |
| */ | |
| $callbackUrl = "http://yourdomain.com/magento-create-product-rest-api.php"; // the URL of this file | |
| $temporaryCredentialsRequestUrl = "http://yourdomain.com/oauth/initiate?oauth_callback=" . urlencode($callbackUrl); | |
| $adminAuthorizationUrl = 'http://yourdomain.com/admin/oauth_authorize'; | |
| $accessTokenRequestUrl = 'http://yourdomain.com/oauth/token'; | |
| $apiUrl = 'http://yourdomain.com/api/rest'; | |
| $consumerKey = 'v3b7p1yn29q0378ybk9w5d7hrsmiifpf'; |
| oauth \ | |
| --method PUT \ | |
| --consumer-key v3b7p1yn29q0378ybk9w5d7hrsmiifpf \ | |
| --consumer-secret q91boucyygushav4ce4x07sohvpsynlg \ | |
| --token abe2y68hu5y43qr9eghwyttyrf0yhowy \ | |
| --secret 6gbzpn4uiok1k5ml8963nkz43l67ynom \ | |
| --uri http://yourdomain.com/api/rest/products/522909 \ | |
| debug | |
| Method: PUT |
| <?php | |
| $db = Mage::getSingleton('core/resource')->getConnection('core_read'); | |
| $rows = $db->fetchAll("SELECT entity_id FROM catalog_product_entity WHERE type_id = 'simple'"); | |
| foreach ($rows as $row) { | |
| Mage::helper('SalesOrderPlanning/ProductAvailabilityStatus')->RefreshForOneProduct($row['entity_id']); | |
| Mage::helper('AdvancedStock/Product_Base')->updateStocksFromProductId($row['entity_id']); | |
| Mage::helper('purchase/Product')->updateProductWaitingForDeliveryQty($row['entity_id']); | |
| Mage::helper('purchase/Product')->updateProductDeliveryDate($row['entity_id']); | |
| } |
| <?php | |
| class Lot_Common_Helper_Cli_Erp extends Lot_Common_Helper_Cli_Data { | |
| public function refreshStockStatusAsync($entity_ids) { | |
| foreach ($entity_ids as $entity_id) { | |
| try { | |
| Mage::helper('SalesOrderPlanning/ProductAvailabilityStatus')->RefreshForOneProduct($entity_id); | |
| Mage::helper('AdvancedStock/Product_Base')->updateStocksFromProductId($entity_id); | |
| Mage::helper('purchase/Product')->updateProductWaitingForDeliveryQty($entity_id); | |
| Mage::helper('purchase/Product')->updateProductDeliveryDate($entity_id); |
| <?php | |
| /* | |
| ==New BSD License== | |
| Copyright (c) 2013, Drew Gillson | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions are met: | |
| <?php | |
| /* | |
| ==New BSD License== | |
| Copyright (c) 2013, Drew Gillson | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions are met: |
| <?php | |
| require_once 'abstract.php'; | |
| class Mage_Shell_Pricerules extends Mage_Shell_Abstract | |
| { | |
| public function run() | |
| { | |
| ini_set('memory_limit', '1024M'); | |
| $this->db = Mage::getSingleton('core/resource')->getConnection('core_read'); |
| <?php | |
| /** | |
| * This new CLI script refreshes stock status, just do 'php erp.php refreshstockstatus' in /shell | |
| * Optimized for minimal memory usage with one fix to the core BoostShop ERP code, which is the addition | |
| * of $this->_product->clearInstance() to the end of MDN_SalesOrderPlanning_Model_ProductAvailabilityStatus::Refresh | |
| **/ | |
| #/shell/erp.php | |
| require_once 'abstract.php'; | |
| class Mage_Shell_Erp extends Mage_Shell_Abstract |