Skip to content

Instantly share code, notes, and snippets.

View nonlinear's full-sized avatar

Nicholas Frota nonlinear

View GitHub Profile
@nonlinear
nonlinear / gist:3890373
Created October 15, 2012 01:25
SUBLIME: Keymap Cheatsheet
PALETTES | TOGGLES | SCREENS
⌘⇧P Command Palette | ⌃S Toggle Side Bar | ⌘⌥↑ One Screen
⌘P Open Anything Palette | ⌘/ Toggle Comment | ⌘⌥↓ Two Screens
⌘R Symbol Palette | ⌃I Reindent | ⌘⌥→ Two Screens, Large-Small
⌃space Gist Palette | ⌘⌃↑ Move Section Up | ⌘⌥← Two Screens, Small-Large
⌘⌃P Project Palette | ⌘⌃↓ Move Section Down | ⌃1,2 Focus Screens
⌥space Terminal Panel | | ⌥1,2 Move File to screens
@nonlinear
nonlinear / gist:3890464
Created October 15, 2012 02:01
CSS: reset CSS
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
@nonlinear
nonlinear / _mixins.scss
Last active October 11, 2015 16:58
SASS: _mixins.scss
DEPRECATED
check bettercanvas project, _mixins.scss at https://github.com/nonlinear/bettercanvas

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@nonlinear
nonlinear / twitter-bootstrap-ie6.scss
Created November 26, 2012 20:48 — forked from jpmckinney/twitter-bootstrap-ie6.scss
SCSS additions to make Twitter Bootstrap work in IE6
// Assumes you are using <html> conditional classes as described here:
// http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
.lt-ie7 {
// blockquote small:before{content:'\2014 \00A0';}
blockquote small:before{content:"";}
// [class*="span"]{display:inline;float:left;margin-left:20px;}
.span1{display:inline;float:left;margin-left:20px;}
.span2{display:inline;float:left;margin-left:20px;}
.span3{display:inline;float:left;margin-left:20px;}
.span4{display:inline;float:left;margin-left:20px;}
@nonlinear
nonlinear / gist:4381353
Created December 26, 2012 16:43
CSS: border-box
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
DEPRECATED: check bettercanvas _mixins.scss at https://github.com/nonlinear/bettercanvas
@nonlinear
nonlinear / gist:5271698
Created March 29, 2013 15:51
bootstrap: sample user typeahead
<input type="text" placeholder="Search for user" value="Abel Tuter" data-provide="typeahead" data-source="[&quot;Abel Tuter&quot;,&quot;Adela Cervantsz&quot;,&quot;Aileen Mottern&quot;,&quot;Alejandra Prenatt&quot;,&quot;Alejandro Mascall&quot;,&quot;Alene Rabeck&quot;,&quot;Alfonso Griglen&quot;,&quot;Alissa Mountjoy&quot;,&quot;Allan Schwantd&quot;,&quot;Allie Pumphrey&quot;,&quot;Allyson Gillispie&quot;,&quot;Alva Pennigton&quot;,&quot;Alyssa Biasotti&quot;,&quot;Amelia Caputo&quot;,&quot;Amos Linnan&quot;,&quot;Angelique Schermerhorn&quot;,&quot;Angelo Ferentz&quot;,&quot;Annabelle Coger&quot;,&quot;Annette Frietas&quot;,&quot;Antione Mccleary&quot;,&quot;Antony Thierauf&quot;,&quot;Armando Papik&quot;,&quot;Armando Kolm&quot;,&quot;Ashley Leonesio&quot;,&quot;Athena Fontanilla&quot;,&quot;Audra Cantu&quot;,&quot;Avery Parbol&quot;,&quot;Barbara Hindley&quot;,&quot;Bart Hachey&quot;,&quot;Barton Friesner&quot;,&quot;Benjamin Schkade&quot;,&quot;Bernard Laboy&quot;,&quot;Bert Schadle&quot;,&quot;Berta Karc
module Sass::Script::Functions
# Appends "_2x" to the end of a filename before the extension
# e.g. foobar.jpg => foobar_2x.jpg
def retinize(string)
assert_type string, :String
Sass::Script::String.new string.value.gsub(/\.(\w+)$/, '_2x.\\1')
end
declare :retinize, :args => [:string]
@nonlinear
nonlinear / _mixins.scss
Created August 9, 2013 20:35
SASS EXTEND: reset object
// -----------------------------------------
// RESET OBJECT
// -----------------------------------------
%reset {
margin: 0px !important;
padding: 0px !important;
border: none;
background: transparent;
}
// @extend %reset;