Skip to content

Instantly share code, notes, and snippets.

CreativeSeo33

Block or report user

Report or block CreativeSeo33

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@CreativeSeo33
CreativeSeo33 / gist:8dcbdf5dcce2b1e35cf432b49d01c4eb
Created Nov 4, 2016 — forked from dgilperez/gist:8921033
Setting up a spinner for every AJAX call, globally
View gist:8dcbdf5dcce2b1e35cf432b49d01c4eb
// 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 Oct 20, 2015 — forked from andytlr/_description.md
Convert SVG <polyline> to <path> so they can be animated with D3 etc.
View _description.md

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
+<path fill="#FFFFFF" stroke="#000000" stroke-miterlimit="10" d="M100.712,141.534 582.904,227.835 425.37,478.521
You can’t perform that action at this time.