Skip to content

Instantly share code, notes, and snippets.

View alexandrepiveteau's full-sized avatar

Alexandre Piveteau alexandrepiveteau

View GitHub Profile
@hasko
hasko / elm-expert.md
Created August 2, 2025 13:16
Claude Code Elm Expert Subagent

Elm Programming Specialist Subagent

Purpose & Identity

You are an Elm programming specialist subagent called upon when the main Claude Code agent encounters compilation errors or needs guidance on Elm-specific patterns. Your expertise lies in debugging Elm compiler errors, suggesting idiomatic Elm solutions, and ensuring code follows Elm best practices.

Core Knowledge Areas

Elm Architecture & Concepts

  • Model-View-Update (MVU) cycle: Understand how state flows through Elm applications
  • Pure functional nature: All functions are pure; effects happen through Commands and Subscriptions
@AlexKGwyn
AlexKGwyn / PinchToZoom.kt
Created April 23, 2023 14:51
Jetpack Compose MacOS Pinch to Zoom modifier
@file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE")
package com.lottieworks.app.ui
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.pointer.PointerEventType
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.layout.LayoutCoordinates
@xxfast
xxfast / DateVisualTransformation.kt
Last active June 30, 2023 17:38
Jetpack compose text visual transformation
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.text.input.TransformedText
import androidx.compose.ui.text.input.OffsetMapping
import androidx.compose.ui.text.AnnotatedString
/**
* Visually transform a string as YYYY-MM-DD.
*/
object DateVisualTransformation : VisualTransformation {
@c5inco
c5inco / MaterialMotionTransitions.kt
Last active June 4, 2025 05:48
Reusable transitions that map to Material 2 motion system - https://material.io/develop/android/theming/motion
// Requires Compose 1.1.0-alpha02+
// Best used with navigation animation transitions in Accompanist 0.17.0+
import androidx.compose.animation.*
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.tween
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bastman
bastman / exposed-tricks.kt
Last active September 28, 2024 18:05
exposed tricks
# =========
# demo: https://github.com/JetBrains/Exposed/tree/master/src/test/kotlin/demo
# dml tests: https://github.com/JetBrains/Exposed/blob/master/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/DMLTests.kt
# ===== GIS
https://github.com/JetBrains/Exposed/issues/459
# === native
@zach-klippenstein
zach-klippenstein / SelectClauses.kt
Last active August 20, 2021 16:39
Helper methods to build select clauses for Kotlin coroutines
package com.zachklipp.coroutines
import kotlinx.coroutines.experimental.DisposableHandle
import kotlinx.coroutines.experimental.intrinsics.startCoroutineCancellable
import kotlinx.coroutines.experimental.selects.SelectClause0
import kotlinx.coroutines.experimental.selects.SelectClause1
import kotlinx.coroutines.experimental.selects.SelectClause2
import kotlinx.coroutines.experimental.selects.SelectInstance
/**
@digi0ps
digi0ps / boruvka.md
Last active November 25, 2024 13:43
Boruvka's Algorirthm in C

Boruvka's Algorithm

Boruvka's Algorithm is a minimum spanning tree algorithm.

What's a spanning tree? In a graph (all this is about graphs), the path which covers all the nodes is called the spanning tree. Why tree? Because if a graph contains n nodes, a spanning tree contains n-1 nodes which is a property of a tree.

What's a minimum spanning tree?

@nickbutcher
nickbutcher / avd_loading_bar.xml
Last active September 21, 2020 00:38
A prototype of a loading indicator utilizing repeated gradients. See https://twitter.com/crafty/status/914830571196571648
<?xml version="1.0" encoding="utf-8"?>
<!--
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 distributed under the License