Skip to content

Instantly share code, notes, and snippets.

@akrawchyk
akrawchyk / entypo sass map
Created April 7, 2014 18:23
Using SASS maps to generate entypo icon font classes
$entypo-icons: (
search : \1f50d,
flag : \2691
// ...
);
@each $icon, $code in $entypo-icons {
.entypo-#{$icon}:before {
content: '#{$code}';
}
@akrawchyk
akrawchyk / random bootstrap popover content
Last active January 4, 2016 04:09
Replacing bootstrap popover content on each click
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>demo</title>
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>
@akrawchyk
akrawchyk / SASS opposite direction function
Created September 27, 2013 19:45
Reverses a CSS direction, accepting a single direction or a list.
@function get-opposite-direction($direction) {
$opposite-direction: center;
@if $direction == top {
$opposite-direction: bottom;
}
@if $direction == bottom {
$opposite-direction: top;
}
@if $direction == left {
@akrawchyk
akrawchyk / SASS Bootstrap 3 grid
Last active December 23, 2015 11:39
Bootstrap 3 basic grid system in SCSS. Omits offsetting, nesting, and ordering for simplicity.
// variables
$bp-small: em(768) !default;
$bp-medium: em(992) !default;
$bp-large: em(1200) !default;
$grid-columns: 12 !default;
$grid-gutter-width: em(30) !default;
$grid-wrapper-small: em(750) !default;
$grid-wrapper-medium: em(970) !default;
$grid-wrapper-large: em(1170) !default;
@akrawchyk
akrawchyk / gist:3946528
Created October 24, 2012 14:53
Insert mode neocomplcache errors
line 8:
E121: Undefined variable: g:neocomplcache_context_filetype_lists
Error detected while processing function <SNR>82_on_moved_i..<SNR>82_get_cur_text..neocomplcache#get_context_filetype..<SNR>82_set_context_filetype..<SNR>82_get_context_filetype:
line 8:
E116: Invalid arguments for function has_key(g:neocomplcache_context_filetype_lists, filetype) && !empty(g:neocomplcache_context_filetype_lists[filetype])
Error detected while processing function <SNR>82_on_moved_i..<SNR>82_get_cur_text..neocomplcache#get_context_filetype..<SNR>82_set_context_filetype..<SNR>82_get_context_filetype:
line 8:
E15: Invalid expression: has_key(g:neocomplcache_context_filetype_lists, filetype) && !empty(g:neocomplcache_context_filetype_lists[filetype])
Error detected while processing function <SNR>82_on_moved_i..<SNR>82_get_cur_text..neocomplcache#get_context_filetype..<SNR>82_set_context_filetype:
line 26:
@akrawchyk
akrawchyk / gist:3946510
Created October 24, 2012 14:50
Errors for neocomplcache#enable
Error detected while processing function vital#of..vital#_9813ec6#new..<SNR>85_load..<SNR>85__import:
line 22:
E480: No match: `=path`
Error detected while processing function vital#of..vital#_9813ec6#new..<SNR>85_load:
line 21:
E171: Missing :endif