Skip to content

Instantly share code, notes, and snippets.

View Edarlingen's full-sized avatar

Aleksey Karagodnikov Edarlingen

  • Russian Federation
View GitHub Profile
@Edarlingen
Edarlingen / gist:d63b413fc765a8fcae0f8ef3e773b4d9
Created August 20, 2016 21:56 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@Edarlingen
Edarlingen / jquery.transitionduration.js
Created September 30, 2015 00:40 — forked from jayeb/jquery.transitionduration.js
jQuery plugin for easily parsing an element's CSS transition duration
(function($){
$.fn.transitionDuration = function() {
var d = $(this).css("transitionDuration") || "0s";
return (parseFloat(d) * (/ms/.test(d)?1:1000)).toFixed(0);
}
})(jQuery);