Skip to content

Instantly share code, notes, and snippets.

View danilowm's full-sized avatar
🍻
Cheers

Danilo Iannone danilowm

🍻
Cheers
View GitHub Profile
@danilowm
danilowm / gist:54099406f417ff877c61c88167a424d9
Created December 7, 2022 20:06
Facebook Pixel - Só Compras Verdadeiras
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){
if(f.fbq)return;
n= f.fbq = function(){
if (arguments[1] === "Purchase" && typeof arguments[2].order_id === "undefined") return;
n.callMethod ? n.callMethod.apply(n,arguments) : n.queue.push(arguments)
};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
@danilowm
danilowm / gist:b680a58c0f603ca6dbf309b39723b732
Created December 7, 2022 20:01
YAMP - Aprovação automática (PIX e Cartão)
:root {
--background-cartao-pix: #36b376; /* cor de fundo do item cartão e pix */
--letras-cartao-pix: #fff; /* cor da letra do cartão e pix */
--background-boleto: #a2a2a2; /* cor de fundo do item boleto */
--letras-boleto: #fff; /* cor da letra do boleto */
}
.payments .payment.credit-card,.payments .payment.pix{border-color:var(--background-cartao-pix)!important}.payments .payment.billet{border-color:var(--background-boleto)!important}.payments .payment>label{position:relative;display:flex}.payments .payment>label[for=payment-billet]:after{background:var(--background-boleto)!important;display:block;line-height:inherit;color:var(--letras-boleto)!important;padding:4px 5px;border-radius:3px;position:absolute;font-weight:700;font-size:10px;right:10px;letter-spacing:.03em;top:1%;content:'APROVAÇÃO EM 3 DIAS'}.payments .payment>label[for=payment-credit-card]:after,.payments .payment>label[for=payment-pix]:after{background:var(--background-cartao-pix)!important;display:block;line-height:inherit;color:va
// COLOCA O ID DO FORM
$('form#id_do_contact_form7').on('submit', function(){
// COLOCA O ID DO SELECTBOX
var select = $("#elementId :selected").val();
if (select == 'data1') {
window.location.href = "http://mufasa.com.br";
} else {
window.location.href = "http://mufasa.agency";
}
});
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-50120344-50"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-50120344-50');
</script>
@danilowm
danilowm / gist:55f9577c060f6db08373
Created August 14, 2015 14:50
Acentuação em arquivos de mídia
convmv -r -i -f utf8 -t utf8 --nfc --notest .
@danilowm
danilowm / gist:bb6f216dd018ae68a803
Created May 13, 2014 13:16
web.config wordpress em hospedagem Windows
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
@danilowm
danilowm / gist:5396284
Last active December 16, 2015 07:08
Placeholder do HTML5 nos IEs
$(function(){
$('input[placeholder], textarea[placeholder]').each(function(){
var ph = $(this).attr('placeholder');
$(this).val(ph).focus(function(){
if( $(this).val() == ph ) $(this).val('')
})
.blur(function(){
if( !$(this).val() ) $(this).val(ph)
})
});
@danilowm
danilowm / gist:5204702
Created March 20, 2013 13:40
CSS Mini Reset
/* CSS Mini Reset */
* {margin: 0;padding: 0;}
table { border-collapse: collapse;border-spacing: 0;}
th, td {text-align: left;vertical-align: top;}
h1, h2, h3, h4, h5, h6, th, td, caption {font-weight:normal;}
img, button {border: 0;}
.clear { clear:both; }
.left { float:left; }
.right { float:right; }
/* animação */
@danilowm
danilowm / gist:4017459
Created November 5, 2012 14:30
Limpar cache de URL no Facebook
<meta property="og:title" content="Titulo do Post" />
<meta property="og:description" content="Descrição do Post" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://meusite.com.br" />
<meta property="og:image" content="logo_do_site.png" />
<meta property="og:site_name" content="Meu Site" />
@danilowm
danilowm / gist:3918229
Created October 19, 2012 13:29
Busca no MySQL utilizando LIKE
SELECT * FROM artigos WHERE texto LIKE '%lorem'