This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 - Declarar o banner no topo do site, com "defineSlot", indicando o ID "publicidade-ancorads" onde o criativo vai ser renderizado. | |
2 - Colocar o codigo abaixo em qualquer lugar dentro do Body, preferencialmente no final. | |
<style type="text/css"> | |
.ads-ancorads > div{display:inline-block;position:relative;border:3px solid #fff}.ads-ancorads{z-index:1!important;position:fixed;width:100%;left:0;bottom:0;text-align:center;line-height:0}.ads-ancorads .ads-bt-cont .ads-bt{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAALNJREFUOI3N0ltqQjEUheFPi09ORIujkCKI91Lp5AUvg/ByLJy+JBgkOfokLtiQkPWvHZLNO2mAA6YNnm/s0c8dHlDjgkXm/AfX4NnkApaogqEK3aLWCXzGuHTFWbhBHYA1fhP4hFEJjpqELjX+QtU44usRHDVOQiI8zBnbhYAOWsn+A91nu8/d3uFyt2764iw8D1V5IiQHRy3uQia5gH0BjkrnJDtIn9gV4KgVtug1eF6sf1DSP/zNTb8tAAAAAElFTkSuQmCC);width:30px;height:30px;border:7px solid #fff;border-radius:10px 10px 0 0px;display:block;background-color:#fff;position:absolute;left:-30px;top |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
googletag.cmd.push(function(){ | |
window.slots_refresh = {}; | |
var refresh_interval = 5; | |
googletag.pubads().addEventListener('slotRenderEnded', function(event) { | |
console.warn('slotRenderEnded', event.slot.getSlotElementId()); | |
slots_refresh[event.slot.getSlotElementId()] = {'slot': event.slot}; | |
}); | |
googletag.pubads().addEventListener('slotVisibilityChanged', function(event) { | |
slots_refresh[event.slot.getSlotElementId()].inViewPercentage = event.inViewPercentage; | |
var slot = slots_refresh[event.slot.getSlotElementId()]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Checks if the A0 format can be formed | |
using other A formats, passed by parameter | |
Open on gist: https://gist.github.com/rockviana/8c33eb873b2ca6efbbfb69bf468aa182 | |
""" | |
class A0Paper: | |
def buildA(self, qtde, indice): | |
return qtde * 1 / 2**indice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Como Executar: | |
Salve o arquivo e execute como no exemplo abaixo, passando o identificador do entregador como parametro "-e": | |
python .\delivery.py -e Moto 1 | |
Caso não seja informado o Id do entregador, todos serão listados. | |
""" | |
import sys | |
import locale |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node.prototype.loads = function(url, selector){ | |
var _this = this; | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", url, true); | |
xhr.overrideMimeType('text/xml; charset=' + document.characterSet); | |
xhr.onreadystatechange = function(){ | |
if(xhr.readyState == 4 && xhr.status == 200){ | |
var htmlnode = document.createElement('div') | |
htmlnode.innerHTML = xhr.responseText | |
htmlnode = selector?htmlnode.querySelector(selector):htmlnode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
lazytag.cmd.push = function(){ | |
Array.prototype.push.apply(this, arguments); | |
process_cmd(); | |
} | |
var cmd = lazytag.cmd, | |
targets = [], | |
lastscroll, | |
length = 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import time | |
import requests | |
import pprint | |
print('Buscando cupons...') | |
def getpage(urls, base='http://www.rappibusiness.com'): | |
if not isinstance(urls, list): | |
urls = [urls] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
lazytag.cmd.push = function(){ | |
Array.prototype.push.apply(this, arguments); | |
process_cmd(); | |
} | |
var cmd = lazytag.cmd, | |
targets = [], | |
lastscroll, | |
length = 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[document.body.addEventListener,clickevent] = document.body.addEventListener?[document.body.addEventListener,'click']:[window.attachEvent,'onclick']; | |
document.body.addEventListener(clickevent, function(e){ | |
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; | |
if(e.target.dataset.ga){ | |
ga('send', 'event', {eventCategory: document.title, eventAction: e.target.dataset.ga, eventLabel: e.target.title || e.target.innerHTML}); | |
} | |
}); |
NewerOlder