Skip to content

Instantly share code, notes, and snippets.

View jonnyzzz's full-sized avatar

Eugene Petrenko jonnyzzz

View GitHub Profile
@jonnyzzz
jonnyzzz / marinator-auto-download.patch
Created March 4, 2026 12:20
marninator build.sh auto-download repo zip patch for JetBrains/marinator issue #1
From effc7a249e6f3deedc1d566f671159ceeb4d8376 Mon Sep 17 00:00:00 2001
From: Eugene Petrenko <eugene.petrenko@jetbrains.com>
Date: Wed, 4 Mar 2026 13:19:41 +0100
Subject: [PATCH] build: auto-download IntelliJ repo zip when missing
---
README.md | 23 +++++++++++-------
build.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++----------
2 files changed, 74 insertions(+), 20 deletions(-)
@jonnyzzz
jonnyzzz / 1-SKILL.md
Created January 3, 2026 15:41
🎯 Lyra Prompt Optimizer - AI prompt engineering skill (2025) | Transform vague inputs into precision prompts
name description
lyra-prompt-optimizer
Master-level AI prompt optimization specialist that transforms vague user inputs into precision-crafted prompts. Use when users need help with prompt engineering, prompt improvement, prompt creation, optimizing prompts for AI models, or when they share a rough draft prompt and want it enhanced. Triggers include requests to "improve my prompt", "optimize this prompt", "help me write a better prompt", "rewrite this for Claude/GPT/Gemini", or any request involving prompt crafting and refinement.

Lyra: AI Prompt Optimization Specialist

Transform any user input into precision-crafted prompts that unlock AI's full potential.

Core Process

class OpenSSLContainer : GenericContainer<OpenSSLContainer>(
ImageFromDockerfile().withDockerfileFromBuilder { it
.from("ubuntu:20.04")
.env("DEBIAN_FRONTEND", "noninteractive")
.env("LC_ALL", "C.UTF-8")
.run("apt-get update && apt-get install -y openssl")
.run("openssl version")
//we need a running container to call `execInContainer` commands
.cmd("/bin/bash -c 'while true; do sleep 10; done'")
})
@jonnyzzz
jonnyzzz / build.gradle.kts
Last active November 11, 2020 12:24
Setup Micronaut with Kotlin
plugins {
java
kotlin("jvm") version "1.4.10"
kotlin("kapt") version "1.4.10"
id("org.jetbrains.kotlin.plugin.allopen") version "1.4.10"
id("io.micronaut.application") version "1.1.0"
}
micronaut {
version("2.1.3")
@jonnyzzz
jonnyzzz / Atomics.kt
Created June 9, 2020 16:25
Delegated Properties with Atomic References in Kotlin
class X
operator fun <Y> AtomicReference<Y>.getValue(x: Any?, p: KProperty<*>) : Y = this.get()
operator fun <Y> AtomicReference<Y>.setValue(x: Any?, p: KProperty<*>, value: Y) { this.set(value) }
val myStats by AtomicReference<X>(null)
import com.intellij.codeInsight.daemon.ProblemHighlightFilter
import com.intellij.concurrency.JobLauncher
import com.intellij.openapi.application.ReadAction
import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleManager
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ProjectCoreUtil
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithTests
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem
fun setupNative(name: String,
configure: KotlinNativeTargetWithTests.() -> Unit): KotlinNativeTargetWithTests {
val os = getCurrentOperatingSystem()
return when {
os.isLinux -> kotlin.linuxX64(name, configure)
os.isWindows -> kotlin.mingwX64(name, configure)
@jonnyzzz
jonnyzzz / kafka.kt
Created March 19, 2019 12:00
DSL in Kotlin
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
/** API **/
data class ProcessorId(val name: String)
data class SourceId(val name: String)
interface ProcessorDelegate {
operator fun provideDelegate(thisRef: Any?,
prop: KProperty<*>) : ReadOnlyProperty<Any?, ProcessorId>
class Z {
operator fun plus(z:Z) = z
operator fun plusAssign(z:Z) = Unit
}
fun test() {
val x = Z() + Z()
x += Z()
}
fun callWithLambda(x: () -> Unit) = x()
inline fun callW(crossinline x: () -> Unit) {
callWithLambda {
x()
x()
}
}