Skip to content

Instantly share code, notes, and snippets.

View ckomop0x's full-sized avatar
:octocat:
Life developer

Pavel Klochkov ckomop0x

:octocat:
Life developer
View GitHub Profile
@pjobson
pjobson / setup_cypress_wsl2.md
Last active March 8, 2024 08:08
Setting Up Cypress on Ubuntu WSL2

With GitHub Actions, a workflow can publish artifacts, typically logs or binaries. As of early 2020, the life time of an artifact is hard-coded to 90 days (this may change in the future). After 90 days, an artifact is automatically deleted. But, in the meantime, artifacts for a repository may accumulate and generate mega-bytes or even giga-bytes of data files.

It is unclear if there is a size limit for the total accumulated size of artifacts for a public repository. But GitHub cannot reasonably let multi-giga-bytes of artifacts data accumulate without doing anything. So, if your workflows regularly produce large artifacts (such as "nightly build" procedures for instance), it is wise to cleanup and delete older artifacts without waiting for the 90 days limit.

Using the Web page for the "Actions" of a repository, it is possible to browse old workflow runs and manually delete artifacts. But the procedure is slow and tedious. It is fine to delete one selected artifact. It is not for a regular cleanup. We need

@slikts
slikts / advanced-memo.md
Last active April 27, 2024 02:40
Advanced memoization and effects in React

nelabs.dev

Advanced memoization and effects in React

Memoization is a somewhat fraught topic in the React world, meaning that it's easy to go wrong with it, for example, by [making memo() do nothing][memo-pitfall] by passing in children to a component. The general advice is to avoid memoization until the profiler tells you to optimize, but not all use cases are general, and even in the general use case you can find tricky nuances.

Discussing this topic requires some groundwork about the technical terms, and I'm placing these in once place so that it's easy to skim and skip over:

  • Memoization means caching the output based on the input; in the case of functions, it means caching the return value based on the arguments.
  • Values and references are unfortunately overloaded terms that can refer to the low-level implementation details of assignments in a language like C++, for example, or to memory
@novascreen
novascreen / README.md
Last active November 18, 2021 08:11
How to mock next/router in Storybook

If you use Storybook with Next.js and have components using next/link you'll have to mock next/router the same you would for testing with Jest or others. Simply create a file with the mock router as shown below and import it in your Storybook config.

This is based on some information from an issue on Next.js:

vercel/next.js#1827

@ArtDanshin
ArtDanshin / features&keys.md
Last active September 6, 2019 12:50
Как перестать бояться и начать использовать WebStorm - Клавиши и фичи

Ссылка на вебинар: JetBrains: https://youtu.be/Ozt8pBq9Mys

Навигация:

  • cmd + e - Список последний табов/окон, в которых производились действия. Если начать вбивать название, то будут находиться совпадения
  • cmd + вверх - Бар с навигацией по пути файла в проекте
    • При хождении по навигации можно нажимать комбинации, например cmd + n для создания файла

Отображение