This file contains 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
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
This file contains 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
#!/bin/sh | |
# | |
# Automatically adds branch name and branch description to every commit message. | |
# | |
NAME=$(git branch | grep '*' | sed 's/* //') | |
DESCRIPTION=$(git config branch."$NAME".description) | |
TEXT=$(cat "$1" | sed '/^#.*/d') | |
if [ -n "$TEXT" ] | |
then |
This file contains 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
def merge_lists(aList, bList): | |
if not aList or not bList: | |
print("empty lists") | |
return aList + bList | |
c = [] | |
while aList and bList: | |
if aList[0] < bList[0]: | |
c.append(aList.pop(0)) | |
else: |
This file contains 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
version: '2' | |
services: | |
openvpn: | |
cap_add: | |
- NET_ADMIN | |
image: kylemanna/openvpn | |
container_name: openvpn | |
ports: | |
- "1194:1194/udp" | |
restart: always |
This file contains 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
SECRET_KEY=somesecret | |
NORECAPTCHA_SECRET_KEY=somekey | |
NORECAPTCHA_SITE_KEY=somekey | |
MAILGUN_API_KEY=somekey | |
MAILGUN_SENDER_DOMAIN=somekey | |
EMAIL_BACKEND=somekey | |
DEFAULT_FROM_EMAIL=somekey | |
ALLOWED_HOSTS=["*"] | |
VIRTUAL_HOSTS=someurl | |
INTERNAL_IPS=somekey |
This file contains 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
version: '3' | |
volumes: | |
pgdata: | |
services: | |
web: | |
build: . | |
command: python manage.py runserver_plus 0.0.0.0:8000 | |
volumes: |
This file contains 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
FROM python:3.7-alpine as base | |
ENV PYTHONDONTWRITEBYTECODE 1 | |
COPY requirements.txt requirements_dev.txt ./ | |
RUN apk add --update --no-cache --virtual .build-deps \ | |
build-base \ | |
postgresql-dev \ | |
libffi-dev \ | |
python3-dev \ |
This file contains 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
FROM python:3.7-alpine | |
COPY requirements.txt requirements_dev.txt ./ | |
RUN apk add --update --no-cache --virtual .build-deps \ | |
build-base \ | |
postgresql-dev \ | |
libffi-dev \ | |
python3-dev \ | |
libffi-dev \ |
This file contains 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
FROM python:3 | |
WORKDIR /usr/src/app | |
COPY requirements.txt ./ | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
CMD [ "python", "./your-daemon-or-script.py" ] |
This file contains 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
{ | |
"_index": "credential", | |
"_type": "_doc", | |
"_id": "Credential_9515338", | |
"_score": 1, | |
"_source": { | |
"created_at": "2018-09-28T17:34:45.427081+00:00", | |
"reference_id": "CeZlKnimSC", | |
"email_domain": { | |
"domain": "bbva-continental-pe.securepe.net", |
NewerOlder