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
| var oldHref = document.location.href; | |
| window.onload = function() { | |
| var bodyList = document.querySelector("body"); | |
| var observer = new MutationObserver(function(mutations) { | |
| mutations.forEach(function(mutation) { | |
| if (oldHref != document.location.href) { | |
| oldHref = document.location.href; | |
| console.log("LOCATION CHANGE:", oldHref); |
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
| /** | |
| * Version 1 | |
| */ | |
| download(doc?: any): void { | |
| const filename = 'https://via.placeholder.com/350x150'; | |
| const link = document.createElement('a'); | |
| link.style.display = 'none'; | |
| link.href = filename; | |
| link.target = '_blank'; |
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
| goToTop() { | |
| const scrollToTop = window.setInterval(() => { | |
| const pos = window.pageYOffset; | |
| if (pos > 0) { | |
| window.scrollTo(0, pos - 20); | |
| } else { | |
| window.clearInterval(scrollToTop); | |
| } |
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
| FROM debian:stable-slim | |
| RUN apt update | |
| RUN apt install -y \ | |
| curl git wget python3 \ | |
| zip unzip apt-transport-https \ | |
| ca-certificates gnupg clang \ | |
| cmake ninja-build pkg-config \ | |
| libgconf-2-4 gdb libstdc++6 \ | |
| libglu1-mesa fonts-droid-fallback \ |
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
| const start = new Date(); | |
| const hrStart = process.hrtime(); | |
| // process.hrtime(); | |
| // https://nodejs.org/api/process.html#processhrtimetime | |
| // [seconds, nanoseconds] | |
| setTimeout(() => { | |
| const end = new Date() - start; |
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
| :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
| :::::::::::: :::::::::::: :::::::::::: | |
| ::::::::: :::: ::::::::: | |
| ::::::: :: ::::::: | |
| ::::: ::::: | |
| :::: :::: | |
| ::: ::: | |
| ::: ::: | |
| :::: :::: | |
| ::::: ::::: |
OlderNewer