Skip to content

Instantly share code, notes, and snippets.

View alex3165's full-sized avatar
🇫🇷

Alexandre Rieux alex3165

🇫🇷
View GitHub Profile
import ReactMapboxGl, { Layer, Feature } from “../src/index”;
<ReactMapboxGl
style=“style”
center={this.state.center}
zoom={this.state.zoom}
accessToken={accessToken}
containerStyle={containerStyle}>
<ReactMapboxGl
style={style}
center={this.state.center}
zoom={this.state.zoom}
accessToken={accessToken}
onDrag={this._onDrag}
containerStyle={containerStyle}>
<ZoomControl
zoomDiff={1}
import * as React from 'react';
declare interface LoadingProps {
color? : string;
height? : any;
width? : any;
type? : string;
}
declare interface LoadingState {
@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
const oauthUserEpic = (action$) => {
let horribleSideEffect;
return action$
.ofType(OAUTH_USER)
.concatMap(({ token }) => {
horribleSideEffect = token;
return get({
endpoint: 'user',
params: { access_token: token }
@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

function Node(data) {
this.data = data;
this.children = [];
}
class Tree {
constructor(rootData) {
this.root = new Node(rootData);
}
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) => {
@alex3165
alex3165 / react-script-cci-aws.yml
Created October 7, 2018 15:18
Quick circleCI 2 config that works with react-script and deploy to aws
defaults: &defaults
docker:
- image: jtredoux/node-aws:latest
version: 2
jobs:
build:
<<: *defaults
steps:
- checkout
'use strict'
const https = require('https');
const data = JSON.stringify({});
const getOptions = (code) => {
return {
host: 'github.com',
method: 'POST',