Skip to content

Instantly share code, notes, and snippets.

@aquiseb
aquiseb / commit-msg.md
Last active January 30, 2024 08:45
Husky Node.js - Git commit prepend issue tag to commit message

Automatically prepend issue tag to commit message

From the following tutorial

Consistency is a very important factor in software development.

But because different developers have different experiences and preferences it takes some time and effort to achieve consistency in projects.

A solution to that are discussed and then tool-enforced rules. Some solutions to that are linters, code formatters, checks on the CI and code reviews.

@james2doyle
james2doyle / scrollTo.js
Last active October 25, 2024 14:12
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
// easing functions http://goo.gl/5HLl8
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
}
t--;
return -c/2 * (t*(t-2) - 1) + b;
};