Skip to content

Instantly share code, notes, and snippets.

View zmts's full-sized avatar
🇺🇦
russian warship go f*uck yourself

Sasha Zmts 🇺🇦 zmts

🇺🇦
russian warship go f*uck yourself
View GitHub Profile
@zmts
zmts / 1.md
Last active April 18, 2020 11:54

Есть такой закон систем: ни одна сложная система, которая работает, не может быть создана с нуля; все сложные системы, которые работают, «вырастают» из простых систем, которые работают.

https://t.me/ProductsAndStartups/104

@zmts
zmts / Knex_create_table_if_not_exists.md
Created March 22, 2019 10:33
Knex: create table if not exists

Knex: Create table if not exists

const Knex = require('knex')
const config = require('./config')
const knex = Knex(config.knex)

async function createSchema () {
  const hasTable = await knex.schema.hasTable('videoRequests')
 if (!hasTable) {
@zmts
zmts / seo_links.md
Created March 21, 2019 16:04
SEO & ЧПУ
@zmts
zmts / vue_nginx.md
Last active September 26, 2024 14:44
Deploy Vue.js on custom route via NGINX

Deploy Vue.js on custom route via NGINX

Необходимо реализовать такой роутинг через NGINX

  • /a/* (user dashboard, SPA/Vue.js)
  • /* (все кроме /a/* тулит на proxy pass в Nuxt SSR)

Конфиг NGINX'a

map $sent_http_content_type $expires {
    "text/html" epoch;
@zmts
zmts / ssr.md
Last active March 7, 2019 13:41
Как найти компонент который ломает SSR через обращение к window

Q: Как найти компонент который ломает SSR через обращение к window

A: При создании глобального контекста создайте global.window и положите в него прокси, который при обращении к любому полю будет генерировать стектрейс и выводить его в консоль

@zmts
zmts / HomebrewSpecificFormula.md
Last active June 9, 2022 19:28
Homebrew Install Specific Version of Formula
@zmts
zmts / homebrew_nginx_El_Capitan.md
Last active March 1, 2019 16:27
Homebrew nginx El Capitan
@zmts
zmts / nginx_El_Capitan.md
Last active March 1, 2019 16:29
NGINX OS X El Capitan

Install NGINX OS X El Capitan (from sources)

https://kevinworthington.com/nginx-for-mac-os-x-el-capitan-in-2-minutes/

#!/bin/bash

# Build Nginx 1.9.6 on Mac OS X El Capitan (10.11)
# This script was created by Kevin Worthington - http://kevinworthington.com/ - 07 November 2015
# Original article at: http://kevinworthington.com/nginx-for-mac-os-x-el-capitan-in-2-minutes/
@zmts
zmts / stripes.md
Created February 12, 2019 12:07
Stripes in CSS

Stripes in CSS

background: repeating-linear-gradient(
  45deg,
  #606dbc,
  #606dbc 10px,
  #465298 10px,
  #465298 20px
);
@zmts
zmts / debounce.md
Created February 11, 2019 14:18
Vue.js: lodash debounce

Vue.js: Lodash debounce

<input v-on:input="debounceInput">

methods: {
  debounceInput: _.debounce(function (e) {
    this.filterKey = e.target.value;
  }, 500)
}