Skip to content

Instantly share code, notes, and snippets.

View wmakeev's full-sized avatar
💭
💻

Makeev Vitaliy wmakeev

💭
💻
View GitHub Profile
@wmakeev
wmakeev / color-conversion-algorithms.js
Created April 12, 2020 08:20 — forked from mjackson/color-conversion-algorithms.js
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@wmakeev
wmakeev / AgentExport.d.ts
Last active April 14, 2020 11:16
2020-04-14 ms-data-export #work
/** Выгрузка контрагентов - agents.csv */
interface AgentExport {
/** Идентификатор клиента */
id: string
/** Дата создания клиента */
created: string
/** Наименование клиента */
user_name?: string
ec.order = ec.order || {};
ec.order.extraFields = ec.order.extraFields || {};
// A text input that asks a buyer how to sign the package
ec.order.extraFields.wrapping_box_signature = {
'title': 'How should we sign the package?',
'textPlaceholder': 'Package sign',
'type': 'text',
'tip': 'We will put a label on a box so the recipient knows who it is from',
'required': false,
@wmakeev
wmakeev / 1.md
Last active October 6, 2020 12:17
TypeScript questions #typescript #question
interface ModelAttributes {
  [name: string]: string | number
}

interface Agent {
  id: string
  created_date: Date
  name: string
 city: string | null
@wmakeev
wmakeev / !gas_typescript_template.md
Last active September 2, 2020 07:29
[GAS typescript template] #gas #typescript #clasp #template
@wmakeev
wmakeev / !nodejs_base_template.md
Last active August 5, 2023 11:28
[01 - Node.js base template] #template #env

Params

Parameter Default Description
PROJECT_NAME FOLDER_NAME Name of current folder
PACKAGE_NAME PROJECT_NAME Package name
PKG_PUBLISH_CONFIG undefined restricted or public for scoped packages
PROJECT_DESCRIPTION Description
AUTHOR Vitaliy V. Makeev
LICENCE MIT
@wmakeev
wmakeev / aws_sam_cheatsheet.md
Last active September 18, 2020 13:06
[AWS SAM cheetsheet] #cheatsheet #aws #sam
@wmakeev
wmakeev / getSignedUrl.ts
Created August 25, 2020 13:50
[AWS S3 public link] #aws #s3
import AWS from 'aws-sdk'
import { v4 } from 'uuid'
const s3 = new AWS.S3({ signatureVersion: 'v4' })
const { AWS_S3_SCREENSHOT_BUCKET } = process.env
export default async function getImageTempUrl(
prefix: string,
imgBuffer: Buffer
@wmakeev
wmakeev / !tape-template.md
Last active November 22, 2021 11:29
[03 - Tape template] #template #tests

tape test env template

@wmakeev
wmakeev / !aws-ci.md
Last active September 4, 2020 15:20
[AWS CI] #aws #sam #codepipeline #ci #typescript #git