Skip to content

Instantly share code, notes, and snippets.

View deanmarc25's full-sized avatar

Marc Dean deanmarc25

  • Glens Falls, NY
View GitHub Profile
# source: https://github.com/kiasaki/docker-alpine-postgres
FROM alpine
RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
apk update && \
apk add curl "libpq@edge<9.7" "postgresql-client@edge<9.7" "postgresql@edge<9.7" "postgresql-contrib@edge<9.7" && \
curl -o /usr/local/bin/gosu -sSL "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" && \
chmod +x /usr/local/bin/gosu && \
apk del curl && \
rm -rf /var/cache/apk/*
@deanmarc25
deanmarc25 / install_bucardo.sh
Created May 1, 2018 17:07 — forked from Leen15/install_bucardo.sh
step by step for install a bucardo instance
# NB: you need to have ubuntu 16.04 for install last version of bucardo, with 14.04 apt installs version 4.xx
apt-get update
apt-get install bucardo nano -y
mkdir /srv/bucardo
mkdir /var/run/bucardo
service postgresql start
@deanmarc25
deanmarc25 / postgres_queries_and_commands.sql
Created February 26, 2018 16:34 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), 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(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix.
;;
;; * :use makes functions available without a namespace prefix
;; (i.e., refers functions to the current namespace).
;;
;; * :import refers Java classes to the current namespace.
;;