Skip to content

Instantly share code, notes, and snippets.

View gesteves's full-sized avatar

Guillermo Esteves gesteves

View GitHub Profile
@gesteves
gesteves / nix_utms.js
Created May 27, 2017 16:56
Remove UTM parameters from URL after Google Analytics hit
(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 October 15, 2021 01:11
Ad loading & analytics exercise

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 January 5, 2016 20:24
Generated by SassMeister.com.
// ----
// 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 January 5, 2016 20:23
Generated by SassMeister.com.
// ----
// 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 December 12, 2015 03:22
Prints commit/additions/deletions for each non-fork repo in a given Github organization for this year
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 October 15, 2021 01:09
How to install Thumbor
# 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 March 6, 2015 13:43
Generated by SassMeister.com.
// ----
// 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 January 12, 2015 21:02
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
$m : '.m-foo';
// Currently
#{$m} {

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 February 26, 2014 14:04
Generated by SassMeister.com.
// ----
// 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) {