Toran Proxy how to!
Apply the snippet :
, array(
'csrf_protection' => false,
)
<?php | |
/** Configuration **/ | |
ini_set('display_errors', 1); | |
ini_set('error_reporting', E_ALL); | |
ini_set('max_execution_time', 24*3600); // 1800 secondes = 30 minutes | |
ini_set('memory_limit', '4096M'); | |
/** Set $path with the path of your Magento install **/ | |
$path = realpath(dirname(__FILE__) . '/../../'); | |
set_include_path(get_include_path() . PATH_SEPARATOR . $path); |
<?php | |
// @author : https://gist.github.com/mehdichaouch | |
/** BEGIN DEV ****************************/ | |
try { | |
$clientIp = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : ''; | |
$teamIp = array( | |
'10.71.3.17', //mehcha | |
'YOUR IP', |
<?php | |
function convert($size) | |
{ | |
$unit=array('b','kb','mb','gb','tb','pb'); | |
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]; | |
} | |
convert(memory_get_usage()); |
#!/bin/bash | |
############################### | |
### Magento Permissions | |
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod o+w var var/.htaccess includes includes/config.php app/etc && chmod 550 pear && sudo find *.sh -type f -exec chmod 755 {} \; | |
rm -rf var/cache/* | |
rm -rf var/session/* |
#!/bin/bash | |
# https://gist.github.com/mardix/3623562 | |
while read -r file; | |
do | |
if [[ $file = *.php ]]; | |
then | |
php-cs-fixer fix "$file" --level=psr2 | |
git add "$file" |
<?php | |
/** | |
* Mum ! I want complex cookie | |
*/ | |
class Bonne_Maman_Helper_Data extends Mage_Core_Helper_Abstract | |
{ | |
private static $secret = 'What is the answer to Life, the Universe, and Everything'; // Can be also a in conf |
#!/bin/sh | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
# Set description with : git branch --edit-description $(git symbolic-ref --short HEAD) | |
BRANCH_DESCRIPTION=$(git config branch."$BRANCH_NAME".description) | |
STORY_NUMBER=$(echo $BRANCH_NAME | sed -n 's/\(\(MAG\|SUP\)-[0-9]*\).*/\1/p') | |
if [ -n "$STORY_NUMBER" ]; then | |
sed -i.back "1s/^/$STORY_NUMBER : \n/" "$1" |
Apply the snippet :
, array(
'csrf_protection' => false,
)
#!/bin/bash | |
timestamp=`date +"%Y%m%d-%H%M%S"` | |
current_dir=$(pwd) | |
script_dir=$(cd "$(dirname "$0")"; pwd) | |
project_dir="$script_dir/../../" | |
current_date=$(date +%Y%m%d-%H%M%S) | |
echo "Moves of caches and log in project/var/* (like SF3 new structure)" |