Skip to content

Instantly share code, notes, and snippets.

View dgarana's full-sized avatar
🎯
Focusing

David Garaña Peña dgarana

🎯
Focusing
View GitHub Profile
@dgarana
dgarana / .bash_profile
Last active December 19, 2018 11:15
Bash config with git/virtualenv prompt (including current python version on venv)
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
FG_RED="\033[38;5;9m"
FG_YELLOW="\033[0;33m"
FG_GREEN="\033[0;32m"
FG_OCHRE="\033[38;5;110m"
FG_BLUE="\033[0;34m"
FG_WHITE="\033[0;37m"
FG_RESET="\033[0m"
@dgarana
dgarana / __init__.py
Created July 7, 2016 16:13
Python load dynamic settings module through environment
# -* coding: utf-8 *-
"""
Config import handler
This let us import settings, and don't care about:
>>> settings = importlib.import_module('module_name')
"""
import os
import importlib
my_module = importlib.import_module(os.getenv('SETTINGS_MODULE'))