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 fs = require("fs"); | |
const path = require("path"); | |
/** | |
* | |
* Patching react-use for Typescript 4.1 | |
* | |
* The latest version of typescript causes changs the name of a type used by react-use. | |
* | |
* https://github.com/streamich/react-use/issues/1646 |
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
type ReplaceParam<T extends {}, P extends keyof T, R> = Omit<T, P> & { P: R }; |
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 { RouteConfig } from "react-router-config"; | |
function flattenRoutes(routes: RouteConfig[]): RouteConfig[] { | |
return [ | |
...routes, | |
...routes.reduce<RouteConfig[]>( | |
(accum, route) => [...accum, ...(route.routes ? flattenRoutes(route.routes) : [])], | |
[] | |
), | |
]; |
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
docker container run -v ${VOLUME_NAME}:/dest/path/of/mount --entrypoint="" -it ${IMAGE_NAME}:latest bash |
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 class TranslationWidget extends Component { | |
constructor(props, c) { | |
super(props, c); | |
this.state = { | |
items: this.props.value | |
}; | |
} | |
onChange(key, value) { | |
this.setState({ |
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
<div class="div1"></div> | |
<div class="div2"></div> | |
<div class="div3"></div> | |
<div class="div4"></div> | |
<div class="div5"></div> | |
<div class="div6"></div> | |
<div class="div7"></div> | |
<div class="div8"></div> | |
<div class="div9"></div> | |
<div class="div10"></div> |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@function opacitator($color){ | |
$hi: 1; | |
$lo: 0; | |
$tol: 0.01; | |
$rgbs: (red($color) green($color) blue($color)); |