Skip to content

Instantly share code, notes, and snippets.

View williangringo's full-sized avatar

Willian Rodrigues williangringo

View GitHub Profile
@williangringo
williangringo / gist:818553ff92444f2f75fb
Created December 16, 2015 16:55 — forked from stephenmckinney/gist:2160434
Getting smush.py up on Ubuntu and compiling and patching pngnq
# install libs
sudo apt-get install gifsicle
sudo apt-get install imagemagick
sudo apt-get install pngcrush
sudo apt-get install libjpeg-progs
sudo apt-get install pkg-config
sudo apt-get install libpng-dev
# get smush.py
cd /var/apps/macarthur_cms_env/bin/
map $http_host $magesite {
ShopEmMagento.com default; #Se a url for www.ShopEmMagento.com joga para default
ShopEmMagento2.com store2; #Se a url for www.ShopEmMagento2.com joga para store2
}
server {
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_param MAGE_RUN_CODE $magesite; #Aqui repassa para o Magento a loja
include fastcgi_params;
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
root@ip-10-253-143-111:/mnt/www/lojamodelo/shell# ./warm-cache.sh http://lojamodelo.inovarti.com.br/sitemap.xml
Getting URLs from sitemap...
Warming 130 URLs using 1 processes...
HTTP/1.1 200 1.05 secs: 12187 bytes ==> GET /women/new-arrivals.html
HTTP/1.1 200 1.10 secs: 12098 bytes ==> GET /women/tops-blouses.html
HTTP/1.1 200 0.90 secs: 11632 bytes ==> GET /women/pants-denim.html
HTTP/1.1 200 0.93 secs: 12415 bytes ==> GET /women/dresses-skirts.html
HTTP/1.1 200 1.13 secs: 12117 bytes ==> GET /men/new-arrivals.html
HTTP/1.1 200 0.92 secs: 11867 bytes ==> GET /men/shirts.html
HTTP/1.1 200 1.08 secs: 11365 bytes ==> GET /men/tees-knits-and-polos.html
<?php
// Change current directory to the directory of current script
chdir(dirname(__FILE__));
require '../app/Mage.php';
umask(0);