with this async generator queue, you could make sure the tasks given are run with at a maximum concurrency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { createIconSet } from '@expo/vector-icons'; | |
import Untyped_FontAwesome6 from '@expo/vector-icons/FontAwesome6'; | |
import type { FA6Style } from '@expo/vector-icons/build/FontAwesome6'; | |
import type { ComponentProps, ReactNode } from 'react'; | |
type FA6Variant = keyof typeof FA6Style; | |
type IconComponent = ReturnType<typeof createIconSet<string, string>>; | |
const FontAwesome6: IconComponent = Untyped_FontAwesome6; | |
export const Icon = ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useSignal } from "@preact/signals"; | |
import { useEffect } from "preact/hooks"; | |
export const PartialLoadingBar = () => { | |
const loadState = useSignal<"loading" | "loaded" | "not-loading">( | |
"not-loading", | |
); | |
useEffect(() => { | |
const onBeforePartialFetch = () => { | |
loadState.value = "loading"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type KeysOfUnion<T> = T extends T ? keyof T : never; | |
export type ExclusiveUnion<T> = KeysOfUnion<T> extends | |
infer K extends PropertyKey | |
? T extends infer A ? A & Partial<Record<Exclude<K, keyof A>, never>> | |
: never | |
: never; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun <T> rerenderable( | |
beforeRerender: () -> Unit = {}, | |
block: @Composable (rerender: () -> Unit) -> T, | |
): () -> Unit { | |
var id by remember { mutableStateOf(0) } | |
val rerender = { | |
beforeRerender() | |
id += 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.fishball.taskshuffle.ui.components.contextless | |
import androidx.compose.foundation.lazy.LazyItemScope | |
import androidx.compose.foundation.lazy.LazyListScope | |
import androidx.compose.foundation.lazy.itemsIndexed | |
import androidx.compose.runtime.Composable | |
inline fun <T> LazyListScope.itemsWithDivider( | |
items: List<T>, | |
noinline divider: (@Composable LazyItemScope.(left: T, right: T) -> Unit), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"printWidth": 100, | |
"semi": true, | |
"singleQuote": true, | |
"trailingComma": "all", | |
"arrowParens": "avoid" | |
} |
Time | Events |
---|---|
50 million years ago | The Giant’s Causeway was formed. Located on the north-east coast of Northern Ireland, the Giant’s Causeway is a land formation of columns made from volcanic lava. |
This is an on-going list of things that I constantly find missing in Safari, (and possibly ways to work around them)
I cannot believe my eyes when positive/negative lookbehind is still not available on safari. Here is how you can work around it:
Instead of
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const routes = [ | |
{ | |
path: '/', | |
element: <App />, | |
errorElement: <CircularProgress />, | |
children: [ | |
{ | |
index: true, | |
element: <LandingPage />, | |
}, |
NewerOlder