Skip to content

Instantly share code, notes, and snippets.

@clarkbw
clarkbw / signalk-plugin-catalog.md
Last active June 20, 2026 16:11
The Signal K plugin ecosystem by the numbers (June 2026) — 479 plugins, 126 webapps, what ships by default, who maintains it, and where the gaps are.

Signal K plugins, by type — a community taxonomy

A working categorisation of the published Signal K plugin ecosystem, with the maintained/core plugins sorted into each type. Meant as an orientation map: "what kind of plugin is this, and what else lives in the same bucket?"

Data source: npm signalk-node-server-plugin keyword index (~479 packages), the @signalk npm scope, and github.com/SignalK, surveyed 2026-06-20. This is not exhaustive — it covers the maintained + historically-important core (~80 plugins), not the full long tail. Version/date stamps are point-in-time; re-query npm before trusting a "stale" verdict. Corrections welcome.

How the App Store works (context)

  • The in-server App Store is a live npm keyword query — anything published with signalk-node-server-plugin (server plugins), signalk-webapp (webapps), or signalk-embeddable-webapp (components) shows up. No human curation.
  • The @signalk/* scope marks officially-owned packages; the App Store lists everythi
@clarkbw
clarkbw / signalk-message-log.md
Last active June 20, 2026 14:32
Proposal: a received-message log in signalk-server core (DSC first)

Proposal: A received-message log in signalk-server core (DSC first)

Working draft for discussion, off the back of Teppo's suggestion (Discord) that the signalk-dsc plugin's call log become a first-class server feature.

Goal

A first-class log of received digital messages in signalk-server: a data model the server owns, a query/manipulate REST API in the likeness of the History API, and (later) a Kip-style panel like the autopilot control panel. DSC is the first

@clarkbw
clarkbw / database-services.sql
Last active January 14, 2025 03:07
SQL case to segment the database services by their URL
case
when host like '%cluster-%.rds.amazonaws.com%' then 'Aurora'
when host like '%rds.amazonaws.com%' then 'RDS'
when host like 'ec2%' then 'EC2 Self-Hosted'
when host like '%supabase.co%' then 'Supabase' -- db.project.supabase.co & region.supabase.com
when host like '%timescale.com%' then 'Timescale'
when host like '%postgres.vercel-storage.com%' then 'Vercel Postgres'
when host like '%azure.neon.tech%' then 'Neon (Azure)'
when host like '%aws.neon.tech%' then 'Neon (AWS)'
when host like '%.turso.io%' then 'Turso'
@clarkbw
clarkbw / preview.yml
Last active May 15, 2024 06:19
Ideal GitHub Action for Fly preview w/ Neon database
name: PR Review
on:
# Run this workflow on every PR event. Existing review apps will be updated when the PR is updated.
# Neon branches are created and removed according to PR updates
pull_request:
types: [opened, reopened, synchronize, closed]
jobs:
pr-preview:
runs-on: ubuntu-latest
@clarkbw
clarkbw / replace-index.sql
Last active April 12, 2022 22:59
quick postgres SQL for replacing an index
-- get existing index names and SQL definitions
SELECT indexname, indexdef
FROM pg_indexes
WHERE schemaname = 'public' AND tablename = 'table'
ORDER BY indexname;
-- create new tmp index (example)
CREATE INDEX tmp_name_of_the_index ON public.table USING btree (time ASC);
-- drop existing index
DROP INDEX name_of_the_index;
@clarkbw
clarkbw / all-up-with-vars.sql
Last active July 2, 2024 14:38
linear regression (trend line) analysis of time series data in postgres SQL (demo)
-- bring all examples together and clean up with some top level variables
WITH vars AS (
SELECT INTERVAL '1 day' AS bucket,
(now() - INTERVAL '3 months') as time_from,
(now() + INTERVAL '1 month') as time_to
)
-- generate timeline into the past and future
,
timeline AS (
@clarkbw
clarkbw / create_hypertable_migration.rb
Last active February 10, 2022 17:19
A rails migration for creating and reverting a hypertable
class ActionsHypertable < ActiveRecord::Migration[7.0]
def change
@table_name = 'actions'
@time_column = 'created_at'
reversible do |dir|
dir.up do
execute <<-SQL
SELECT create_hypertable('#{@table_name}', '#{@time_column}', if_not_exists => TRUE, migrate_data => TRUE);
SQL
end
SELECT s.schemaname,
s.relname AS tablename,
s.indexrelname AS indexname,
pg_size_pretty(pg_relation_size(s.indexrelid)) AS index_size
FROM pg_catalog.pg_stat_user_indexes s
JOIN pg_catalog.pg_index i ON s.indexrelid = i.indexrelid
WHERE s.idx_scan = 0 -- has never been scanned
AND 0 <>ALL (i.indkey) -- no index column is an expression
AND NOT i.indisunique -- is not a UNIQUE index
AND NOT EXISTS -- does not enforce a constraint
<script>
{
let a = "foo";
}
{
let b = 42; // set breakpoint here: debugger shows b == "foo"!
}
</script>
@clarkbw
clarkbw / redux-performance-mark.js
Last active February 8, 2024 05:03
A User Timing middleware for redux to create performance markers for dispatched actions
const timing = store => next => action => {
performance.mark(`${action.type}_start`);
let result = next(action);
performance.mark(`${action.type}_end`);
performance.measure(
`${action.type}`,
`${action.type}_start`,
`${action.type}_end`
);
return result;