View abort-controller.js
This file contains 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 useAbortController(runEffect=false, runLayoutEffect=false) { | |
const acRef = useRef() | |
const getAbortController = useCallback(() => { | |
if (!acRef.current) { | |
acRef.current = new AbortController() | |
} | |
return acRef.current | |
}, []); | |
if (runEffect) { |
View _variables.scss
This file contains 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
/* css vars names must be unique */ | |
:root { | |
--ezc-color-gray-100: #f8f9fa; | |
--ezc-color-gray-200: #e9ecef; | |
--ezc-color-gray-300: #dee2e6; | |
--ezc-color-gray-400: #ced4da; | |
--ezc-color-gray-500: #adb5bd; | |
--ezc-color-gray-600: #6c757d; |
View gist:4b0f2165f2fc938d65f2ce5c8a6edeb1
This file contains 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
# https://stackoverflow.com/questions/28983842/remote-rejected-shallow-update-not-allowed-after-changing-git-remote-url | |
# https://stackoverflow.com/questions/29748197/how-to-clone-seed-kick-start-project-without-the-whole-history | |
1. git clone --single-branch --branch=commerce --depth=198 git@git.hostname.com:andrew/project.git ./ | |
2. git remote remove origin | |
3. put the starting point hash to grafts (the commit you with to start new repo from, the last one of --depth) | |
echo "fc4c845f42adf3447f3b531398c69451bb11f6e7" >> .git/info/grafts | |
4. git filter-branch -- --all | |
5. rm -fr ./.git/refs/original |