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
[ | |
["000000", "black"], | |
["000080", "navy-blue"], | |
["0000c8", "dark-blue"], | |
["0000ff", "blue"], | |
["000741", "stratos"], | |
["001b1c", "swamp"], | |
["002387", "resolution-blue"], | |
["002900", "deep-fir"], | |
["002e20", "burnham"], |
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 './abstract.php'; | |
/** | |
* Update Super product attributes of Configurable Product in multistore configuration from prices of simple product | |
* For Example in this example we want to have Configurable Super Pricing of Attribute "Size" | |
* | |
* @category Mage | |
* @package Mage_Shell | |
*/ |
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 | |
public function flushMagentoCache(){ | |
$flushCacheStart = microtime(true); | |
$cacheTypes = array(); | |
$cacheTypes[] = 'config'; | |
$cacheTypes[] = 'layout'; | |
$cacheTypes[] = 'block_html'; |
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 | |
function cleanMagentoLogs(){ | |
// Number Of days to keep Logs | |
$days = 15; | |
\Mage::app()->getStore()->setConfig(\Mage_Log_Model_Log::XML_LOG_CLEAN_DAYS, $days); | |
\Mage::getModel('log/log')->clean(); | |
} |
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 | |
/** | |
* Attribute codes to delete | |
*/ | |
$attribute_codes = array('color', 'size', 'filter_color'); | |
foreach ($attribute_codes as $attribute_code) { | |
$attribute = \Mage::getModel('eav/config')->getAttribute('catalog_product', $attribute_code); | |
$options = $attribute->getSource()->getAllOptions(); | |
$optionsDelete = array(); |
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
/* Women's Clothing Sizes Conversion */ | |
var groups = ["U.S.","U.S. (named sizes)","Australia","France","Germany","Italy","Japan","U.K."]; | |
var data = [['2','4','6','8','10','12','14','16','18','20','22','24'],['X-Small','X-Small/Small','Small','Medium','Medium','Large','Large/X-Large','X-Large/1X','1X/2X','2X','3X','3X'],['6','8','10','12','14','16','18','20','22','24','26','28'],['32','34','36','38','40','42','44','46','50','52','54','56'],['30','32','34','36','38','40','42','44','46','48','50','52'],['36','38','40','42','44','46','48','50','52','54','56','58'],['5','7','9','11','13','15','17','19','21','23','25','27'],['4','6','8','10','12','14','16','18','20','22','24','26']]; | |
/* Women's Dresses and Suits Sizes Conversion */ | |
var groups = ["U.S.","France","Italy","U.K."]; | |
var data = [['0','2','4','6','8','10','12','14','16','18','20','22','24'],['32','34','36','38','40','42','44','46','48','50','52','54','56'],['36','38','40','42','44','46','48','50','52','54','56','58','60'],['4','6','8','10','12','14',' |
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
{ | |
"af":{ | |
"country":"Afrikaans", | |
"money_format":"\u00a4#,##0.00", | |
"datetime_format":"y-MM-dd h:mm a" | |
}, | |
"af_NA":{ | |
"country":"Namibia", | |
"money_format":"\u00a4\u00a0#,##0.00", | |
"datetime_format":"y-MM-dd h:mm a" |
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
#!/bin/bash | |
start=`date +%s` | |
LOCAL_USER="root" | |
LOCAL_PASS="xxxxxx" | |
REMOTE_HOST="[email protected]" | |
LOCAL_DB="xxxxxx" | |
REMOTE_DB="xxxxxx" |
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
# cfg.py START | |
""" Configuration File """ | |
xenConfigBackupDir = '/etc/xen/vds/backup' | |
xenConfigDir = '/etc/xen/vds/' | |
xenImageDir = '/srv/xen/domains/' | |
backupTmpTarget = '/opt/scripts/xenbackup/backup/' | |
backupFinTarget = '/srv/xen/backup_xen' | |
backupDiskTarget = '/mnt/usbdisk' | |
# cfg.py END |
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
import fnmatch, os | |
def bytesto(bytes, to, bsize=1024): | |
"""convert bytes to megabytes, etc. | |
sample code: | |
print('mb= ' + str(bytesto(314575262000000, 'm'))) | |
sample output: | |
mb= 300002347.946 | |
""" |