Skip to content

Instantly share code, notes, and snippets.

View gearmobile's full-sized avatar
🇷🇺
Working remotely

Valeriy Semenenko gearmobile

🇷🇺
Working remotely
View GitHub Profile
@gearmobile
gearmobile / gist:2b9425cf0a7c5bd1809c
Created June 24, 2015 06:39
FontAwesome CSS content value
Font Awesome - is a web font containing all the icons from the Twitter Bootstrap framework, and now many more. Whilst the implementation in Bootstrap is designed to be used with the <i> element (Bootstrap v2), you may find yourself wanting to use these icons on other elements.
To do so, you'll need to use the following CSS on the desired element, and then substitute in the content value for the relevant icon.
********************************************
.element {
position: relative;
}
@gearmobile
gearmobile / Маски под Gulp
Created June 26, 2015 13:55
Маски под Gulp
Маски под Gulp:
- js/app.js — файл app.js в директории js
- js/*.js — все файлы с расширением .js в директории js
- js/**/*.js — все файлы с расширением .js в директории js и всех дочерних директориях
- !js/app.js — исключает определенный файл
- *.+(js|css) — все файлы в корневой директории с расширениями .js или .css
@gearmobile
gearmobile / Autoload SSH Key in Mac OSX
Last active January 9, 2016 08:21
Autoload SSH Key in Mac OSX
Autoload ssh key in Mac OS X
1. cd ~/.ssh
2. ssh-add -K your-ssh-key
@gearmobile
gearmobile / Horizontal and Vertical Align Element via Flexbox
Last active January 9, 2016 08:08
Horizontal and Vertical Align Element via Flexbox
.container {
display: flex;
align-items: center;
justify-content: center;
}
@gearmobile
gearmobile / Flexbox - Equal Height Columns
Last active January 9, 2016 08:09
equal-height columns flexbox
.container {
display: flex;
align-items: stretch;
}
@gearmobile
gearmobile / Convert CSS File to Stylus File
Last active January 9, 2016 08:20
Convert CSS File to Stylus File
$ stylus --css test.css /tmp/out.styl
@gearmobile
gearmobile / Border Box Model
Last active January 9, 2016 08:18
Border Box Model
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
@gearmobile
gearmobile / Check jQuery Loading via CDN
Last active January 9, 2016 08:42
Check jQuery Loading via CDN
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script>
@gearmobile
gearmobile / Stylus PX to REM Mixin
Created August 20, 2015 05:47
Stylus PX to REM Mixin
set-font-size(value) {
font-size: value; /* добавляем PX как подстраховку */
if (value is inherit) {
/* делаем если нет значения для шрифта */
} else {
font-size: remify(value);
}
}
@gearmobile
gearmobile / Jade Mixin USE SVG
Last active January 9, 2016 08:10
Mixin USE SVG
mixin use(name)
svg(class="#{name}" role="img")
use(id="#{name}" xlink:href="#{svg}##{name}")