wget http://download.geofabrik.de/russia-latest.osm.pbf
osmconvert russia-latest.osm.pbf -o=russia-latest.o5m
osmfilter russia-latest.o5m --keep="highway=*" > russia-highways.osm
This file contains hidden or 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 aiohttp | |
| from asyncio import Future | |
| from unittest.mock import MagicMock, Mock, patch | |
| def test_taxi_route_info(aiohttp_client, loop): | |
| async def taxi_route_info(): | |
| connector = aiohttp.TCPConnector(ssl=False) | |
| session = aiohttp.ClientSession(connector=connector, loop=loop) | |
| taxi_route_info = TaxiRouteInfo(session=session) |
This file contains hidden or 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
| // | |
| // ViewController.swift | |
| // SuperApp-iOS | |
| // | |
| // Created by Stepan Kuzmin on 05/08/2019. | |
| // Copyright © 2019 Stepan Kuzmin. All rights reserved. | |
| // | |
| import UIKit | |
| import WebKit |
This file contains hidden or 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
| # -*- sh -*- vim:set ft=sh ai et sw=4 sts=4: | |
| # It might be bash like, but I can't have my co-workers knowing I use zsh | |
| PROMPT='%{$fg[green]%}%n@%{$fg[red]%}%m:%{$fg_bold[blue]%}%2~ $(git_prompt_info)%{$reset_color%}%(!.#.$) ' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$reset_color%}" |
This file contains hidden or 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
| { | |
| "parser": "@typescript-eslint/parser", | |
| "parserOptions": { | |
| "project": "./tsconfig.json" | |
| }, | |
| "extends": [ | |
| "airbnb", | |
| "plugin:@typescript-eslint/eslint-recommended", | |
| "plugin:@typescript-eslint/recommended", | |
| "plugin:@typescript-eslint/recommended-requiring-type-checking", |
Manual issue certificate:
sudo certbot certonly \
--agree-tos \
--email [email protected] \
--manual \
-d domain.tld
This file contains hidden or 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 { Pool, Client } = require('pg'); | |
| const groupBy = require('lodash.groupby'); | |
| const pool = new Pool({ | |
| host: 'localhost', | |
| database: 'db' | |
| }); | |
| const oldPoolQuery = pool.query; | |
| pool.query = (...args) => { |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
- Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
- Create or import a key -- see below for https://keybase.io
- Run
gpg --list-secret-keysand look forsec, use the key ID for the next step - Configure
gitto use GPG -- replace the key with the one fromgpg --list-secret-keys
This file contains hidden or 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
| onMoveEnd = (event) => { | |
| const map = this._mapRef.current.getMap(); | |
| map.off('moveend', this.onMoveEnd); | |
| const zoom = map.getZoom(); | |
| const { lat, lng } = map.getCenter(); | |
| const viewport = { longitude: lng, latitude: lat, zoom }; | |
| this.props.onViewportChange(viewport); | |
| }; |
This file contains hidden or 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
| type Immutable<T> = { | |
| readonly [K in keyof T]: Immutable<T[K]>; | |
| }; |