Skip to content

Instantly share code, notes, and snippets.

View iztsv's full-sized avatar
🐢
...

ztsv iztsv

🐢
...
  • Siberia, Novosibirsk
View GitHub Profile
@gabydd
gabydd / config.toml
Last active March 1, 2025 18:06
helix lf
[keys.normal]
C-f = [":new", ":insert-output lf-pick", "split_selection_on_newline", "goto_file", "goto_last_modification", "goto_last_modified_file", ":buffer-close!", ":theme nord", ":theme default"]
# replace the default after theme with the theme you use
# open 1 with the open command (l and <left> to open) or more with (<space> to select) then quit
# all opened files will be opened in helix

Принципы разработки Амплифера

Тут перечислены не законы, последние слово всегда за здравым смыслом. Тут перечислены лишь направление, куда надо стремиться. Принципы, которые должны помочь, когда не знаешь, что выбрать.

Ценности

  1. Пользователь. Если что-то сильно мешает UX или есть критическая ошибка, то в первую очередь мы спасаем пользователей. Для этого иногда надо взять ответственность на себя, переубедить толпу, написать плохой код.
@KRostyslav
KRostyslav / tsconfig.json
Last active May 3, 2025 13:15
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".
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 12, 2025 09:18
crack activate Office on mac with license file
@CMCDragonkai
CMCDragonkai / babel-polyfill vs transform-runtime.md
Last active January 8, 2024 16:45
Babel-Polyfill vs Babel-Transform-Runtime

https://babeljs.io/docs/usage/polyfill/ vs https://babeljs.io/docs/plugins/transform-runtime

The main difference is that polyfill works for all polyfills but must be installed as a production dependency. And you need to use import 'babel-polyfill'; to make it work. And it will pollute the global scope.

The transform-runtime provides many of the same features, but won't provide special functions like array.includes() or array.values(). So it's safer to use inside a library.

If you're building an app, you can use babel-polyfill. If you're building a library, make sure not to use babel-polyfill, and only the transform-runtime.

You'll need to find alternatives for implementing any of the functions like array.includes or array.values().

export function fileExists(filePath: string) {
return fs.existsSync(filePath);
}
export function readFile(filePath: string) {
return fs.readFileSync(filePath).toString();
}
export function writeFile(filePath: string, contents: string, silent = false) {
filePath = path.normalize(filePath);
// Source of https://www.npmjs.com/package/physical-cpu-count
'use strict'
const os = require('os')
const childProcess = require('child_process')
function exec (command) {
const output = childProcess.execSync(command, {encoding: 'utf8'})
return output
@ncochard
ncochard / babel-webpack.md
Last active April 2, 2025 18:22
The correct way to compile ES6 using babel...

When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:

  1. Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
  2. Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
  3. Is it going to be used as a dependency to a browser application (always bundled)?.
  • In cases 2) and 3) you want to allow for tree shaking.
  • In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
  • In case 3) you also want to benefit from the native support of "ES6" from your browser.
@maierru
maierru / OTP
Last active December 13, 2019 13:10
Phoenix (elixir) highload optimization
# Move erts IO Polling to dedicated threads
# https://github.com/erlang/otp/pull/1552