Skip to content

Instantly share code, notes, and snippets.

View antomor's full-sized avatar
🎯
Focusing

Antonio Morrone antomor

🎯
Focusing
View GitHub Profile
@antomor
antomor / wait.js
Last active October 21, 2020 17:07
It includes a wait function that returns a promise to be waited, it is also possible to specify a cancelToken, to stop waiting.
const wait = (milliSeconds) => {
return new Promise((resolve) => setTimeout(() => resolve(), milliSeconds));
};
wait(200).then(() => {
// your code
});
// async/await context
await wait(200);
@antomor
antomor / emgithub-example.md
Created October 19, 2020 19:49
Hugo Emgithub shortcode
@antomor
antomor / git-move-dir.txt
Last active March 14, 2020 15:46
Git: move files retaining history
From the source repository:
```sh
git clone <src_repository> <src_repository>_clone
# clone the src repository in new folder
```
```sh
cd <src_repository>_clone
```