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
export type CacheStorage = { | |
set: (key: string, value: string) => Promise<boolean>; | |
get: (key: string) => Promise<string | null>; | |
}; | |
type CacheValue = { value: string; expireTime: number } | |
export const getRamCacheClient = () => { | |
const cache: Record<string, CacheValue> = {}; | |
return { |
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
базовые команды | |
git clone адрес репозитория - клонировать репозиторий на локальный компютер | |
git commit -m 'initial commit' комит изменений в локальный репозиторий | |
git push -u origin master - только первый раз отправка изменений в удаленный репозиторий | |
git push - все последующие разы отправка изменений в удаленный репозиторий | |
окат изменений | |
git pull - скачивается актуальная версия удаленного репозитория и все изменения применяются к локальному репозиторию | |
checkout - перейти в другую ветку | |
discard - не отправлять в репозиторий те изменения которые нам не нравятся |
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 { default: axios } = require('axios') | |
const { snakeCase, camelCase, stringifyQuery } = require('../util/requests') | |
const NodeElement = require('./NodeElement') | |
/** | |
* @typedef Post | |
* @property {String} path | |
* @property {String} url | |
* @property {String} title | |
* @property {String} description |
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 HTMLMap = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
} | |
/** | |
* @param {String} c | |
* @returns {String} | |
*/ |
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
#define LEFT_LED_PIN 11 | |
#define RIGHT_LED_PIN 10 | |
#define BEACON_TRIG 9 | |
#define LEFT_ECHO 2 | |
#define RIGHT_ECHO 3 | |
#define true 1 | |
#define false 0 |