Skip to content

Instantly share code, notes, and snippets.

View CompileConnected's full-sized avatar

Yohanes CompileConnected

  • Indonesia, Tangerang Selatan
View GitHub Profile
@CompileConnected
CompileConnected / agent loop
Created March 10, 2025 14:41 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@CompileConnected
CompileConnected / embedded-file-viewer.md
Created February 18, 2024 15:03 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@CompileConnected
CompileConnected / JetpackComposeView.kt
Created October 12, 2023 04:11 — forked from andrew-levy/JetpackComposeView.kt
JetpackComposeViewModule
package expo.modules.jetpackcomposeview
import android.content.Context
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.*
@CompileConnected
CompileConnected / App.kt
Created September 11, 2023 15:52
This is how to implement Koin Viewmodel using Moco ViewModel + Voyager Navigation targeted for KMM Composables
@Composable
fun App(
darkTheme: Boolean,
dynamicColor: Boolean,
nativeModules: List<Module> = listOf(), //i usually not using this, but other can try :D
) {
AppTheme(
darkTheme = darkTheme,
dynamicColor = dynamicColor
) {
@CompileConnected
CompileConnected / ball.a
Created September 12, 2022 18:43
Bouncing ball with color changing (try to smooth the transition)
10 REM GRAPHICS MODE!
20 GR
30 REM POSITION AND VELOCITY
40 X = 20 : Y = 20 : VCLR = 1: C = 0
50 VX = RND(1) * 3 : VY = RND(1) * 3
70 REM ERASE PREVIOUS BALL
80 GOSUB 4000
90 PLOT PX, PY
@CompileConnected
CompileConnected / MutableLiveDataExtensions.kt
Last active September 22, 2021 09:40
SingleLiveEvent.kt
fun <T> MutableLiveData<Resource<T>>.set(state: State, data: T? = null, message: String? = null) =
postValue(Resource(state, data, message))
fun <T> MutableLiveData<Resource<T>>.setSuccess(data: T?) =
set(State.SUCCESS, data)
fun <T> MutableLiveData<Resource<T>>.setLoading() =
set(State.LOADING, value?.data)
@CompileConnected
CompileConnected / ShowMoreClickable.kt
Created March 10, 2021 12:42
Make show/hide TextView
fun TextView.showMoreClickable(
showText: String = "Show More",
hideText: String = "Show Less",
showTextClickListener: View.OnClickListener? = null,
hideTextClickListener: View.OnClickListener? = null,
hideCharacterAtEndOf: Int = 200,
hideCharacterAtEndLineOf: Int = 3
) {
this.doOnPreDraw {
@CompileConnected
CompileConnected / ContextCompatExtensions.kt
Created September 13, 2020 17:26
Android Extenstions
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.drawable.Drawable
import androidx.core.content.ContextCompat
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.appcompat.content.res.AppCompatResources
@CompileConnected
CompileConnected / AppStorage.kt
Created September 4, 2020 17:57
A wrapper to shared preference that has already gone to big
class AppStorage : CoreLocalStorage.Child {
private lateinit var parent: CoreLocalStorage
companion object {
private const val FOS = "fos"
private const val ROH = "roh"
private const val DAA = "daa"
}
@CompileConnected
CompileConnected / toDeferred.kt
Last active August 8, 2020 15:44
GraphQLExtensions
import com.apollographql.apollo.api.Response
import com.apollographql.apollo.GraphQLCall
import com.apollographql.apollo.exception.ApolloException
import kotlinx.coroutines.CompletableDeferred
suspend fun <T> GraphQLCall<T>.toDeferred(): Response<T> {
val deferred = CompletableDeferred<Response<T>>()
deferred.invokeOnCompletion {