Skip to content

Instantly share code, notes, and snippets.

Avatar

Guillermo Esteves gesteves

View GitHub Profile
@gesteves
gesteves / gist:1051628
Created Jun 28, 2011
Google Apps script to export Google Talk chat logs to a Google Docs spreadsheet
View gist:1051628
/*
Quick instructions:
1. Go to Google Docs and open a new spreadsheet.
2. Go to Tools > Script editor...
3. Delete everything, paste this code in the script editor, and save it.
4. Go back to the spreadsheet, Tools > Script manager...
5. Select getChats, and press the "run" button.
6. It'll ask for a bunch of authorizations. Grant them.
7. When it says "now you can run the script", repeat step 5.
@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 / 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 / SassMeister-input.scss
Created Jan 27, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@import 'compass';
// Magic parallax mixins
$parallax-perspective : 1 !default;
@gesteves
gesteves / SassMeister-input.scss
Created Oct 31, 2013
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$color: blue;
body {
color: lighten($color, 20%);
}
@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)
View gist:4559967
[2013-01-17 16:27:11] ./installer -a /Users/gesteves/.rvm/rubies/ree-1.8.7-2012.02 --no-tcmalloc --dont-install-useful-gems --no-dev-docs
current path: /Users/gesteves/.rvm/src/ree-1.8.7-2012.02
command(6): ./installer -a /Users/gesteves/.rvm/rubies/ree-1.8.7-2012.02 --no-tcmalloc --dont-install-useful-gems --no-dev-docs
Welcome to the Ruby Enterprise Edition installer
This installer will help you install Ruby Enterprise Edition 1.8.7-2012.02.
Don't worry, none of your system files will be touched if you don't want them
to, so there is no risk that things will screw up.
You can expect this from the installation process:
You can’t perform that action at this time.