For Homebrew v2.6.x and below:
brew cask install ngrokFor Homebrew v2.7.x and above:
| import React, { useState } from 'react' | |
| import ReactMapGL, { Marker } from 'react-map-gl' | |
| import { WebMercatorViewport } from '@deck.gl/core' | |
| const getBoundsForPoints = (points, { width = 200, height = 500, padding = 0 } = {}) => { | |
| // Calculate corner values of bounds | |
| const pointsLong = points.map(point => point.coordinates._long) | |
| const pointsLat = points.map(point => point.coordinates._lat) | |
| const cornersLongLat = [ | |
| [Math.min(...pointsLong), Math.min(...pointsLat)], |
| let isRefreshing = false; | |
| let refreshSubscribers = []; | |
| const instance = axios.create({ | |
| baseURL: Config.API_URL, | |
| }); | |
| instance.interceptors.response.use(response => { | |
| return response; | |
| }, error => { |
| item4 = {id: 4, children: []}; | |
| item3 = {id: 3, children: [], parent: 2}; | |
| item2 = {id: 2, children: [item3], parent: 1}; | |
| item1 = {id: 1, children: [item2]}; | |
| items = [item1, item4]; | |
| flatten = (items) => { | |
| return items.reduce((flatItems, item) => { | |
| const children = _.get(item, 'children', []); | |
| const flatChildren = children.length === 0 ? [] : flatten(children); | |
| return [...flatItems, item, ...flatChildren]; |
| axios({ | |
| url: 'http://localhost:5000/static/example.pdf', | |
| method: 'GET', | |
| responseType: 'blob', // important | |
| }).then((response) => { | |
| const url = window.URL.createObjectURL(new Blob([response.data])); | |
| const link = document.createElement('a'); | |
| link.href = url; | |
| link.setAttribute('download', 'file.pdf'); | |
| document.body.appendChild(link); |
| <code_scheme name="Airbnb"> | |
| <option name="RIGHT_MARGIN" value="100" /> | |
| <option name="HTML_ATTRIBUTE_WRAP" value="4" /> | |
| <option name="HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE" value="" /> | |
| <option name="HTML_ENFORCE_QUOTES" value="true" /> | |
| <DBN-PSQL> | |
| <case-options enabled="false"> | |
| <option name="KEYWORD_CASE" value="lower" /> | |
| <option name="FUNCTION_CASE" value="lower" /> | |
| <option name="PARAMETER_CASE" value="lower" /> |