Skip to content

Instantly share code, notes, and snippets.

@cowleyb
cowleyb / foo.md
Last active July 2, 2025 16:38
vscode extensions

code --list-extensions | xargs -L 1 echo code --install-extension

--

alexcvzz.vscode-sqlite dbaeumer.vscode-eslint deque-systems.vscode-axe-linter docker.docker eamodio.gitlens esbenp.prettier-vscode

@cowleyb
cowleyb / todo.md
Last active April 9, 2025 00:49
rpi5

Bugs

  • multiple websocket connections are been created sometimes
  • cleanup

Optimization

  • less precision on websocket
  • delta values
  • json format
@cowleyb
cowleyb / emptyfile.txt
Last active May 20, 2025 10:00
emptyfile
select count(distinct "user"."uuid") as "total_users", count(distinct "um"."user_uuid") as "users_with_matrixes", COUNT(DISTINCT CASE WHEN EXISTS (
SELECT 1 FROM user_matrix um2
WHERE um2.user_uuid = user.uuid
AND (
(SELECT COUNT(uc.uuid)
FROM user_competency uc
JOIN user_competency_status ucs ON uc.user_competency_status_uuid = ucs.uuid
WHERE uc.user_matrix_uuid = um2.uuid AND ucs.reference = 'COMPLETE') =
(SELECT COUNT(competency.uuid)
FROM competency_group
@cowleyb
cowleyb / tt.md
Last active October 22, 2024 04:49
delete postgres tables data

DO $$ DECLARE r RECORD; BEGIN -- Loop through all the tables, excluding 'knex_migrations' and 'knex_migrations_lock' FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND tablename NOT IN ('knex_migrations', 'knex_migrations_lock')) LOOP EXECUTE 'TRUNCATE TABLE ' || quote_ident(r.tablename) || ' CASCADE;'; END LOOP;

We couldn’t find that file to show.