prompt_docker_host() {
if [[ ! -z "$DOCKER_MACHINE_NAME" ]]; then
prompt_segment red default "\xF0\x9F\x90\xB3: '$DOCKER_MACHINE_NAME'"
elif [[ ! -z "$DOCKER_HOST" ]]; then
prompt_segment red default "\xF0\x9F\x90\xB3: '$DOCKER_HOST'"
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
# {{ BRANCH_NAME }} | |
# Extended commit message. (Optional) | |
# docs: (changes to documentation?) | |
# feat: (new feature?) | |
# fix: (bug fix?) | |
# refactor: (refactoring production code?) | |
# test: (adding missing tests, refactoring tests; no production code change): | |
# wip: (wip on feature branch?) |
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
from abc import ABC, abstractmethod | |
from copy import deepcopy | |
from boto3.dynamodb.conditions import Attr | |
class DynamoQuery: | |
def __init__(self, query_dict): | |
self.query_dict = query_dict |
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
from pymongo import MongoClient | |
MONGO_URI = '' | |
DATABASE_NAME = '' | |
client = MongoClient(MONGO_URI) | |
db = client[DATABASE_NAME] | |
collections = db.collection_names() | |
def readable_size(file_size): |
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
public String httpPost(String urlStr) throws IOException{ | |
URL url = new URL(urlStr); | |
HttpURLConnection conn = (HttpURLConnection) url.openConnection(); | |
if (conn.getResponseCode() != 200){ | |
throw new IOException(conn.getContentEncoding()); | |
} | |
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); | |
StringBuilder sb = new StringBuilder(); |