Skip to content

Instantly share code, notes, and snippets.

View scottbaron's full-sized avatar

scott baron scottbaron

  • self-employed
  • Israel
View GitHub Profile
@scottbaron
scottbaron / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@scottbaron
scottbaron / cf()
Created April 14, 2015 17:03
ClearFix - for mixins
cf ()
zoom 1
&:after
&:before
content ""
display table
&:after
clear both
@scottbaron
scottbaron / GTK+3 failure
Created June 5, 2015 19:55
MacOS 10.6.8 Attempt to install Zathura with brew fails on dependency gtk+3
➜ ~ brew update
Updated Homebrew from bdebf676 to 8de850aa.
==> Updated Formulae
qpdf
➜ ~ brew gist-logs gtk+3
https://gist.github.com/b21989d6283038a61d45
➜ ~ brew install gtk+3
==> Downloading https://download.gnome.org/sources/gtk+/3.16/gtk+-3.16.3.tar.xz
Already downloaded: /Library/Caches/Homebrew/gtk+3-3.16.3.tar.xz
==> ./configure --prefix=/usr/local/Cellar/gtk+3/3.16.3 --disable-glibtest --enable-
@scottbaron
scottbaron / CSS Fixes
Created June 7, 2015 20:42
Clear Fix Hack
/**
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.cf:before,
@scottbaron
scottbaron / OL Numbering
Created June 7, 2015 20:44
Styling ordered list numbers
ol { counter-reset:li; /* Initiate a counter */ margin-left:0; /* Remove the default left margin */ padding-left:0; /* Remove the default left padding */}ol > li { position:relative; /* Create a positioning context */ margin:0 0 6px 2em; /* Give each list item a left margin to make room for the numbers */ padding:4px 8px; /* Add some spacing around the content */ list-style:none; /* Disable the normal item numbering */ border-top:2px solid #666; background:#f6f6f6;}ol > li:before { content:counter(li); /* Use the counter as content */ counter-increment:li; /* Increment the counter by 1 */ /* Position and style the number */ position:absolute; top:-2px; left:-2em; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; box-sizing:border-box; width:2em; /* Some space between the number and the content in browsers that support generated content but not positioning it (Camino 2 is one example) */ margin-right:8px; padding:4px; border-to