Skip to content

Instantly share code, notes, and snippets.

@CreativeSeo33
CreativeSeo33 / gist:8dcbdf5dcce2b1e35cf432b49d01c4eb
Created November 4, 2016 22:08 — forked from dgilperez/gist:8921033
Setting up a spinner for every AJAX call, globally
// One solution might be to have an AJAX spinner in a standard location that gets shown when AJAX requests start and hidden when AJAX requests complete. To do this globally in jQuery:
// http://robots.thoughtbot.com/automatically-wait-for-ajax-with-capybara
jQuery.ajaxSetup({
beforeSend: function(xhr) {
$('#spinner').show();
},
// runs after AJAX requests complete, successfully or not
complete: function(xhr, status){
$('#spinner').hide();
@CreativeSeo33
CreativeSeo33 / _description.md
Created October 20, 2015 14:14 — forked from andytlr/_description.md
Convert SVG <polyline> to <path> so they can be animated with D3 etc.

Convert SVG polyline to path

Replace all instances of <polyline with <path and points=" with d="M.

 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1000px" height="1000px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
-<polyline fill="#FFFFFF" stroke="#000000" stroke-miterlimit="10" points="100.712,141.534 582.904,227.835 425.37,478.521
+
preferred_syntax = :sass
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
line_comments = true
output_style = :compressed
@CreativeSeo33
CreativeSeo33 / centerer
Created September 3, 2015 11:37
mixin centerer
@mixin centerer($horizontal: true, $vertical: true) {
position: absolute;
@if ($horizontal and $vertical) {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} @else if ($horizontal) {
left: 50%;
transform: translate(-50%, 0);
} @else if ($vertical) {
@CreativeSeo33
CreativeSeo33 / gist:1687ea3f8523289ef1cc
Last active October 16, 2018 16:39
Выпадающее меню Bootstrap при наведении
@media only screen and (min-width : 768px) {
/* Make Navigation Toggle on Desktop Hover */
.dropdown:hover .dropdown-menu {
display: block;
}
}
.numbers {
@include gradient-horizontal(#050a10, #0d1e32, 0%, 67%);
color: #fff;
font-size: 16px;
font-weight: 300;
padding: 0;
text-align: center;
> div {
div {
padding: 40px 0;