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 | |
$userAgent = new Zend_Http_UserAgent(); | |
$device = $userAgent->getDevice(); | |
$browser = $device->getBrowser(); | |
if ($browser == "Internet Explorer") { | |
header("Content-Type: application/force-download"); | |
} |
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
#!/usr/bin/perl -w | |
use strict; | |
### Begin | |
my $file = shift; | |
open (XML, "</home/scripts/cod/" . $file . ".xml") || die($!); | |
open (TSV, ">/home/scripts/cod/" . $file . ".tsv") || die($!); |
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 | |
$salt = "thesaltvalue"; | |
if (isset($_POST["rfid_data"]) && isset($_POST["rfid_user"]) | |
&& $_POST["rfid_key"] == md5($_POST["rfid_user"].$_POST["rfid_data"].$salt)){ | |
$message = "RFID Data"."\n"; | |
$message .= $_POST["rfid_data"]."\n"; | |
$message .= "User ------------------------------"."\n"; |
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
USE magentositedb; | |
TRUNCATE `magento_dataflow_batch_export`; | |
TRUNCATE `magento_dataflow_batch_import`; | |
TRUNCATE `magento_log_customer`; | |
TRUNCATE `magento_log_quote`; | |
TRUNCATE `magento_log_summary`; | |
TRUNCATE `magento_log_summary_type`; | |
TRUNCATE `magento_log_url`; | |
TRUNCATE `magento_log_url_info`; |
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/sh | |
bkpdate=`/bin/date +%Y%m%d-%H` | |
/usr/bin/mysqldump --user=root --password=yourpass --lock-tables=false --databases list_dbs_here > /databases/backup-${bkpdate}.sql | |
/usr/bin/zip /databases/backup-${bkpdate}.zip /databases/backup-${bkpdate}.sql | |
for file in "$( /usr/bin/find /databases -type f -mtime +2 )" | |
do | |
/bin/rm -f $file |
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 | |
# Patch apllying tool template | |
# v0.1.2 | |
# (c) Copyright 2013. Magento Inc. | |
# | |
# DO NOT CHANGE ANY LINE IN THIS FILE. | |
# 1. Check required system tools | |
_check_installed_tools() { | |
local missed="" |
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
# on command line: | |
ssh-keygen -t 'rsa' | |
ssh-keygen -t 'dsa' | |
ssh-keygen -t 'ecdsa' | |
#When asked to set path use the following for each corresponding key type and overwrite when asked: | |
/etc/ssh/ssh_host_rsa_key | |
/etc/ssh/ssh_host_dsa_key |
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
diff --git app/code/core/Mage/Paypal/Model/Cart.php app/code/core/Mage/Paypal/Model/Cart.php | |
index 999d3b8..4d625ca 100644 | |
--- app/code/core/Mage/Paypal/Model/Cart.php | |
+++ app/code/core/Mage/Paypal/Model/Cart.php | |
@@ -281,9 +281,11 @@ class Mage_Paypal_Model_Cart | |
// regular items from the sales entity | |
$this->_items = array(); | |
+ $excludeTaxSum = 0; | |
foreach ($this->_salesEntity->getAllItems() as $item) { |
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 | |
define('_JEXEC', 1); | |
define('DS', DIRECTORY_SEPARATOR); | |
if (file_exists(dirname(__FILE__) . '/defines.php')) { | |
include_once dirname(__FILE__) . '/defines.php'; | |
} | |
if (!defined('_JDEFINES')) { |