Skip to content

Instantly share code, notes, and snippets.

View gabrielso's full-sized avatar

Gabriel Oliveira gabrielso

  • Booking.com
  • Amsterdam, Netherlands
  • 23:29 (UTC +02:00)
  • X @gabaiel
View GitHub Profile
@gabrielso
gabrielso / index.css
Created September 18, 2012 19:30
Box in brackets border
* { /* optional, must subtract .border width by his own border-width if absent */
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.border {
background: transparent;
border-right: 80px solid black;
border-left: 80px solid black;
@gabrielso
gabrielso / .vimrc
Created September 14, 2012 20:55
My vimrc, no plugins at all :)
" Use Vim settings, rather than Vi settings
set nocompatible
" Read file when modified outside Vim
set autoread
" Do not keep any history
set viminfo='0,:0,<0,@0,f0
set nobackup
set nowb
@gabrielso
gabrielso / gist:2705638
Created May 15, 2012 22:32
Responsive is in the CSS
<!-- The actual proposed solutions are, in my opinion, an abstraction of the abstract form (since the img tag is basically an object tag) with all its limitations and fragilities -->
<object data="file-name.jpg" id="image-as-object" type="image/jpg" width="180" height="120"></object>
<!-- Let's imagine responsive images as a step back, then a step further: (pseudo-code) -->
<object id="responsive-image-as-object" type="image/jpg;responsive">
<param media="max-width:240px" data="really-small.jpg" width="24" height="16">
<param media="(mix-width:241px) and (max-width:360px)" data="small.jpg" width="60" height="46">
</object>
<!-- Quite familiar, super standard BUT... -->
@gabrielso
gabrielso / gist:1565914
Created January 5, 2012 16:10
git hist
Coloque isso em seu ~/.gitconfig:
[alias]
hist = log --pretty=format:\"%h %ad | %s%d [%an]\"
depois é só usar:
$> git hist -10
-- mostra os últimos 10 commits formatado "bunitinho"
@gabrielso
gabrielso / gist:965384
Created May 10, 2011 21:06
Reset FF form buttons extra padding and border
/* Reset FF form buttons extra padding and border */
button::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="file"] > input[type="button"]::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner {
border: 0;
padding: 0;
}