Skip to content

Instantly share code, notes, and snippets.

View neyasbltb88's full-sized avatar
🥉
Javascript developer

Denis Mashkov neyasbltb88

🥉
Javascript developer
View GitHub Profile
@neyasbltb88
neyasbltb88 / nginx_nodejs.md
Created November 19, 2019 19:12 — forked from tomasevich/nginx_nodejs.md
Сервер в связке Nginx + NodeJs

Сервер в связке Nginx + NodeJs

Данная пошаговая инструкция поможет освоить основы на простом примере

Для справки

Сервер поднимался на Debian 8 c характеристиками:

CPU - 1 ядро x 500 МГц

<?php
function join_paths(...$paths) {
return preg_replace('~[/\\\\]+~', DIRECTORY_SEPARATOR, implode(DIRECTORY_SEPARATOR, $paths));
}
@neyasbltb88
neyasbltb88 / review.md
Created August 7, 2019 21:12 — forked from m12sl/review.md
Speech APIs small review

[TOC]

Speech to text

Небольшое пояснение про данные:

$ soxi mix_<...>.mp3

Input File     : 'mix_<...>.mp3'
@neyasbltb88
neyasbltb88 / _extend.js
Created August 5, 2019 23:41
Рекурсивное объединение объектов
function _extend(to, from) {
var i;
var toStr = Object.prototype.toString;
var astr = '[object Array]';
to = to || {};
for (i in from) {
if (from.hasOwnProperty(i)) {
if (typeof from[i] === 'object') {
to[i] = (toStr.call(from[i]) === astr) ? [] : {};
const selectAll = x => [...document.querySelectorAll(x)]
console.log(`%c vue-devtools %c ${123} %c `, "background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff", `background: #3BA776; padding: 1px; border-radius: 0 3px 3px 0; color: #fff`, "background:transparent")
@neyasbltb88
neyasbltb88 / close-tab-from-js.js
Created June 27, 2019 16:57
Программное закрытие вкладки по клику на кнопку
function window_close() {
let nw = window.open('', '_self');
nw.close();
}
let btn = document.querySelector('.close');
btn.addEventListener('click', window_close);
export default class Utils {
static blob2base64(blob) {
return new Promise(resolve => {
let reader = new FileReader();
reader.onload = e => resolve(e.target.result);
reader.readAsDataURL(blob);
});
}
static StrBytes(str) {
@neyasbltb88
neyasbltb88 / gulpfile.js
Last active May 30, 2019 11:41
Простой шаблон Gulp + Webpack + Sass
const gulp = require('gulp'),
browserSync = require('browser-sync'),
livereload = require('gulp-livereload'),
sourcemaps = require('gulp-sourcemaps'),
del = require('del'),
webpack = require('webpack-stream'),
gulpif = require('gulp-if'),
Sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
cleanCSS = require('gulp-clean-css')
@neyasbltb88
neyasbltb88 / easing.js
Created May 4, 2019 14:24 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity