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
Object.keys(object).reduce((result, key) => ( | |
object[key] !== null && object[key] !== undefined | |
? (result += key + '=' + object[key] + '&') | |
: result | |
), '?').slice(0, -1) |
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
render() { | |
const { name } = this.props | |
return ( | |
<div> | |
{ (() => { | |
switch (nane) { | |
case 'toto': return <span>Toto</span> | |
case 'tata': return <span>Tata</span> | |
case 'titi': return <span>Titi</span> | |
} |
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 React, {Component, PropTypes} from "react" | |
class MyComponent extends Component { | |
constructor(props, context) { | |
super(props, context) | |
this.state = { | |
modal: null, | |
} |
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 React, {Component, PropTypes} from "react" | |
import placesLoader from "./placesLoader" | |
import placesShape from "./placesShape" | |
import styles from "./GoogleMap.css" | |
import iconMarker from "./iconMarker.png" | |
import iconTrash from "./iconTrash.png" | |
const {arrayOf, func, number, shape, string} = PropTypes |
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 contentful from "contentful" | |
import fs from "fs-extra-promise" | |
import request from "request-promise" | |
import grayMatter from "gray-matter" | |
import get from "lodash/get" | |
import pkg from "../package.json" | |
const client = contentful.createClient({ | |
accessToken: pkg.contentful["access-token"], |
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
var polyline = require("@mapbox/polyline") | |
const Trace = ({mapPolyline}) => { | |
const coordinates = polyline.decode(mapPolyline).map(coordinate => ({ | |
lat: coordinate[0], | |
lng: coordinate[1], | |
})) | |
const minLat = coordinates.reduce( | |
(min, coordinate) => (coordinate.lat < min ? coordinate.lat : min), |
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
{ | |
"meta": { "theme": "papirus" }, | |
"basics": { | |
"name": "Cédric Delpoux", | |
"label": "Développeur Front-end", | |
"picture": "https://avatars1.githubusercontent.com/u/2683300?s=460&v=4", | |
"email": "[email protected]", | |
"phone": "+33 6 74 63 20 45", | |
"website": "https://cedricdelpoux.fr", | |
"summary": "Passionné par le développement web et sensibilisé aux belles interfaces et à l'ergonomie logicielle, je mets toute mon énergie pour concevoir des sites at applications modernes, responsives et faciles à prendre en main afin que les utilisateurs les moins technophiles puissent appréhender au mieux mes créations.", |