Skip to content

Instantly share code, notes, and snippets.

View shershen08's full-sized avatar

Mikhail Kuznetcov shershen08

View GitHub Profile
@shershen08
shershen08 / syllabus.md
Last active March 2, 2024 11:28
Frontend and API Performance '24

Course title: Frontend and API Performance

Course covering on all technologies for modern web development with focus on performance.

Author: Mikhail Kuznetcov

Lessons:

  1. Introduction to web performance
  • Course intro | CRP | Web vitals | Tools
@shershen08
shershen08 / samples.js
Created January 20, 2024 11:46
Performance course v1 code samples
/**************
Lecture 1
/**************/
/**************
Lecture 2
/**************/
/**************
Lecture 3
@shershen08
shershen08 / jl.sh
Last active January 18, 2024 20:35
fix ts-node not installed error
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -z "$NODE_PATH" ]; then
export NODE_PATH="<some_path>common/cli/node_modules:<some_path>common/node_modules:<some_path>node_modules:<some_path>/node_modules:<some_path>node_modules:/Users/node_modules:/node_modules:<some_path>Library/pnpm/global/5/.pnpm/node_modules"
else
@shershen08
shershen08 / django+webpack.md
Created July 8, 2020 10:46
Примерная схема как настроить django+webpack

Примерная схема как настроить django+webpack

Есть 2 основных варианта

  1. собирать webpack-ом файлы как статику (простой)
  2. разделить фронтенд и бэкенд (сложнее)

Мы пока будем использовать 1-ый вариант и можно будет перейти на 2-ой после docker и spa. Но если вы сразу настроите 2-ой вариант будет супер

Это пример сложной настройки https://www.digitalocean.com/community/tutorials/how-to-build-a-modern-web-application-to-manage-customer-information-with-django-and-react-on-ubuntu-18-04-ru

@shershen08
shershen08 / INTERESTING-PETS.md
Last active March 31, 2023 12:36
Non-trivial pet-projects
@shershen08
shershen08 / gist:90e1a8c70a9944bc783c348f538172e8
Created March 16, 2023 17:27
Vuex и стейт менеджеры
Vuex (~Redux), 2017
-----
- общее дерево стейта
Actions
Mutations
Actions -> Mutations
Component -> Mutations
@shershen08
shershen08 / gist:2cce44ee1af11c76b6fb0923f1098320
Last active March 15, 2023 18:14
otus-practical-project.md
## Варианты:
- повторить известное приложение или из предложенного списка (например игру или IG или что то еще) - UI/UX
- задачи из рабочего проекта (часть страниц сущ приложения / новое приложение) - ..
- pet-project (Saas, geo-chat) - UI/UX
- новая технология (gRPC, websockets, ...) - ...
##Этапы:
- введение
@shershen08
shershen08 / demo.js
Created November 17, 2022 19:40
fetch examples
// fetch('https://jsonplaceholder.typicode.com/posts/1')
// .then(response => response.json())
// .then(json => console.log(json))
// fetch('https://jsonplaceholder.typicode.com/todos/1')
// fetch('https://jsonplaceholder.typicode.com/todos/1', {
// headers: {},
// method: 'POST',
@shershen08
shershen08 / typescript-strategy-and-factory-patterns.ts
Last active October 19, 2022 17:08
Strategy and factory patterns in TypeScript
// see article with examples in JAVA here: https://dzone.com/articles/design-patterns-the-strategy-and-factory-patterns
// example for educational purposes shownig close and mature syntax of modern TypeScript
enum AccountTypes {CURRENT, SAVINGS, HIGH_ROLLER_MONEY_MARKET, STANDARD_MONEY_MARKET}
////////////////////////////////////////
/// the interface that is used by the strategy
////////////////////////////////////////
interface InterestCalculationStrategy {
Создать Vue приложение с даннýми
links: [/* any url */]
● Сделатþ компонент my-link, которýй полуùает
свойство url и вýводит ÿлемент
<a href="...">...</a>
● Напиúите в ùат / приúлите ссýлку
https://codesandbox.io/s/nifty-dream-22vqf3?file=/src/App.vue