Skip to content

Instantly share code, notes, and snippets.

View wmakeev's full-sized avatar
💭
💻

Makeev Vitaliy wmakeev

💭
💻
View GitHub Profile
@wmakeev
wmakeev / README.md
Created August 17, 2018 15:00
Беспроводная кнопка #DIY #button

Беспроводная кнопка

@wmakeev
wmakeev / index.js
Last active September 5, 2018 15:13
Дублирование имен документов #moysklad #bug #support
'use strict'
const fetch = require('node-fetch')
const Moysklad = require('moysklad').compose(require('moysklad-extension-queue'))
const ms = Moysklad({
fetch,
login: process.env.MOYSKLAD_LOGIN,
password: process.env.MOYSKLAD_PASSWORD,
queue: true
@wmakeev
wmakeev / api-lambda.json
Last active October 19, 2019 09:59
AWS messages #aws #sns #lambda #events
{
"resource": "/{proxy+}",
"path": "/path",
"httpMethod": "GET",
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7",
"CloudFront-Forwarded-Proto": "https",
"CloudFront-Is-Desktop-Viewer": "true",
@wmakeev
wmakeev / webpack-babel.md
Last active June 24, 2022 21:16
Webpack + (Babel / TS) setup #webpack #babel #typescript #setup #tslint #standard

Webpack + Babel

Babel

npm i @babel/polyfill
npm i -D @babel/cli @babel/core @babel/preset-env

babel.config.js

@wmakeev
wmakeev / writeCsvRecords.js
Last active October 12, 2023 17:55
Highland.js #highland #stream #csv
import path from "node:path";
import _H from "highland";
import { stringify } from "csv-stringify";
import { createWriteStream } from "node:fs";
import { writeFile } from "node:fs/promises";
/**
* @param {string} targetFolderPath
* @param {string} fileName
* @param {Record<string, unknown>[]} records
@wmakeev
wmakeev / 01-install_gcloud_ubuntu.sh
Last active December 26, 2018 14:36
Google Cloud #google #cloud #automl
# https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
# Create environment variable for correct distribution
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
# Add the Cloud SDK distribution URI as a package source
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
@wmakeev
wmakeev / LINUX_SETUP.md
Last active February 27, 2024 01:53
Git via SSH #git #ssh #bitbucket #codecommit

Setup latest git version on Linux Mint

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
git --version
@wmakeev
wmakeev / buildQueryString.js
Created January 6, 2019 10:11
Build query string #browser #js #querystring
function buildQueryString (params) {
return Object.keys(params)
.map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k]))
.join('&')
}
@wmakeev
wmakeev / README.md
Last active January 22, 2019 13:52
Highland.js + ImageMagick #highland #imagemagick #stream

Highland.js + ImageMagick

Create large collage with Higland.js and ImageMagick

@wmakeev
wmakeev / server.js
Created January 24, 2019 09:36
Express.js bootstrap #express #server
'use strict'
const path = require('path')
const express = require('express')
const favicon = require('serve-favicon')
const bodyParser = require('body-parser')
const publicPath = p =>
path.resolve(__dirname, path.join('../../public', p))