Skip to content

Instantly share code, notes, and snippets.

View afgomez's full-sized avatar
♻️

Alejandro Fernández Gómez afgomez

♻️
View GitHub Profile
@ramonvictor
ramonvictor / wait-function.js
Created April 23, 2016 16:05
Fancy setTimeout wrapper using native Promise.
var wait = function(ms) {
ms = ms || 500;
return new Promise(function(resolve, reject){
window.setTimeout(function() {
resolve();
}, ms);
});
};
// USAGE
@afgomez
afgomez / lets.sh
Last active February 12, 2017 08:24
Simple productivity booster
#!/bin/bash
# lets. A productivity booster
# Based on ideas from https://gist.github.com/605292
#
# Create a /etc/hosts.work with a list of sites you wanna block and execute
#
# $ sudo lets work
#
# When you finish your hard work, unblock the sites writing
@evocateur
evocateur / fixconsolas
Created March 15, 2009 00:15
Fix Consolas's line-height on OS X
#!/bin/bash
#
# Requires ftxdumperfuser from http://developer.apple.com/textfonts/download/
#
# Usage: fixconsolas [files ...]
# When called with no arguments, it attempts to operate on every TrueType
# file in the current directory.
#
# References:
# http://bandes-storch.net/blog/2008/12/21/consolas-controlled/#comment-2042