magento api debug

ob_start();
Mage::run($mageRunCode, $mageRunType);

if(preg_match('/api/', $_SERVER['REQUEST_URI'])) {
        Mage::log('<<< request '.$_SERVER['REQUEST_METHOD'].': '.$_SERVER['REQUEST_URI'], null, 'api.log');
        if($_SERVER['REQUEST_METHOD'] == 'POST') {
                Mage::log('<<< '.file_get_contents('php://input'), null, 'api.log');
        }
        Mage::log('>>> '.ob_get_contents(), null, 'api.log');
}

ob_end_flush();

 

http://stackoverflow.com/questions/12084772/magento-api-logs

SATA Direct Local Disk Access on Xenserver

ACTION=="add", KERNEL=="sdb", SYMLINK+="xapi/block/%k", RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'"
ACTION=="remove", KERNEL=="sdb", RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'"

http://techblog.conglomer.net/sata-direct-local-disk-access-on-xenserver/

How to delete all email From: a domain or one email address

To delete all email in the queue from a domain run this command as root:

postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } /@example\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –

To delete all email in the queue From: a specific email address run this command as root:

postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } /username@example\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –

 

http://www.emailquestions.com/threads/how-to-delete-all-email-from-a-domain-or-one-email-address.9369/