Skip to content

Instantly share code, notes, and snippets.

View shakhzodkudratov's full-sized avatar
🙇‍♂️
deep into cli

Shakhzod Kudratov shakhzodkudratov

🙇‍♂️
deep into cli
View GitHub Profile
@shakhzodkudratov
shakhzodkudratov / unref-all-refs.tsx
Created July 26, 2024 15:12
unref all refs safely
import type { RefObject } from "react";
type UnrefType<T> = T extends RefObject<infer RT> ? RT : never;
type UnrefTuple<Tuple extends [...unknown[]]> = {
[Index in keyof Tuple]: UnrefType<Tuple[Index]>;
} & { length: Tuple["length"] };
type FnRet = void | Promise<void>;
export function getRefs<T extends [...RefObject<unknown>[]]>(
@shakhzodkudratov
shakhzodkudratov / keybase.md
Created December 21, 2023 13:02
keybase.md

Keybase proof

I hereby claim:

  • I am shakhzodkudratov on github.
  • I am shakhzodkudratov (https://keybase.io/shakhzodkudratov) on keybase.
  • I have a public key whose fingerprint is D388 4ED5 F00C 62CE E1B3 5DEA A29C 0F92 0936 E9DE

To claim this, I am signing this object:

@shakhzodkudratov
shakhzodkudratov / 0. docker compose django simplification
Last active January 2, 2023 22:07
Django Docker Compose command simplification
---

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@shakhzodkudratov
shakhzodkudratov / base-rem-converter.js
Created January 9, 2022 01:31
convert base font-size: 10px; rem to base font-size: 16px; rem
code = `` // put your code here
index = 0
while (index > -1) {
regex = /(\d+|\d*\.\d+)rem/g
result = regex.exec(code.slice(index))
if (result == null) {
index = -1
@shakhzodkudratov
shakhzodkudratov / Navigator.vue
Last active March 16, 2021 06:50
Nuxt.js/Vue.js Bootstrap navigation generator
<!--
How to use:
<navigator :data="[
{
type: 'link',
link: URL, // required
label: String, // required
icon: BootstrapIcon, // optional, https://bootstrap-vue.org/docs/icons
external: Boolean, // optional, <a> if external, else <nuxt-link>