Teamlead Roadmap – карта навыков и компетенций тимлидов, которую можно адаптировать для любой компании и команды.
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
/* eslint-disable handle-callback-err */ | |
import fs from 'fs'; | |
import zlib from 'zlib'; | |
import MBTiles from '@mapbox/mbtiles'; | |
const z = 0; | |
const x = 0; | |
const y = 0; | |
// tippecanoe -f -z0 -o admin.mbtiles admin.geojson |
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 function logOffscreenCanvasContext(context, scaleFactor = 1) { | |
const canvas = document.createElement('canvas'); | |
canvas.width = context.canvas.width; | |
canvas.height = context.canvas.height; | |
const ctx = canvas.getContext('2d'); | |
ctx.drawImage(context.canvas, 0, 0); | |
const displayWidth = canvas.width * scaleFactor; | |
const displayHeight = canvas.height * scaleFactor; |
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 EventData = { | |
[key: string]: unknown; | |
}; | |
export class Event<Type extends string = string, Data extends EventData | void = void> { | |
target: unknown; | |
readonly type: Type; | |
/** | |
* Virtual property to ensure that events with different data types are not compatible. |
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 babel from '@babel/core'; | |
import traverse from '@babel/traverse'; | |
import generator from '@babel/generator'; | |
function capitalizeFirstLetter(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} | |
function migrate() { | |
const input = ` |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Display a map on a webpage</title> | |
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<link href="https://api.mapbox.com/mapbox-gl-js/v3.1.2/mapbox-gl.css" rel="stylesheet"> | |
<script src="https://api.mapbox.com/mapbox-gl-js/v3.1.2/mapbox-gl.js"></script> | |
<style> |
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
const zlib = require('zlib'); | |
const toxy = require('toxy'); | |
const express = require('express'); | |
const proxy = toxy(); | |
// Gzip CSS file | |
const cssContent = 'body { background-color: purple; }'; | |
const gzippedCssContent = zlib.gzipSync(cssContent); |
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
Hello, ChatGPT. |
Mapbox GL JS v2 contains OSS code from:
- Mapbox GL JS v1.13 and earlier. Licensed under a BSD-3-Clause license
- glfx.js. Licensed under a MIT license
- d3-color. Licensed under an ISC license
- d3-geo. Licensed under an ISC + MIT license
- d3-geo-projection. Licensed under an ISC + MIT license
See the LICENSE.txt for more info.
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
diff --git a/index.js b/index.js | |
index f685aa3..7b7ad81 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -49,7 +49,7 @@ module.exports = function flowRemoveTypes(source, options) { | |
allowReturnOutsideFunction: true, | |
allowSuperOutsideMethod: true, | |
sourceType: 'module', | |
- plugins: [ '*', 'jsx', 'flow', 'classProperties', 'importMeta' ], | |
+ plugins: ['*', 'jsx', 'flow', 'classProperties', 'importMeta', 'importAssertions' ], |
NewerOlder