Skip to content

Instantly share code, notes, and snippets.

View michael-simons's full-sized avatar
πŸ‘‹

Michael Simons michael-simons

πŸ‘‹
View GitHub Profile
Warning: Please re-evaluate whether any experimental option is required, and either remove or unlock it. The build output lists all active experimental options, including where they come from and possible alternatives. If you think an experimental option should be considered as stable, please file an issue.
========================================================================================================================
GraalVM Native Image: Generating 'native-tests' (executable)...
========================================================================================================================
[1/8] Initializing... (9,9s @ 0,41GB)
Java version: 25.0.2+10, vendor version: GraalVM CE 25.0.2+10.1
Graal compiler: optimization level: 2, target machine: armv8.1-a
C compiler: cc (apple, arm64, 21.0.0)
Garbage collector: Serial GC (max heap size: 80% of RAM)
2 user-specific feature(s):

Listened often section rank grouping

Exported on 12.1.2026 at 12:41:17 MEZ from Cursor (2.3.34)


User

In the artist view change the "listened often to in" section in such a way that when a rank occurs multiple times, the months in which that rank occured are listed in the same bullet point.


<?xml version="1.0"?>
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<caches lockStrategy="artifact-lock-nio"/>
<resolvers>
<chain name="downloadGrapes" returnFirst="true">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
</filesystem>
boot_version dependency size version
3.3.5 HdrHistogram 177206 2.2.2
3.3.5 HikariCP 161840 5.1.0
3.3.5 LatencyUtils 29779 2.0.3
3.3.5 activemq-broker 1238079 6.1.3
3.3.5 activemq-client 1487443 6.1.3
3.3.5 activemq-jms-pool 55481 6.1.3
3.3.5 activemq-mqtt 104072 6.1.3
3.3.5 activemq-openwire-legacy 693329 6.1.3
3.3.5 activemq-pool 21686 6.1.3
@michael-simons
michael-simons / GoLEmbedded.java
Created October 15, 2025 08:27
Game of Life with Neo4j embedded.
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 25
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
//DEPS org.neo4j:neo4j:2025.09.0
import org.neo4j.dbms.api.DatabaseManagementServiceBuilder;
void main() throws IOException, InterruptedException {
var height = 30;
var width = 30;
import module java.sql;
import module org.neo4j.jdbc;
// java --enable-preview --module-path neo4j-jdbc-full-bundle-6.7.0.jar --add-modules org.neo4j.jdbc Demo1.java
void main() throws SQLException {
try (
var connection = DriverManager.getConnection("jdbc:neo4j://localhost:7687/movies?enableSQLTranslation=true", "neo4j", "verysecret");
var stmt = connection.prepareStatement("""
INSERT INTO Movie (title, released) VALUES (?, ?)
@michael-simons
michael-simons / Polyline.java
Last active April 13, 2025 15:36
If you ever want to encode a poly line against Google Earth / OSM Valhalla standards
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Gatherers;
public final class Polyline {
private final List<Point> points = new ArrayList<>();
private final int scale;
CREATE OR REPLACE FUNCTION write_neo4j(jdbcConfig OBJECT, nodes VARIANT)
RETURNS ARRAY(INTEGER) NULL
LANGUAGE JAVA
RUNTIME_VERSION = '17'
PACKAGES = ('com.snowflake:snowpark:1.8.0')
IMPORTS = ('@NEO4J_JARS/drivers/neo4j-jdbc-full-bundle-6.2.0.jar')
EXTERNAL_ACCESS_INTEGRATIONS = (ext_neo4j_access_integration)
SECRETS = ('cred' = ext_neo4j_credentials )
HANDLER = 'WriteNeo4j.createNodes'
AS $$
@michael-simons
michael-simons / GoL.java
Last active February 21, 2025 12:54
Cypher based Game of Life implementation meets Java meets the terminal. xkcd 356 applies.
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 24
//PREVIEW
//DEPS org.neo4j:neo4j-jdbc:6.1.3
import java.sql.DriverManager;
import org.neo4j.jdbc.Neo4jPreparedStatement;
/**
@michael-simons
michael-simons / Neo4jWithApoc.java
Last active February 21, 2025 12:49
How to run Neo4j embedded with Apoc installed. Using Java 23 preview to avoid the ceremony of an empty class holding main (See JEP 477).
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 23
//PREVIEW
//DEPS org.neo4j:neo4j:2025.01.0
//DEPS org.neo4j.procedure:apoc-common:2025.01.0
//DEPS org.neo4j.procedure:apoc-core:2025.01.0
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;