Skip to content

Instantly share code, notes, and snippets.

View corocoto's full-sized avatar
👨‍💻
creates something cool

Artem Gusev corocoto

👨‍💻
creates something cool
View GitHub Profile
@sebmarkbage
sebmarkbage / The Rules.md
Last active March 23, 2026 03:02
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@apieceofbart
apieceofbart / test.js
Created February 21, 2018 13:15
mock lodash debounce in jest
// somewhere on top
import _ from 'lodash';
jest.unmock('lodash');
// then
_.debounce = jest.fn((fn) => fn);
@EtsuNDmA
EtsuNDmA / fork_sync.md
Last active February 5, 2025 12:09
Синхронизация форка репозитория с исходным репозиторием

Привет, дорогой друг!

Если ты здесь, то видимо ты обучаешься на курсе Data Mining in Action. Должно быть ты уже заметили, что материалы курса выкладываются в этом репозитории. Сейчас я расскажу тебе один из способов, как всегда иметь под рукой его свежую версию.

Если какие-то шаги уже выполнены, просто пропусти их.

  1. Чтобы получить себе копию репозитория курса, нужно сделать fork исходного репозитория repo_fork

  2. Теперь клонируем репозиторий к себе на компьютер, выполнив в консоли команду:

@strothj
strothj / LICENSE
Last active March 30, 2024 11:35
ResizeObserver TypeScript definition
Copyright 2020 Jason Strothmann
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@andreasonny83
andreasonny83 / .gitignore
Last active December 15, 2025 18:31
Gitignore template for JavaScript projects
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Runtime data
pids
*.pid
@akella
akella / setup.md
Last active December 26, 2025 12:03
Мой сетап

То что я использую в работе и стримах

Софт для разработки

@stereokai
stereokai / index.css
Created June 18, 2017 11:03
Trigonometry in CSS
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
@joyrexus
joyrexus / README.md
Last active February 23, 2026 21:18
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
/**
* Validates hex value
* @param {String} color hex color value
* @return {Boolean}
*/
function isValidHex(color) {
if(!color || typeof color !== 'string') return false;
// Validate hex values
if(color.substring(0, 1) === '#') color = color.substring(1);
@carl0zen
carl0zen / styled-components-mixin-example.jsx
Last active December 8, 2021 05:51
Styled Components Mixin example
// Mixin like functionality
const textInput = props => `
color: ${props.error ? color.white : color.base};
background-color: ${props.error ? color.alert : color.white};
`;
export const Input = styled.input`
${textInput}
`;