Skip to content

Instantly share code, notes, and snippets.

View vmattos's full-sized avatar

Vitor Mattos vmattos

  • OLX
  • Rio de Janeiro, Brazil
View GitHub Profile
@vmattos
vmattos / gist:7936534
Created December 12, 2013 22:14 — forked from oli/gist:1637874
# ~/.gitconfig from @boblet
# initially based on http://rails.wincent.com/wiki/Git_quickstart
[core]
excludesfile = /Users/oli/.gitignore
legacyheaders = false # >git 1.5
quotepath = false
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
pager = less -r
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX
@vmattos
vmattos / attachEvent-polyfill.js
Last active May 23, 2018 11:23
attachEvent polyfill I made for my buddy @leandrooriente, who is nuts about IE. Now you can enjoy your Micro$oft event handlers everywhere! I'm a douchebag.
(function(win){
if(win.attachEvent) return;
var attachEvent = function(on, callback) {
var on = on.substring(2,on.length);
return this.addEventListener(on, callback);
}
win.Element.prototype.attachEvent = attachEvent;