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/1186535/how-to-modify-a-specified-commit | |
You can use git rebase. For example, if you want to modify commit bbc643cd, run | |
$ git rebase --interactive 'bbc643cd^' | |
Please note the caret ^ at the end of the command, because you need actually to rebase back to the commit before the one you wish to modify. | |
In the default editor, modify pick to edit in the line mentioning 'bbc643cd'. | |
Save the file and exit: git will interpret and automatically execute the commands in the file. You will find yourself in the previous situation in which you just had created commit bbc643cd. |
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
"scripts": { | |
"e2e:staging": "yarn run $(grep API_KEY .env | cut -d '=' -f2)", | |
}, |
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 preloadLazy = (dynamicImport) => { | |
let promise; | |
function load() { | |
if(!promise) { | |
promise = dynamicImport(); | |
} | |
return promise; | |
} | |
const component = React.lazy(load); |
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
export const preloadImage = (url: string) => { | |
return new Promise(resolve => { | |
const img = document.createElement('img'); | |
img.src = url; | |
img.onload = () => resolve(src); | |
}); | |
}; |
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
import React, { PureComponent, ReactNode } from 'react'; | |
const isBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined'; | |
const shouldPolyfillIntersectionObserver = () => | |
isBrowser() && | |
!( | |
'IntersectionObserver' in window && | |
'IntersectionObserverEntry' in window && | |
'intersectionRatio' in IntersectionObserverEntry.prototype |
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 svg = document.querySelector("svg"); | |
const bbox = svg.getBBox(); | |
svg.setAttribute("viewBox", [bbox.x, bbox.y, bbox.width, bbox.height].join(" ")); | |
console.log(svg.outerHTML); |
NewerOlder