select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
float computeAverage(int *notes, int length) { | |
float sum = 0; | |
for(int i = 0; i < length; i++) { | |
sum += notes[i]; | |
} | |
return sum / length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule EventsProducer do | |
use GenStage | |
def init(min) do | |
{:producer, min} | |
end | |
def handle_demand(demand, min) when demand > 0 do | |
events = Enum.to_list(1..min+demand) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"timestamp":null, "logger_event_id":"8g272igf2378f3287f2387623f623","event_type":"telephone_created","event":{"type":"local","telephone_id":"5e8d60283cc24683a9524906","number":"+165891030224","logger_timestamp":"2018-09-21T16:40:52.267213Z","logger_event_id":"GZS759FwcPXmLa8httsPu+XweuRgeCCJ0zCEVNlOChM=","event_id":"GZS759FwcPXmLa8httsPu+XweuRgeCCJ0zCEVNlOChM=","event":"telephone_created","country":"US","account_id":"5e8d60283cc24683a952a1fb"},"agent_id":null,"account_id":"5e8d60283cc24683a952a1fb"} | |
{"timestamp":null,"logger_event_id":null,"event_type":"telephone_created","event":{"type":"local","telephone_id":"5e8d60283cc24683a9524906","number":"+165891030224","logger_timestamp":"2018-09-21T16:40:52.782497Z","logger_event_id":"xg7ZHjf+r0lH3bLJ4JGhUYX1W84NU/HZHWR3hN68Ubs=","event_id":"xg7ZHjf+r0lH3bLJ4JGhUYX1W84NU/HZHWR3hN68Ubs=","event":"telephone_created","country":"US","account_id":"5e8d60283cc24683a952a1fb"},"agent_id":null,"account_id":"5e8d60283cc24683a952a1fb"} |
I hereby claim:
- I am andrefreitas on github.
- I am andrefreitas (https://keybase.io/andrefreitas) on keybase.
- I have a public key ASCNA3WqPj9-mrU8gYxaUg-OmgeaF9sl8rJdvLPSIf3QXwo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
py.test | |
======================================================================= test session starts ======================================================================= | |
platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 | |
rootdir: /code, inifile: setup.cfg | |
plugins: cov-2.2.0 | |
collected 76 items | |
bugimporters/tests/test_bugzilla.py ............. | |
bugimporters/tests/test_github.py .... | |
bugimporters/tests/test_google.py ..F.F.F.F.......... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis: | |
image: redis | |
postgres: | |
image: postgres | |
environment: | |
- POSTGRES_PASSWORD=sentry | |
- POSTGRES_USER=sentry | |
volumes: | |
- /var/lib/postgresql/data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.1) | |
project(hello) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") | |
set(SOURCE_FILES | |
hello.h | |
hello.cpp | |
main.cpp | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pdb; pdb.set_trace() |
NewerOlder