Skip to content

Instantly share code, notes, and snippets.

View NaingAungLuu's full-sized avatar
👨‍💻
Working

Naing Aung Luu NaingAungLuu

👨‍💻
Working
View GitHub Profile
@vganin
vganin / FlexRow.kt
Last active April 28, 2024 06:08
Jetpack Compose simple flex-wrap container
@Composable
fun FlowRow(
horizontalGap: Dp = 0.dp,
verticalGap: Dp = 0.dp,
alignment: Alignment.Horizontal = Alignment.Start,
content: @Composable () -> Unit,
) = Layout(content = content) { measurables, constraints ->
val horizontalGapPx = horizontalGap.toPx().roundToInt()
val verticalGapPx = verticalGap.toPx().roundToInt()
@sualeh
sualeh / how_to_sign_and_release_to_the_central_repository_with_github_actions.md
Last active June 8, 2024 17:46
How to Sign and Release to The Central Repository with GitHub Actions

How to Sign and Release to The Central Repository with GitHub Actions

GitHub allows automated builds using GitHub Actions. A commonly asked question is how to release artifacts (packaged Java jars) built by Maven and Gradle to The Central Repository. The GitHub Actions documentation provides only part of the answer.

So, first, configure your Maven project for staging artifacts to The Central Repository, by reading through Configuring Your Project for Deployment and following those steps. Please make sure that the maven-gpg-plugin is configured to prevent gpg from using PIN entry programs, as follows:

<configuration>
  <gpgArguments>
      <arg>--pinentry-mode</arg>
 loopback
@kuFEAR
kuFEAR / ImagePHash.java
Created September 2, 2015 18:07
Android image phash comparing
package com.example.app;
import android.graphics.*;
import android.util.Log;
/*
* pHash-like image hash.
* Author: Elliot Shepherd (elliot@jarofworms.com
* Based On: http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
*/