brew install boot2docker
eval $(boot2docker shellinit)
boot2docker up
sudo pip install -U docker-compose
# put the docker-compose.yml file in a directory e.g. ~/Work/docker/cassandra
cd ~/Work/docker/cassandra
docker-compose up
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
{ | |
"React function component": { | |
"prefix": "nrf", | |
"body": [ | |
"import * as React from \"react\";", | |
"", | |
"export interface ${1:$TM_FILENAME_BASE}Props {}", | |
"", | |
"const ${1:$TM_FILENAME_BASE}: React.FC<${1:$TM_FILENAME_BASE}Props> = props => {", | |
" return <>{props.children}</>;", |
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
<h1>I am a level 1 heading</h1> | |
<p class="subtitle subtitle--1">I am a level 1 subtitle</p> | |
<p class="subtitle subtitle--2">I am a level 2 subtitle</p> | |
<p class="subtitle subtitle--6"> | |
Up to six levels are supported corresponding to heading levels | |
</p> |
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
import * as React from "react"; | |
/** | |
* Given a JSX.IntrinsicElement[...], get its attributes | |
*/ | |
type Attributes<E> = E extends React.DetailedHTMLProps<infer Attr, any> | |
? Attr | |
: never; | |
/** |
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
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; | |
import { Observable } from 'rxjs'; | |
const fromRequest = (request: AxiosRequestConfig) => | |
new Observable<AxiosResponse>( | |
(o) => { | |
const source = axios.CancelToken.source(); | |
o.add(() => source.cancel('Operation canceled by the user.')); |
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
import "pino"; | |
declare module "pino" { | |
interface LoggerOptions { | |
// @types/pino does not currently expose this option | |
nestedKey?: string; | |
} | |
} |
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
import { ComponentType } from "react"; | |
/** | |
* For any type T that is a React.ComponentType give me the type of its Props | |
* | |
*/ | |
export type PropType<T> = T extends ComponentType<infer P> ? P : never; | |
// USAGE: | |
import { Component, Fragment } from "react"; |
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
import * as React from "react"; | |
interface Props<T> { | |
initial?: T; | |
children: (r: { value?: T; onChange: (value: T) => void }) => React.ReactNode; | |
} | |
interface State<T> { | |
value?: T; | |
} |
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
export type ActionType = string; | |
export interface Action<T extends ActionType> { | |
type: T; | |
} | |
export interface BasicAction<T extends ActionType, P> extends Action<T> { | |
payload: P; | |
} |
I hereby claim:
- I am disintegrator on github.
- I am disintegrator (https://keybase.io/disintegrator) on keybase.
- I have a public key whose fingerprint is B27D E9C9 E08C A86E F46B 84FA F60F 7D8E 4BAD 4281
To claim this, I am signing this object: