Skip to content

Instantly share code, notes, and snippets.

Ricardo Martins r-martins

Block or report user

Report or block r-martins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
r-martins / Data.php
Created Apr 30, 2020
Exemplo de uso de helpers em layout xml
View Data.php
* PagSeguro Transparente Magento
* Helper Class - responsible for helping on gathering config information
* @category RicardoMartins
* @package RicardoMartins_PagSeguro
* @author Ricardo Martins
* @copyright Copyright (c) 2015 Ricardo Martins (
* @license MIT License
View boacompra-authorization-prerequest-script.js
var secret = pm.variables.get("secret")
var merchant_id = pm.variables.get("store_id")
var Header = require('postman-collection').Header
var requestMethod = pm.request.method
// console.log(contentMd5)
r-martins /
Last active Jan 30, 2018 — forked from amura2406/
Steb-by-Step to Install Percona Server (Alternative to MySQL) on Mac OS X 10.11.6 (El Capitan)

Install percona-server.

Install from homebrew

brew install percona-server

Initialize the DB

unset TMPDIR
mysqld --initialize --datadir=/usr/local/var/mysql --user=<username> --port=3307 --general-log-file=/var/log/percona/percona-error.log
r-martins / magento-design-exception.txt
Created Oct 17, 2015
Magento Design Exception - Para Mobile
View magento-design-exception.txt
iP(hone|od)|(a|A)ndroid.*(m|M)(obile|ini)|(a|A)ndroid 3|BlackBerry|IEMobile|Windows Mobile|Windows Phone|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune|Googlebot-Mobile
r-martins / ec2-swap.txt
Created Dec 9, 2012
creating swap on amazon ec2 micro
View ec2-swap.txt
r-martins / xmllint.txt
Created Dec 5, 2012
Encontrando erros de formatação em XML's
View xmllint.txt
for file in `find . -name "*.xml"`; do xmllint --noout $file; done
fará uma busca por todos os arquivos xml recursivamente e mostrará se houver algum com erro de sintaxe, tags nao fechadas, etc
r-martins / hdmi.txt
Created Oct 21, 2012
Fazendo o audio sair no HDMI no Ubuntu
View hdmi.txt
speaker-test -c 2 -r 48000 -D hw:0,3
- pausar o teste com ctrl+c
- e depois o hdmi aparecera no treco de som
r-martins / utf-8 e bom.txt
Created Oct 8, 2012
Encontrando arquivos UTF-8 com BOM
View utf-8 e bom.txt
grep -rl $'\xEF\xBB\xBF' .
Mais info em
r-martins / ubuntu.txt
Created Oct 3, 2012
Resolvendo problema de Ç (cedilha) No Ubuntu
View ubuntu.txt
Alguns programas (que usam GTK) no Ubuntu nao funcionam a Ç cedilha com ' + c.
Pra resolver:
Problem with cedilla:
After many versions of Ubuntu assigning accented c (“ć”) instead of c with a cedilla (“ç”) when typing ‘ + c in deadkeys keyboard layouts, since Ubuntu 11.10 GTK changed the default in an U.S. English locale back to the cedilla. However, non-GTK applications (e.g., Skype) still have the old behavior. To fix them, edit as root the file /usr/share/X11/locale/en_US.UTF-8/Compose and change all instances of ć with ç, and all instances of Ć with Ç.
You might need to repeat this operation from time to time, when you upgrade your system and it takes the configuration files back to their original contents.
r-martins / magento.txt
Created Jul 4, 2012
Inserir bloco no magento via xml
View magento.txt
Primeiro devemos ter o text_list inserido em algum ponto-chave da pagina com o $this->getChildHtml()..
No XML ficaria assim:
<block type="core/text_list" name="before_main_div_end" as="before_main_div_end" translate="label">
<label>Fim do conteudo principal da pagina</label>
Depois é só inserir os phtml qdo necessário... Ex:
You can’t perform that action at this time.