Skip to content

Instantly share code, notes, and snippets.

View alex3165's full-sized avatar
🇫🇷

Alexandre Rieux alex3165

🇫🇷
View GitHub Profile
import * as Ajv from 'ajv';
import swaggerDefinition from './my-swagger-definition';
import { Request, Response, NextFunction } from 'express';
const ajv = Ajv({ allErrors: true });
// validation middleware
const validateSchema = (schema: UserResSchema) => {
return (req: Request, res: Response, next: NextFunction) => {
function Node(data) {
this.data = data;
this.children = [];
}
class Tree {
constructor(rootData) {
this.root = new Node(rootData);
}
@alex3165
alex3165 / giistr-cla.md
Last active May 20, 2021 18:18 — forked from kitten/cla.md
MIT CLA

Individual Contributor License Agreement (CLA)

Thank you for submitting your contributions to this project.

By signing this CLA, you agree that the following terms apply to all of your past, present and future contributions to the project.

License.

You hereby represent that all present, past and future contributions are governed by the

const oauthUserEpic = (action$) => {
let horribleSideEffect;
return action$
.ofType(OAUTH_USER)
.concatMap(({ token }) => {
horribleSideEffect = token;
return get({
endpoint: 'user',
params: { access_token: token }
@alex3165
alex3165 / mvt
Last active October 4, 2016 13:34
class Button extends React.Component {
static defaultProps = {
color: 'blue'
}
render() {
return (
<div style={{
color: this.props.color
import * as React from 'react';
declare interface LoadingProps {
color? : string;
height? : any;
width? : any;
type? : string;
}
declare interface LoadingState {
<ReactMapboxGl
style={style}
center={this.state.center}
zoom={this.state.zoom}
accessToken={accessToken}
onDrag={this._onDrag}
containerStyle={containerStyle}>
<ZoomControl
zoomDiff={1}
import ReactMapboxGl, { Layer, Feature } from “../src/index”;
<ReactMapboxGl
style=“style”
center={this.state.center}
zoom={this.state.zoom}
accessToken={accessToken}
containerStyle={containerStyle}>