Skip to content

Instantly share code, notes, and snippets.

View hakimrie's full-sized avatar
:electron:
Focusing

Muhammad Hakim Asy'ari hakimrie

:electron:
Focusing
View GitHub Profile
@mrmans0n
mrmans0n / CompositeParameterProvider.kt
Created May 18, 2022 14:56
Simple example that allows you to add 2 PreviewParameterProviders to a Compose preview
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import kotlin.reflect.KClass
/**
* Creates a [PreviewParameterProvider] based on the classes of two existing providers.
*
* You can create your own easily with Kotlin delegation:
* ```
* class ExampleProvider : PreviewParameterProvider<Pair<Type1, Type2>>
* by compositeProvider(Type1ParameterProvider::class, Type2ParameterProvider::class)
@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active July 10, 2025 14:51
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times