Skip to content

Instantly share code, notes, and snippets.


Kristina Stefanova kristinaluxgroup

Block or report user

Report or block kristinaluxgroup

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:83038468706aa59a62e5a4b6db84ee77
-- In publisher:
Name: notify_trigger(); Type: FUNCTION; Schema: public; Owner: -
CREATE FUNCTION notify_trigger() RETURNS trigger
LANGUAGE plpgsql
AS $$
PERFORM pg_notify('orders', TG_TABLE_NAME || ',id,' || row_to_json(NEW)::text );
yoavniran /
Last active May 26, 2020
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies

rgreenjr / postgres_queries_and_commands.sql
Last active May 28, 2020
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- 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%'
You can’t perform that action at this time.