Skip to content

Instantly share code, notes, and snippets.

Avatar

bright initialkommit

View GitHub Profile
View logging_by_level.out
WARNING:root:This is a warning message
ERROR:root:This is an error message
CRITICAL:root:This is a critical message
@initialkommit
initialkommit / postactivate
Created May 22, 2018
virtualenv postactivate/postdeactivate
View postactivate
PS1="$_OLD_VIRTUAL_PS1"
_OLD_RPROMPT="$RPROMPT"
RPROMPT="%{${fg_bold[grey]}%}(%{${fg[grey]}%}`basename \"$VIRTUAL_ENV\"`%{${fg_bold[grey]}%})%{${reset_color}%} $RPROMPT"
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
@initialkommit
initialkommit / .gitignore
Created Apr 29, 2018
gitignore (IntelliJ, Python, macOS)
View .gitignore
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
@initialkommit
initialkommit / .condarc
Created Apr 14, 2018
Conda Configuration
View .condarc
# channel locations. These override conda defaults, i.e., conda will
# search *only* the channels listed here, in the order given. Use "defaults" to
# automatically include all default channels. Non-url channels will be
# interpreted as binstar usernames (this can be changed by modifying the
# channel_alias key; see below).
# channels:
# - <binstar_username>
# - http://some.custom/channel
# - file:///some/local/directory
# - defaults
@initialkommit
initialkommit / Neovim configuration files
Last active Mar 31, 2018
Neovim configuration files
View Neovim configuration files
Neovim Configuration
====================
# Structure
- ~/.config/nvim/
- init.vim
- backups/
- swaps/
- undo/
- colors/
@initialkommit
initialkommit / crud_mysql.py
Created Aug 20, 2016
CRUD Practice to MySQL
View crud_mysql.py
import pymysql
def db_connection():
db = pymysql.connect("localhost", "root", "", "djangogirls") # host, user, password, db
return db
def select():
"""CRUD - Reading"""
View matplotlib_Korean.py
# coding: UTF-8
import matplotlib
import matplotlib.font_manager
# 폰트 이름 알아내기
print([font.name for font in matplotlib.font_manager.fontManager.ttflist])
# Setting Korean Font
matplotlib.rc('font', family='YuGothic')
@initialkommit
initialkommit / environvar.py
Created Dec 8, 2015
Django 프로젝트 setting을 위한 함수
View environvar.py
# coding: UTF-8
"""
settings 유의사항
1. DevelopmentProduction을 다르게 구성하기
1-1. DATABASE
1-2. SECRET_KEY: Production에서는 시스템 환경변수로
1-3. DEBUG
virtualenvwrapper를 이용해 환경변수 세팅하기 예제
1. postactivate