Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
# | |
# script by israelguido@gmail.com | |
# | |
echo "Digite seu dns"; | |
read host; | |
echo "Digite seu user"; | |
read user; | |
echo "Digite seu pass"; | |
stty -echo |
if ( jQuery('.product-desc').length > 0 ) { | |
jQuery(function(){ | |
jQuery('.product-desc').each(function(){ | |
if ( jQuery(this).find(".prod-desc-tipo:contains('Grãos')").length > 0 ) { | |
jQuery(this).find('.icon').addClass('icon1'); | |
} | |
else if ( jQuery(this).find(".prod-desc-tipo:contains('Cápsula')").length > 0 ) { | |
jQuery(this).find('.icon').addClass('icon2'); | |
} |
jQuery(window).load(function(){ | |
/* Começa quando se clica em qualquer seta (cima e baixo) */ | |
jQuery('.qty_control').click(function(){ | |
// Quantidade no input | |
var quant = jQuery('.qty').val(); | |
// Pega o preço (exemplo: 12.00) | |
var total = <?php echo $_product->getPrice(); ?>; |
<IfModule mod_deflate.c> | |
# Insert filter on all content | |
SetOutputFilter DEFLATE | |
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary | |
FileETag none | |
#php_flag zlib.output_compression On | |
# Make sure proxies don't deliver the wrong content |
Get Url in phtml files | |
1. Get Base Url : | |
Mage::getBaseUrl(); | |
2. Get Skin Url : | |
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); |
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
<?php | |
date_default_timezone_set('America/Sao_Paulo'); | |
class Deploy { | |
public $post_deploy; | |
private $_log = 'var/log/deployments.log'; | |
private $_date_format = 'Y-m-d H:i:sP'; | |
private $_branch = 'develop'; |
#################################################################### | |
################## Creare's Magento .htaccess File ################# | |
#################################################################### | |
##### Block unwanted Bots that clog the server ##### | |
RewriteCond %{HTTP_USER_AGENT} MJ12bot | |
RewriteRule .* - [F] | |
RewriteCond %{HTTP_USER_AGENT} 80legs [NC] | |
RewriteRule ^ - [F] |