This file contains hidden or 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
while ($true) { | |
try { | |
Get-Process -Name 'ms-teams' -ErrorAction stop | Out-Null | |
Write-Host ("{0} - Microsoft Teams is running..." -f $(get-date)) -ForegroundColor Green | |
$wshell = New-Object -ComObject wscript.shell | |
$wshell.sendkeys("{NUMLOCK}{NUMLOCK}") | |
Write-Host ("{0} - Pressed NUMLOCK twice and waiting for 60 seconds" -f $(get-date)) -ForegroundColor Green | |
Start-Sleep -Seconds 60 | |
} | |
catch { |
This file contains hidden or 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 | |
/** | |
* Application entry point | |
* | |
* Example - run a particular store or website: | |
* -------------------------------------------- | |
* require __DIR__ . '/app/bootstrap.php'; | |
* $params = $_SERVER; | |
* $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'website2'; | |
* $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website'; |
This file contains hidden or 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
#Command | |
alias mcf="php bin/magento c:f" && alias mcd="php bin/magento c:d" && alias mce="php bin/magento c:e" && alias mce="php bin/magento c:c" &&alias msup="php bin/magento s:up" && alias mssd="php bin/magento s:s:d" && alias msdc="php bin/magento s:d:c" && alias msvc="php bin/magento v:c" && alias msun="php bin/magento s:un" && alias mscr="php bin/magento s:c:r" && alias mmod="php bin/magento mo:d" && alias mmoe="php bin/magento mo:e" && alias mmos="php bin/magento mo:s" && alias mmou="php bin/magento mo:u" && alias mmae="php bin/magento ma:e" && alias mmae="php bin/magento ma:d" && alias mii="php bin/magento i:i" && alias mrei="php bin/magento i:rei" && alias mres="php bin/magento i:res" && alias mst="php bin/magento i:st" | |
#Reference | |
alias mcf="php bin/magento c:f" //Flush Cache | |
alias mcd="php bin/magento c:d" //Disable Cache | |
alias mce="php bin/magento c:e" //Enable Cache | |
alias mce="php bin/magento c:c" //Clean Cache | |
alias msup="php bin/magento s:up" //Setup Upgrade | |
alias mssd="php bin/magento s:s:d" // |
This file contains hidden or 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
# Website Sitemap | |
Sitemap: www.yoursite.co.uk/sitemap.xml | |
User-agent: Googlebot-Image | |
Disallow: / | |
Allow: /media/catalog/product/ | |
# Crawlers Setup | |
User-agent: * |
This file contains hidden or 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 | |
$mageFilename = 'app/Mage.php'; | |
require_once $mageFilename; | |
Mage::setIsDeveloperMode(true); | |
ini_set('display_errors', 1); | |
umask(0); | |
Mage::app('admin'); | |
Mage::register('isSecureArea', 1); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); |
This file contains hidden or 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
SET FOREIGN_KEY_CHECKS=0; | |
# Clean order history | |
TRUNCATE TABLE `sales_bestsellers_aggregated_daily`; | |
TRUNCATE TABLE `sales_bestsellers_aggregated_monthly`; | |
TRUNCATE TABLE `sales_bestsellers_aggregated_yearly`; | |
# Clean order infos | |
TRUNCATE TABLE `sales_creditmemo`; | |
TRUNCATE TABLE `sales_creditmemo_comment`; |
This file contains hidden or 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
SET foreign_key_checks = 0; | |
TRUNCATE dataflow_batch_export; | |
TRUNCATE dataflow_batch_import; | |
TRUNCATE log_customer; | |
TRUNCATE log_quote; | |
TRUNCATE log_summary; | |
TRUNCATE log_summary_type; | |
TRUNCATE log_url; | |
TRUNCATE log_url_info; | |
TRUNCATE log_visitor; |
This file contains hidden or 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 | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID); | |
$products = Mage::getModel('catalog/product')->getCollection(); | |
//->addAttributeToFilter('entity_id', array('gt' => 14000)); | |
$mediaApi = Mage::getModel("catalog/product_attribute_media_api"); |