Skip to content

Instantly share code, notes, and snippets.

View gormonn's full-sized avatar
🎯
Focusing

Dmitriy Chernukho gormonn

🎯
Focusing
View GitHub Profile
@zerkalica
zerkalica / readme.md
Last active June 16, 2024 12:26
Заметки о tsconfig

Признаки хорошо настроенного tsconfig

Все нижеперечисленное справедливо в основном для монорепы. В проектах, где используются алиасы в импортах между либами и все зависимости в инклудах, алгоритмы упрощаются и кол-во проблем должно быть меньше.

Надо проверять работу и в vscode и в webstorm, т.к. у последнего, поверх алгоритма tsserver, накладываются свои алгоритмы автоимпортов модулей. То, что работает в webstorm, может не работать в других ide, которые полагаются только на tsserver.

tsconfig считается настроенным, если:

  1. Проходит сборка через tsc --build для либ и webpack для приложух
  2. Чекаются типы в ide и tsc --noEmit, в том числе, в файлах, которые не попадают в сборку: тесты, storybook-файлы

Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!

Four things needed overall:

  1. you need WSL2, not WSL1
  2. you need node, of course, and that part isn't so bad
  3. you need to apt install several dependencies
  4. you need an X Server so it can display the electron GUI over in Windows-land

Setup instructions, in order:

@Chudesnov
Chudesnov / effector.md
Last active February 13, 2024 17:53 — forked from ilyalesik/effector.md
Article "Why did I choose Effector instead of Redux or MobX?"

Effector is a brand new reactive state manager. Its ambitious team aims to solve all the problems that existing solutions have. Writing the core of the library from scratch took several attempts across six months, and recently the team released the first stable release.

In this article, I will show why I prefer using Effector for my new projects instead of other state managers. Let's get started with the Effector API.

Basics

Effector uses two concepts you might already be familiar with: store and event.

A store is an object that holds some value. We can create stores with the createStore helper:

import {createStore} from 'effector'
@andyearnshaw
andyearnshaw / README.md
Last active April 12, 2024 09:39
css-proposal-virtual-scrolling

Abstract

Virtual Scrolling is a technique employed by web developers to achieve efficient rendering of components containing large datasets, without creating many thousands or millions of elements that the browser must render and keep in memory. It can also be used to scroll an element which is otherwise unscrollable, because it cannot be overflowed by children in its normal state.

Use cases

  • HTML canvas element scrolling. Canvases have no overflow, so you either have to have a very big canvas that
@bogdan-kulynych
bogdan-kulynych / install-cuda-10-bionic.sh
Last active December 5, 2023 10:26
Install CUDA 10 on Ubuntu 18.04
# WARNING: These steps seem to not work anymore!
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
@KRostyslav
KRostyslav / tsconfig.json
Last active June 23, 2024 17:44
tsconfig.json с комментариями.
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".
@flpvsk
flpvsk / recorderWorkletProcessor.js
Last active March 22, 2024 06:28
An example of a recorder based on AudioWorklet API.
/*
A worklet for recording in sync with AudioContext.currentTime.
More info about the API:
https://developers.google.com/web/updates/2017/12/audio-worklet
How to use:
1. Serve this file from your server (e.g. put it in the "public" folder) as is.
@llamapope
llamapope / install.md
Last active February 2, 2023 18:15
Setup XBox 360 Kinect with Processing 3 Ubuntu 16.04

Install Kinect Drivers (tested with Stable-1.5.7.10)
https://github.com/OpenNI/OpenNI/releases

sudo ./install.sh

Or maybe...

sudo apt-get install libfreenect libfreenect-dev libfreenect-demos
# test with

freenect-glview

@sonots
sonots / nvvp.md
Last active July 3, 2024 21:43
How to use NVIDIA profiler

Usually, located at /usr/local/cuda/bin

Non-Visual Profiler

$ nvprof python train_mnist.py

I prefer to use --print-gpu-trace.

@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active July 8, 2024 10:04
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub