Skip to content

Instantly share code, notes, and snippets.


Charmy Feng fcharmy

View GitHub Profile
fcharmy /
Created Sep 13, 2018
auto sync github repository for whole repo or given certain directories
#!/usr/bin/env bash
# To keep updating codes from git repository
# Nothe: please make sure git config has read permission of repository
# Usage ./ branch_name\
# -t interval_in_seconds\
# -d sparse_checkout_directory(optional) -d more_sparse_checkout_directory ..\
# -e execute_command_after_sync
fcharmy /
Created Sep 13, 2018
sqlalchemy models
import logging
from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.engine import reflection
from sqlalchemy.orm import mapper, sessionmaker
logger = logging.getLogger(__name__)
def get_session(host=None, port=3306, db=None,
fcharmy / Dockerfile
Last active Aug 31, 2018
View Dockerfile
FROM python:3.7
RUN wget
RUN tar -zxvf mongodb-*.tgz
RUN rm mongodb-*.tgz
RUN mkdir -p /data/db
ENV PATH="/mongodb-linux-x86_64-4.0.2/bin:${PATH}"
EXPOSE 27017
ENTRYPOINT ["mongod"]
You can’t perform that action at this time.