Skip to content

Instantly share code, notes, and snippets.

View hileon's full-sized avatar

Leon Zhang hileon

View GitHub Profile
@hileon
hileon / .css3_gradient
Created March 27, 2012 04:06
less css transition
.css3_gradient(@from, @to, @fallback: @to) {
background-color:@fallback;
background-image:-webkit-gradient(linear, left top, left bottom, from(@from), to(@to));
background-image:-webkit-linear-gradient(top, @from, @to);
background-image:-moz-linear-gradient(top, @from, @to);
background-image:-ms-linear-gradient(top, @from, @to);
background-image:-o-linear-gradient(top, @from, @to);
background:linear-gradient(to left bottom, @from, @to);
}
@hileon
hileon / mixins.less
Created March 27, 2012 04:07 — forked from andreruffert/mixins.less
LESS CSS mixins Collection
.border-radius(@radius:15px)
{
-webkit-border-radius:@radius;
-moz-border-radius:@radius;
border-radius:@radius;
}
.multi-rounded-corners(@topLeft: 5px, @topRight: 5px, @bottomRight: 5px, @bottomLeft: 5px)
{
-webkit-border-radius: @topLeft @topRight @bottomRight @bottomLeft;
@hileon
hileon / mixins.less
Created March 27, 2012 04:07 — forked from chrisgaunt/mixins.less
LESS CSS Mixins
.box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) {
box-shadow: @x @y @blur @color;
-moz-box-shadow: @x @y @blur @color;
-webkit-box-shadow: @x @y @blur @color;
}
.inset-box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) {
box-shadow: inset @x @y @blur @color;
-moz-box-shadow: inset @x @y @blur @color;
-webkit-box-shadow: inset @x @y @blur @color;
@hileon
hileon / common.less
Created March 27, 2012 04:07 — forked from danieleli/common.less
less / css - common functions
.clear_margin_padding() {
margin: 0 !important;
padding: 0 !important;
padding-left: 0px !important;
padding-right: 0px !important;
}
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
@hileon
hileon / gist:2212460
Created March 27, 2012 04:10 — forked from blau/gist:27831
markdown syntax
Markdown: Syntax
================
* [Overview](#overview)
* [Philosophy](#philosophy)
* [Inline HTML](#html)
* [Automatic Escaping for Special Characters](#autoescape)
* [Block Elements](#block)
* [Paragraphs and Line Breaks](#p)
* [Headers](#header)

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

@hileon
hileon / Markdown Syntax
Created March 27, 2012 04:11 — forked from shanewfx/Markdown Syntax
Markdown Syntax
Markdown Syntax:
1.Phrase Emphasis 斜体与加粗
*italic* **bold**
_italic_ __bold__
2.Links 超链接
@hileon
hileon / gist:2212463
Created March 27, 2012 04:11
Markdown Syntax Cheatsheet

Syntax Cheatsheet:

Phrase Emphasis

*italic*   **bold**
_italic_   __bold__

Links

@hileon
hileon / cheatsheet.md
Created March 27, 2012 04:12 — forked from jessedearing/vim cheatsheet.md
Vim Cheatsheet

#Vim Cheat Sheet

  • gqip - Reformats paragraph to textwidth
  • gq - Reformats selection
  • :Tab /= - Equally spaces based on the = symbol (requires Tabular vim plugin)
  • :setf language - Changes current language
  • :set language=language - Changes current language
  • <C-a> - Increments the number under the cursor
  • <C-x> - Decrements the number under the cursor
@hileon
hileon / rvm_cheatsheet
Created March 27, 2012 04:12 — forked from fajrif/rvm_cheatsheet
RVM cheatsheet
RVM home page: http://rvm.beginrescueend.com
Install RVM
------------
See http://rvm.beginrescueend.com/rvm/install/
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Install rvm for all users