Skip to content

Instantly share code, notes, and snippets.

View kevlarr's full-sized avatar

kevin kevlarr

  • North Shore, MA
View GitHub Profile
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 17, 2024 13:10
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@kevlarr
kevlarr / README.md
Last active October 9, 2017 17:53
Data transitions in D3 version 4

There is an excellent example of transitioning data in D3, but this only works in version 3.

D3 version 4 requires a slightly different approach, namely that the entered selections need to be merged prior to transition.

Added transition on exit. Also did a little code cleanup, especially given that eval is pretty gross.

@kshimi
kshimi / iceberg.json
Created September 6, 2019 09:17
Iceberg color scheme for Windows Terminal
{
"name": "Iceberg",
"foreground": "#c6c8d1",
"background": "#161821",
"black": "#161821",
"red": "#e27878",
"green": "#b4be82",
"yellow": "#e2a478",
"blue": "#84a0c6",
"purple": "#a093c7",