Skip to content

Instantly share code, notes, and snippets.

View koshiera's full-sized avatar
💭
I may be slow to respond.

Kvint koshiera

💭
I may be slow to respond.
View GitHub Profile
@koshiera
koshiera / camelToKebab.ts
Created May 14, 2024 16:42 — forked from albertms10/camelToKebab.ts
TypeScript type to convert camel-cased strings to kebab-cased
/**
* Converts the given string from camel-case to kebab-case.
* @template T The string to convert the case.
* @see https://gist.github.com/albertms10/09f14ef7ebdc3ce0e95683c728616253
* @example
* type Kebab = CamelToKebab<'exampleVarName'>;
* // 'example-var-name'
*/
type CamelToKebab<S extends string> = S extends `${infer T}${infer U}`
? U extends Uncapitalize<U>

Keybase proof

I hereby claim:

  • I am koshiera on github.
  • I am koshiera (https://keybase.io/koshiera) on keybase.
  • I have a public key ASCwCiTz0Q8zYTW-kCCgR5mZ2gxneo5VtaMK8YQwWhawgAo

To claim this, I am signing this object:

@koshiera
koshiera / rtkQueryCacheUtils.ts
Created June 28, 2022 15:04 — forked from Shrugsy/rtkQueryCacheUtils.ts
RTK Query cache utils. Useful abstractions for creating `provides`/`invalidates` cache data tags against endpoints.
import { FetchBaseQueryError } from '@rtk-incubator/rtk-query/dist';
/**
* Default tags used by the cacher helpers
*/
const defaultTags = ["UNAUTHORIZED", "UNKNOWN_ERROR"] as const;
type DefaultTags = typeof defaultTags[number];
function concatErrorCache<T, ID>(
existingCache: CacheList<T, ID>,
@koshiera
koshiera / react-native-fonts.md
Created January 22, 2021 08:42 — forked from parshap/react-native-fonts.md
Fonts in React Native

Fonts in React Native

Default Fonts

A number of fonts are available by default based on the platform (e.g., Roboto on Android, Helvetica on iOS). See the full list here.

@koshiera
koshiera / mac-setup-redis.md
Created August 20, 2020 11:19 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
{"lastUpload":"2020-08-15T12:24:28.107Z","extensionVersion":"v3.4.3"}