Skip to content

Instantly share code, notes, and snippets.

Avatar

Guillermo Esteves gesteves

View GitHub Profile
@gesteves
gesteves / nix_utms.js
Created May 27, 2017
Remove UTM parameters from URL after Google Analytics hit
View nix_utms.js
(function() {
var w = window;
var removeUtms = function () {
var location = w.location;
if (location.search.indexOf('utm_') !== -1 && history.replaceState) {
history.replaceState({}, '', window.location.toString().replace(/(\&|\?)utm([_a-z0-9=\.]+)/g, ''));
}
};
ga('send', 'pageview', { 'hitCallback': removeUtms });
})();
@gesteves
gesteves / instructions.md
Last active Apr 28, 2017
Ad loading & analytics exercise
View instructions.md

Ad Loading & Analytics Tracker

Hello, and welcome to the technical portion of your interview. Try to complete as much of this exercise as you can before our call, and feel free to use any editors, tools, frameworks, libraries or resources you wish (be prepared to explain why you're using them, though!). We're not looking for a perfect, or even complete, solution; the idea is to have a conversation about how you approached the problem and walk us through your implementation, so please work in whatever environment you feel comfortable using.

The exercise consists in writing a JavaScript system that:

  • Lazy-loads each ad as its container enters the viewport, and
  • Reports stats about the user's visit back to the server
@gesteves
gesteves / SassMeister-input.scss
Created Jan 5, 2016
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.3.2)
// ----
@function linear-gradient($parameters...) {
$return: linear-gradient;
@each $parameter in $parameters {
$return: append($return,$parameter, comma);
}
@return $return;
@gesteves
gesteves / SassMeister-input.scss
Created Jan 5, 2016
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.3.2)
// ----
@function linear-gradient($parameters...) {
$return: linear-gradient;
@each $parameter in $parameters {
$return: append($return,$parameter, comma);
}
@return $return;
@gesteves
gesteves / github_org_stats.rb
Created Dec 12, 2015
Prints commit/additions/deletions for each non-fork repo in a given Github organization for this year
View github_org_stats.rb
require 'octokit'
class Github
def initialize(access_token)
Octokit.auto_paginate = true
@client = Octokit::Client.new(access_token: access_token)
end
def get_org_stats(org)
repos = @client.org_repos(org)
@gesteves
gesteves / gist:4da1c4a98b756d84ed29
Last active Sep 28, 2019
How to install Thumbor
View gist:4da1c4a98b756d84ed29
# First, install all of the things
apt-get update
apt-get install nginx
/etc/init.d/nginx start
apt-get install python-dev
apt-get install python-pip
apt-get install libjpeg-dev libpng-dev libtiff-dev libjasper-dev libgtk2.0-dev python-numpy python-pycurl libwebp-dev python-opencv libjpeg-progs
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
pip install pillow
@gesteves
gesteves / SassMeister-input.scss
Created Mar 6, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
.m-signin__logo {
$delays: ();
@for $i from 7 through 14 {
$selector: "& .shape-#{$i}";
$delay: ($selector: 0.1s + ($i - 7s)/10);
@gesteves
gesteves / SassMeister-input.scss
Created Jan 12, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
$m : '.m-foo';
// Currently
#{$m} {
View keybase.md

Keybase proof

I hereby claim:

  • I am gesteves on github.
  • I am gesteves (https://keybase.io/gesteves) on keybase.
  • I have a public key whose fingerprint is 9BEC 11D8 E1F4 DE9B 806C EF53 D002 E8E0 DE46 D43F

To claim this, I am signing this object:

@gesteves
gesteves / SassMeister-input.scss
Created Feb 26, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// ----
@import "compass/reset";
// csshake code starts here
@mixin shake($x, $y, $rot, $name, $steps:10, $opacity:false) {
You can’t perform that action at this time.