This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function scrollTo(top, duration) { | |
| const cosParameter = (window.scrollY - top) / 2; | |
| let scrollCount = 0; | |
| let oldTimestamp = performance.now(); | |
| function step (newTimestamp) { | |
| scrollCount += Math.PI / (duration / (newTimestamp - oldTimestamp)); | |
| if (scrollCount >= Math.PI) { | |
| window.scrollTo(0, top); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # forked by naXa! - naxa.by | |
| # forked by TeChn4K | |
| # | |
| # Git hook to run a command after `git checkout` / `git rebase` if a specified file was changed. | |
| # | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| # | |
| # Terminate gracefully on a file checkout (retrieving a file from the index) |