Skip to content

Instantly share code, notes, and snippets.

View deivisonarthur's full-sized avatar

Deivison Arthur Lemos Serpa deivisonarthur

View GitHub Profile
<?php if (!strcmp ($cc_type, 'BOL_ITAU') || !strcmp ($cc_type, 'TEF_ITAU')): ?>
<form id="print-billet-form" method="get" target="_blank" action="https://shopline.itau.com.br/shopline/shopline.asp">
<?php
$sql = " SELECT acquirer_transaction_id FROM payment_return WHERE order_id = " . $_order->getId ();
$resource = Mage::getSingleton ('core/resource');
$connection = $resource->getConnection ('core_read');
$store = $connection->query ($sql);
$children = $store->fetchAll (PDO::FETCH_ASSOC);
?>
<input type="hidden" name="DC" value="?DC=<?=$children[0]['acquirer_transaction_id'];?>" />
# 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/
<?php
//Table names and table prefixes
$tableName = Mage::getSingleton('core/resource')
getTableName('catalog_product_entity');
// if prefix was 'mage_' then the below statement
// would print out mage_catalog_product_entity
echo $tableName;
//Accessing the database connection resource
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>Data feed Title</title>
<link>{base_url}</link>
<description>Data feed description.</description>
{each type="product"}
<item>
<g:id>{sku}</g:id>
<title><![CDATA[{name,[html_entity_decode]}]]></title>
<?php
/*
############### Exemplo do XML do Jacotei
Basta chamar o price com as funcões assim:
<parcelas>{price,[numerototalparcelas]}</parcelas>
<valor>{price,[valortotalparcelas]}</valor>
*/
<?php
/*
############### Exemplo do XML do Jacotei
Basta chamar o price com as funcões assim:
<parcelas>{price,[numerototalparcelas]}</parcelas>
<valor>{price,[valortotalparcelas]}</valor>
*/
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>Data feed Title</title>
<link>{base_url}</link>
<description>Data feed description.</description>
{each type="product"}
<item>
<g:id>{sku}</g:id>
<title><![CDATA[{name,[html_entity_decode]}]]></title>
rsync -avz /path/to/local/sync/folder -e "ssh -i /path/to/ssh/key" ubuntu@ec2instance:/path/to/remote/sync/folder
@deivisonarthur
deivisonarthur / sendy
Created May 14, 2013 14:46 — forked from anonymous/sendy
Ótimo sistema de envio de newsletter chamado Sendy e que utiliza o SES da AWS - Para comprar o sistema Sendy visite: http://sendy.co/?ref=V3Yxy - Edite: vim /etc/nginx/conf.d/sendy.pisosecarpetes.com.br.conf
#
# Nginx rewrite rules for Sendy (http://sendy.co)
# PHP-FPM
#
# http://sendy.co/forum/discussion/142/nginx-rewrite-rule
#
server {
listen 80;
/*desktop #############################################################################################*/
@media only screen and (min-width: 978px) and (max-width: 3879px) {
.smartphoneitem{
display: none !important;
}
}
/*tablet #############################################################################################*/
@media only screen and (min-width: 768px) and (max-width: 977px) {
.desktopitem{