docker run -d centos
docker run -i -t centos /bin/bash
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
https://www.amazon.com/Masterpieces-you-have-read-before-ebook/dp/B01M28QE45 | |
50 Masterpieces you have to read before you die Vol: 1 | |
- The Divine Comedy [Dante Alighieri] | |
- Emma [Jane Austen] | |
- Persuasion [Jane Austen] | |
- Pride and Prejudice [Jane Austen] | |
- Father Goriot [Honoré de Balzac] | |
- Jane Eyre [Charlotte Brontë] | |
- The Tenant of Wildfell Hall [Anne Brontë] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# vim:set ft=dockerfile: | |
# FROM debian:jessie | |
FROM ubuntu:latest | |
# explicitly set user/group IDs | |
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres | |
# grab gosu for easy step-down from root | |
ENV GOSU_VERSION 1.7 | |
RUN set -x \ |
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
with t as ( | |
select x, y+x as y | |
from generate_series(1, 3) as t1(x) full outer join generate_series(11, 13) as t2(y) on 1=1 | |
) | |
select x, y, | |
array_agg(x) over () as frame, | |
sum(x) over () as sum, | |
sum(x) over (partition by x order by y) as sum_rolling, | |
count(1) over (partition by x) as cnt_part, | |
count(1) over (partition by x order by y) as cnt_rolling, |
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 os | |
import sys | |
import sqlite3 as lite | |
def traverse(dir, cur): | |
ft = list(tuple()) | |
fl = os.listdir(dir) | |
for f in fl: | |
full_file_name = os.path.join(dir,f) | |
if os.path.isdir(full_file_name): |
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
# List all tables: | |
select db_id, id, name, sum(rows) as mysum | |
from stv_tbl_perm where db_id = 100546 | |
group by db_id, id, name order by mysum desc; | |
# list all running processes: | |
select pid, query from stv_recents where status = 'Running'; | |
# describe table | |
select * from PG_TABLE_DEF where tablename='audit_trail'; |