Skip to content

Instantly share code, notes, and snippets.

View OrkhanAlikhanov's full-sized avatar
Be mindful of your Creator! We all will die soon...

Orkhan Alikhanov OrkhanAlikhanov

Be mindful of your Creator! We all will die soon...
View GitHub Profile
View eslint-plugin-react-hooks+4.6.0.patch
diff --git a/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js b/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js
index 441442f..a536c7a 100644
--- a/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js
+++ b/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js
@@ -735,7 +735,29 @@ var ExhaustiveDeps = {
enableDangerousAutofixThisMayCauseInfiniteLoops: {
type: 'boolean'
- }
+ },
slikts /
Last active November 14, 2023 11:22
Why using the `children` prop makes `React.memo()` not work

Why using the children prop makes React.memo() not work

I've recently ran into a pitfall of [React.memo()][memo] that seems generally overlooked; skimming over the top results in Google just finds it mentioned in passing in a [React issue][regit], but not in the [FAQ] or API [overview][react-api], and not in the articles that set out to explain React.memo() (at least the ones I looked at). The issue is specifically that nesting children defeats memoization, unless the children are just plain text. To give a simplified code example:

const Memoized = React.memo(({ children }) => (<div>{children}</div>));
// Won't ever re-render
// Will re-render every time; the memoization does nothing
ccwasden / WithPopover.swift
Created February 5, 2020 13:39
Custom size popover in iOS SwiftUI
View WithPopover.swift
// -- Usage
struct Content: View {
@State var open = false
@State var popoverSize = CGSize(width: 300, height: 300)
var body: some View {
showPopover: $open,
popoverSize: popoverSize,
procrastinatio /
Created October 25, 2017 06:04
Rate limiting with HAproxy


So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])

roylee0704 /
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref:
stefanbuck /
Last active November 26, 2023 12:40
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
# Author: Stefan Buck
# License: MIT
# This script accepts the following parameters:
# * owner
ericclemmons /
Last active November 8, 2023 18:03
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

 Summary Goes Here
philipstanislaus / sane-caching.nginx.conf
Last active November 4, 2023 18:52
Sample Nginx config with sane caching settings for modern web development
View sane-caching.nginx.conf
# Sample Nginx config with sane caching settings for modern web development
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
kinichiro / 1_Hello_libtls
Last active October 2, 2023 14:56
Hello libtls - libressl libtls API sample program
View 1_Hello_libtls
Hello libtls - libressl libtls API sample program
mondain / public-stun-list.txt
Last active November 30, 2023 01:06
Public STUN server list
View public-stun-list.txt