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
@isaumya
isaumya / cf_cache_rules_implementation_guide_spcc.md
Last active September 20, 2024 05:08
Super Page Cache for Cloudflare — Guide for using Remove Cache Buster Query Parameter feature (when using Cache Everything page rule)

Implementation Guide for using "Remove Cache Buster Query Parameter" feature

The Super Page Cache for Cloudflare plugin has recently added the feature for using the Cache Everything pagerule withing the ?swcfpc=1 cache buster query paramater. This opens up so many new doors where users previously had to use the Cloudflare Workers to remove the cache buster.

With this new option now users are able to take advantage of Cloudflare Cache Everything page rule and take it to the next level by using the new Rulesets released by Cloudflare. Basically this is achived by taking advantage of the all new Cache Rules feature implemented by Cloudflare.


Setp 1 — Setting up the Cache Rules inside your Cloudflare Dashboard

The first thing that you need to do is, log-in to your Cloudflare Dahsbord and go to the domain/zone doe which you are setting up the [Super Page Cache for Cloudflare](https://wordpress.org/plug

@giovanni-d
giovanni-d / allinonemigration.md
Last active September 7, 2024 12:30
All-in-One WP Migration - Restore From Server (without PRO version) - Restore

All-in-One WP Migration Restore From Server (without pro version)

If you don't want to pay for the PRO version of this plugin, and you want to use the "Restore from Server" functionally that was present in the version 6.77, follow the instructions below:

  1. Open the js file: wp-content/plugins/all-in-one-wp-migration/lib/view/assets/javascript/backups.min.js
  2. On line 1208, replace the code below:
$('.ai1wm-backup-restore').click(function (e) {
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active September 21, 2024 20:50
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@joyrexus
joyrexus / README.md
Last active September 16, 2024 18:48 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
<?php
/**
* Calculate your age
*
* @param DateTime $birthday Your birthday
*
* @return int
*/
function calculateAge(DateTime $birthday) {
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@danilowm
danilowm / gist:1058595
Created July 1, 2011 14:00
Lista de Estados Brasileiros
<select name="txt_estado" id="txt_estado">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="GO">Goiás</option>
<option value="ES">Espírito Santo</option>