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 useAbortController(runEffect=false, runLayoutEffect=false) { | |
const acRef = useRef() | |
const getAbortController = useCallback(() => { | |
if (!acRef.current) { | |
acRef.current = new AbortController() | |
} | |
return acRef.current | |
}, []); | |
if (runEffect) { |
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
/* 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; |
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
# 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 [email protected]: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 |