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
mongoexport --port _PORT_ --csv --username oppa --password _PASSWORD_ --collection _COLLECTION_ --db _DB_ --fields create_at,email,subject,body,order --forceTableScan --out /tmp/emails.csv |
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
select @order_id:=entity_id from sales_flat_order where increment_id='100000001'; delete from sales_flat_order_grid where entity_id=@order_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
UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin'; | |
/* | |
keep qX or another else, if you change qX set in all parameters, only qX | |
you can use user_id too */ |
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
tell application "Finder" | |
set theItems to selection | |
repeat with _a from 1 to (count of theItems) | |
set theItem to (item _a of theItems) as alias | |
set itemPath to quoted form of (POSIX path of theItem) | |
set fileName to name of theItem | |
set theFolder to POSIX path of (container of theItem as alias) | |
set zipFile to quoted form of (theFolder & fileName & ".zip") | |
do shell script "zip -rj --password YOURPASSWORD " & zipFile & " " & itemPath | |
end repeat |
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
.*[\/]URL_KEY[\/|\?|]?[^A-Za-z^|^\-|^0-9^] | |
example: | |
.*[\/]cadeira-vermelha-damasco[\/|\?|]?[^A-Za-z^|^\-|^0-9^] |
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
#user_config_min_qty - checkbox enable/disable | |
update cataloginventory_stock_item set min_qty = QTY,use_config_min_qty = 0 where item_id = PRODUCT_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
import sys | |
import time | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
from PyQt4.QtWebKit import * | |
class Screenshot(QWebView): | |
def __init__(self): | |
self.app = QApplication(sys.argv) | |
QWebView.__init__(self) |
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
Script para a instalação do Meld e configuração do git diff | |
#!/bin/bash | |
echo "Installing meld..." | |
apt-get install meld -y -qq | |
echo "Meld [OK]" | |
echo "Creating meld custom script..." | |
rm ~/.config/git_meld_diff.sh |
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
To set virtual machine memory size use: | |
config.vm.customize ["modifyvm", :id, "--memory", 2048] | |
To set virtual machine CPU's count use: | |
config.vm.customize ["modifyvm", :id, "--cpus", 2] | |
or to set half of available CPU's count: | |
config.vm.customize ["modifyvm", :id, "--cpus", `awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' `.chomp ] |
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 | |
//date_default_timezone_set("Europe/Madrid"); | |
echo "Start Cleaning all caches at ... " . date("Y-m-d H:i:s") . "\n\n"; | |
ini_set("display_errors", 1); | |
require '../app/Mage.php'; | |
Mage::app('admin')->setUseSessionInUrl(false); | |
Mage::getConfig()->init(); | |
$types = Mage::app()->getCacheInstance()->getTypes(); |
OlderNewer