Python Source 디렉토리 구조 검색

def ls(dir, hidden=False, relative=True): nodes = [] for nm in os.listdir(dir): if not hidden and nm.startswith('.'): continue if not relative: nm = os.path.join(dir, nm) nodes.append(nm) nodes.sort() return nodes def find(root, files=True, dirs=False, hidden=False, relative=True, topdown=True, self_check=False): root = os.path.join(root, '') # add slash if not there for parent, ldirs, lfiles in os.walk(root, topdown=topdown): if relative: […]

.vimrc 파일 tab 기능 쓰기위한 설정

set nocompatible set autoindent set cindent set smartindent set wrap set nowrapscan set nobackup set visualbell set ruler set shiftwidth=4 set fileencoding=utf-8 set tenc=utf-8 set hlsearch set ignorecase set tabstop=4 set lbr set incsearch set backspace=eol,start,indent set history=1000 set background=dark set nobackup set nowritebackup set noswapfile set laststatus=2 map <C-J> :tabp<CR> map <C-K> :tabn<CR> map […]

CentOS 6.3 설치과정 기록

MSI U270 노트북에 윈도우가 설치되어 있는 관계로 USB 16기가 스틱에 CentOS를 설치하였다. 이유는 Eclipse를 설치하여 Django 개발환경을 맞춰보고 싶기 때문이다. USB 에 우분투를 설치하여 사용해보고 싶었으나, 우분투에서는 노트북이라면 필히 CDROM이 필요하다. USB로 부팅하여 USB에 우분투를 설치하려고 하면 계속해서 에러를 뿜어댔다. 결국 포기하고 CentOS로 돌아왔다. 현재까지는 아무런 문제없이 잘 돌리고 있는 중이다. USB로 부팅하여 사용하면 프리징 […]

Gnome에서 Open with에 연결된 쓸데없는 연결프로그램 삭제하기

간혹가다가는 쓸데없는 프로그램 리스트를 지우고 싶을때가 있을 것이다. 그때는 아래와 같이 삭제하면 된다. Wine을 설치하다가 저렇게 쓸데없이 리스트로 나오게 될 경우에는 해당 아이콘 우측클릭을 하여 Properties로 들어가서 Open With 탭으로 가면 된다. 여기에서 하나씩 선택하여 삭제하면 될것이다. 직접 쓸데없는 프로그램들을 삭제하고 싶다면 ~/.local/share/applications 디렉토리에 들어가서 보면서 직접 지우면 되겠다.

리눅스를 사용하는 노트북에서 Suspend 모드일때 USB 충전하는 방법

Device and Bus Power Management USB selective suspend This is a project in progress for the USB subsystem. USB selective suspend allows you to suspend a USB device on demand. If one device doesn’t support selective suspend, then the entire bus must remain active. This not only consumes USB bus power unnecessarily, but also prevents […]