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
@victor-homyakov
victor-homyakov / links - dead code elimination.md
Last active August 12, 2025 19:38
Ссылки для презентации "Удаление мертвого кода в проекте: практическое руководство" HolyJS 2025
@Danetag
Danetag / useMyAwesomeHook.specs.tsx
Last active October 11, 2024 15:30
Testing a React hook with a redux store
import React from 'react';
import { renderHook } from '@testing-library/react-hooks';
import stateFactory from 'jest/stateFactory';
import configureMockStore from 'redux-mock-store';
import { Provider } from 'react-redux';
import { Store, AnyAction } from 'redux';
import { initialState as initialPaginationState } from '../../store/pagination/reducer';
import { useMyAwesomeHook } from '../useMyAwesomeHook';
@tkadlec
tkadlec / perf-diagnostics.css
Last active March 20, 2025 08:41
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@GGrassiant
GGrassiant / A. useResize.md
Created September 19, 2020 19:45
useResize

useResize custom hook.

Custom hook as per Sophie Alpert on StackOverflow function that returns the height and width on each update of the window

@justincy
justincy / README.md
Last active July 16, 2025 21:40
Configure Storybook to work with Next.js, TypeScript, and CSS Modules

In addition to the Storybook for React setup, you'll also need to install these packages:

npm i -D @babel/core babel-loader css-loader style-loader
@pylnata
pylnata / RecipeItem.js
Last active April 3, 2023 02:59
Jest+Enzyme example unit test with SHALLOW for React component using useEffect and (useDispatch, useSelector) hooks
import React from "react";
export const Recipeitem = (props) => {
return (<div>
{props.title}
</div>)
}
@pedrouid
pedrouid / webcrypto-examples.md
Created December 15, 2018 01:07
Web Cryptography API Examples
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active December 4, 2025 10:03
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active November 7, 2025 05:29
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
// POLYFILLS
// Event.composedPath
// Possibly normalize to add window to Safari's chain, as it does not?
(function(E, d, w) {
if(!E.composedPath) {
E.composedPath = function() {
if (this.path) {
return this.path;
}
var target = this.target;