Skip to content

Instantly share code, notes, and snippets.

View shalva97's full-sized avatar

George Shalvashvili shalva97

  • Tbilisi
  • 23:15 (UTC +04:00)
View GitHub Profile
@shalva97
shalva97 / GetOpenFilenameA.kt
Created May 12, 2023 09:37
Open file dialog on Windows with Kotlin Native
import kotlinx.cinterop.*
import platform.posix.IID
import platform.windows.*
import kotlin.native.concurrent.freeze
fun main(args: Array<String>) {
memScoped {
val result = alloc<tagOFNA>()
SecureZeroMemory?.invoke(result.ptr, sizeOf<tagOFNA>().toULong())
adb shell settings put global heads_up_notifications_enabled 0
fun main() {
val prefix = "kwriteconfig5 --file \$HOME/.config/kde.org/UserFeedback.org.kde.plasmashell.conf"
val config = """
[Greeter][Wallpaper][org.kde.image][General]
Image=file:///home/shalva/Pictures/lock-screen-wallpaper.jpg
""".trimIndent()
var configCommand = StringBuilder()
function adb-layout-bounds
if test $argv[1] != false; and test $argv[1] != true;
echo wrong arguments, use true or false
return 1
end
switch (__number_of_connected_devices)
case 0
echo no devices connected
return 1
case 1