Skip to content

Instantly share code, notes, and snippets.

View fullstackto's full-sized avatar

Full Stack Toronto fullstackto

View GitHub Profile
@fullstackto
fullstackto / grabbing a file from a previous git commit
Created February 28, 2014 14:18
How to grab a file from a previous git commit
git checkout HEAD~n path/to/file.ext
git commit -am "Retrieving file_name.ext from previous commit"
git push origin
Where n in HEAD~n is the number of previous commits to go back for the file.
@fullstackto
fullstackto / Responsive canvas redrawing of Chart.js using jQuery
Created February 27, 2014 21:32
Responsive canvas redrawing of Chart.js using jQuery
var width = $('canvas').parent().width();
$('canvas').attr("width",width);
new Chart(ctx).Line(data,options);
window.onresize = function(event){
var width = $('canvas').parent().width();
$('canvas').attr("width",width);
new Chart(ctx).Line(data,options);
};