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
@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active April 19, 2025 04:48
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
@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)
@zach-klippenstein
zach-klippenstein / Blockify.kt
Last active March 22, 2024 21:47
A Compose modifier to turn your apps into blocks (no, this has nothing to do with NFTs)
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.spring
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectDragGestures
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.integration.demos.BlockFilter.Companion.Lighting
@chrisbanes
chrisbanes / code.kt
Last active August 10, 2023 10:46
Night Mode inflater
/*
* Copyright 2017 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@augbog
augbog / Free O'Reilly Books.md
Last active March 20, 2025 07:40
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@pebbie
pebbie / glosarium.py
Created May 27, 2016 10:50
database glossarium.db unduh di https://goo.gl/rKb4EB
# -*- coding: utf-8 -*-
"""
Aplikasi Glosarium Bahasa Inggris - Bahasa Indonesia
ditulis ulang berdasarkan data dari aplikasi Glosarium versi Pusat Bahasa (Windows only) thn 2006
oleh Peb Ruswono Aryan (2016)
bergantung pada paket : PySide
"""
@nickbutcher
nickbutcher / 1_drawable_ic_hash_io16.xml
Last active June 16, 2020 19:28
Animated Stroke. The google I/O website this year (https://google.com/io) has some funky animated lettering. I especially liked the animated stroke around the letters and wondered how you might implement that on Android. Turns out that AnimatedVectorDrawable makes this very easy! Here's how it looks: https://twitter.com/crafty/status/71077957997…
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@jamtur01
jamtur01 / ladder.md
Last active February 17, 2025 09:09
Kickstarter Engineering Ladder
@harlow
harlow / golang_job_queue.md
Last active March 29, 2025 04:55
Job queues in Golang