Skip to content

Instantly share code, notes, and snippets.

View atannus's full-sized avatar

André Tannús atannus

  • Epungo
  • São Paulo - Brasil
View GitHub Profile
// Revela todas as máscaras.
function revealMasks(event) {
event.stopPropagation();
event.preventDefault();
if( typeof dataLayer !== 'undefined') {
dataLayer.push({'event': 'RevealMask'})
dataLayer.push({'ListingPageType': 'conversion'});
dataLayer.push({'event': 'PageTypeChange'})
}
$('.contactMask').fadeOut();
@atannus
atannus / python-operator-overload.py
Last active February 14, 2019 02:36
Python Operator Overload
#!/usr/bin/env python
""" A simple example of overloading the plus operator.
Instances are created by passing a notation consisting of a numerical value followed by one of the supported
dimensions (m, cm, mm) separated by a single space.
Adding two values initialized with different dimensions returns an object with the dimension of the first value.
Example:
@atannus
atannus / gulp-cl-family.js
Last active June 21, 2020 13:57
Basic Gulp Setup for Closure Family: Library + Compiler + Stylesheets + Templates
/**
* This is a minimal working setup for using Google Closure Tools.
*
* One thing I've used extensivelly that is not covered here is support for
* i18n, which would require generating a messages file, translating it and
* passing it into the js compilation step.
*
* Also not covered is CSS minification, but you can (probably) just enable
* that by passing the appropriate flag in the compile-css step.
*