Ubuntu 내 Dash home에서 약어로 프로그램을 찾아 실행하는 등의 작업을 할때, 프로그램을 삭제하였는데 메뉴에 남아있거나, 보이기 싫은 경우가 있다.



이럴때에는 다음 디렉토리에서 해당하는 프로그램을 찾아 삭제하면 Dash home에서 보이지 않게 된다.

  • /usr/share/applications
  • /usr/local/share/applications
  • /.local/share/applications
  • /.local/share/desktop-directories


'OS > Linux' 카테고리의 다른 글

Bash Strict Mode  (0) 2016.01.03
[Ubuntu] sh 파일 실행시 "/bin/bash^M" 에러가 발생하는 경우  (0) 2015.12.29
[Shell] Bash shell 팁  (0) 2015.12.20
[Ubuntu] time  (0) 2015.12.20
[Ubuntu] disk usage  (0) 2015.12.20
Posted by leechwin
,

Git 을 사용하여 개발 중, 여러 commit 들이 모여서 conflict가 나거나 여러가지 이유로 기존 commit 한 내용에 추가로 commit을 하려고 하면 다음과 같은 에러가 나는 경우가 있다.


fatal: You are in the middle of a cherry-pick -- cannot amend. 


이 상황에서는 git rebase, git commit --amend 등의 명령이 잘 동작하지 않는데 이를 해결하려면, 다음 명령을 수행하면 된다.

  • git commit --allow-empty

위의 명령을 실행 후 git rebase 혹은 git commit --amend 를 수행하면 기존 commit 한 내용에 이어서 추가 수정한 내용을 이어서 commit 할 수 있다.

Posted by leechwin
,

크롬 브라우져에서 Promise등의 Async Javascript 코드의 경우 디버깅시에 콜스택의 정확한 디버깅 지점을 찾기가 어려운 경우가 있다.

크롬 브라우져의 DevTools 에서는 자신이 작성한 Async 코드가 콜스택에 나타나도록 하는 옵션이 있다.

  • DevTools > Source > Async 체크박스 선택

위와 같이 선택하면, 콜스택에 Async framework 코드외에 자신이 작성한 Async 호출코드도 나타나게 되어 디버깅이 가능하다.


참고: http://www.html5rocks.com/ko/tutorials/developertools/async-call-stack/


'Web' 카테고리의 다른 글

[Chrome] Cache 삭제  (0) 2015.12.31
DOMNodeRemoved event  (0) 2015.12.30
Gravatar  (0) 2015.08.26
Asynchronous Module Definition (AMD)  (0) 2015.02.27
[WIDLPROC] widl 을 widlprocxml 파일로 변환하기  (0) 2015.01.15
Posted by leechwin
,

[Shell] Bash shell 팁

OS/Linux 2015. 12. 20. 18:39

Bash Shell에서 편리한 팁들

  • Tab : argument 완성
  • Ctrl + R : command history 에서 검색
  • Ctrl + W : 마지막 단어 삭제
  • Ctrl + U : 라인 전체 삭제
  • Ctrl + A : 라인 시작점으로 이동
  • Ctrl + E : 라인 끝지점으로 이동
  • "cd -" : 이전 디렉토리로 이동


'OS > Linux' 카테고리의 다른 글

[Ubuntu] sh 파일 실행시 "/bin/bash^M" 에러가 발생하는 경우  (0) 2015.12.29
[Ubuntu] Dash home에서 불필요한 프로그램 shortcut 삭제  (0) 2015.12.24
[Ubuntu] time  (0) 2015.12.20
[Ubuntu] disk usage  (0) 2015.12.20
UNIX TOOLBOX  (2) 2015.08.26
Posted by leechwin
,

[Ubuntu] time

OS/Linux 2015. 12. 20. 18:04

특정 명령의 실행시간을 알고 싶을때 time 명령을 통해 확인 가능하다.

  • time [command]
  • ex) time du -sh * | sort -n -r


'OS > Linux' 카테고리의 다른 글

[Ubuntu] Dash home에서 불필요한 프로그램 shortcut 삭제  (0) 2015.12.24
[Shell] Bash shell 팁  (0) 2015.12.20
[Ubuntu] disk usage  (0) 2015.12.20
UNIX TOOLBOX  (2) 2015.08.26
[Ubuntu] libssl-dev  (0) 2014.08.17
Posted by leechwin
,

[Ubuntu] disk usage

OS/Linux 2015. 12. 20. 17:31

현재 디렉토리 혹은 하위의 디렉토리의 disk usage 관련 정보를 shell에서 du 명령을 통해 확인 가능하다.


Usage: du [OPTION]... [FILE]... 

    or:  du [OPTION]... --files0-from=F

Summarize disk usage of the set of FILEs, recursively for directories.


Mandatory arguments to long options are mandatory for short options too.

  -0, --null            end each output line with NUL, not newline

  -a, --all             write counts for all files, not just directories

      --apparent-size   print apparent sizes, rather than disk usage; although

                          the apparent size is usually smaller, it may be

                          larger due to holes in ('sparse') files, internal

                          fragmentation, indirect blocks, and the like

  -B, --block-size=SIZE  scale sizes by SIZE before printing them; e.g.,

                           '-BM' prints sizes in units of 1,048,576 bytes;

                           see SIZE format below

  -b, --bytes           equivalent to '--apparent-size --block-size=1'

  -c, --total           produce a grand total

  -D, --dereference-args  dereference only symlinks that are listed on the

                          command line

  -d, --max-depth=N     print the total for a directory (or file, with --all)

                          only if it is N or fewer levels below the command

                          line argument;  --max-depth=0 is the same as

                          --summarize

      --files0-from=F   summarize disk usage of the

                          NUL-terminated file names specified in file F;

                          if F is -, then read names from standard input

  -H                    equivalent to --dereference-args (-D)

  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)

      --inodes          list inode usage information instead of block usage

  -k                    like --block-size=1K

  -L, --dereference     dereference all symbolic links

  -l, --count-links     count sizes many times if hard linked

  -m                    like --block-size=1M

  -P, --no-dereference  don't follow any symbolic links (this is the default)

  -S, --separate-dirs   for directories do not include size of subdirectories

      --si              like -h, but use powers of 1000 not 1024

  -s, --summarize       display only a total for each argument

  -t, --threshold=SIZE  exclude entries smaller than SIZE if positive,

                          or entries greater than SIZE if negative

      --time            show time of the last modification of any file in the

                          directory, or any of its subdirectories

      --time=WORD       show time as WORD instead of modification time:

                          atime, access, use, ctime or status

      --time-style=STYLE  show times using STYLE, which can be:

                            full-iso, long-iso, iso, or +FORMAT;

                            FORMAT is interpreted like in 'date'

  -X, --exclude-from=FILE  exclude files that match any pattern in FILE

      --exclude=PATTERN    exclude files that match PATTERN

  -x, --one-file-system    skip directories on different file systems

      --help     display this help and exit

      --version  output version information and exit 


  • ex) 현재 디렉토리의 하위 디렉토리의 용량을 순서대로 조회
    • du -sh * | sort -n -r


'OS > Linux' 카테고리의 다른 글

[Shell] Bash shell 팁  (0) 2015.12.20
[Ubuntu] time  (0) 2015.12.20
UNIX TOOLBOX  (2) 2015.08.26
[Ubuntu] libssl-dev  (0) 2014.08.17
[Ubuntu] build-essential  (3) 2014.08.17
Posted by leechwin
,

Git repository 가 외부에 있고 내부망에서 개발을 하는 회사등과 같은 개발환경에서 git 을 사용하다보면, 아래와 같은 에러가 발생하며 동작을 안하는 경우가 있다.


ssh_exchange_identification: read: Connection reset by peer

fatal: The remote end hung up unexpectedly 


Git 서버와의 연결이 끊겨서 사용이 불가능한 경우인데, 기존에 잘 사용하고 있었다가 발생한 문제라면 해결책은 너무도 간단하다.

네트웍 연결이 끊겼는지 확인하고, 문제가 없다면, 내부망일경우 프록시가 제대로 동작하는지 확인을 해보면 된다.

Posted by leechwin
,

UNIX TOOLBOX

OS/Linux 2015. 8. 26. 17:45

Unix/Linux/BSD command 를 잘 정리해놓은 링크

PDF버전


'OS > Linux' 카테고리의 다른 글

[Ubuntu] time  (0) 2015.12.20
[Ubuntu] disk usage  (0) 2015.12.20
[Ubuntu] libssl-dev  (0) 2014.08.17
[Ubuntu] build-essential  (3) 2014.08.17
[Ubuntu] Terminal 관련 단축키  (0) 2014.06.08
Posted by leechwin
,

 https 서비스 제공시 인증서가 필요한데, StartSSL에서 무료로 발행하는 인증서를 사용할 경우, linux, mac에서는 문제가 없는데, windows 크롬에서 Insecure Contents로 인식되어 안전하지 못한 사이트로 인식되는 경우가 있다.

 크롬에서는 SHA-1 알고리즘의 인증서를 신뢰하지않고 Insecure Contents에러를 내도록 바뀌었는데, StartSSL에서 SHA-2 알고리즘으로 생성한 인증서를 windows 크롬에서 SHA-1 알고리즘으로 인식하여 Insecure Contents 에러를 발생한다.

 StartSSL에서 인증서 발급시 윈도우즈 알고리즘에 대한 API에 대한 이슈로 수정중이라고 하는데, 제일 깔끔한 방법은 SSL2BUY 등의 사이트에서 유료결재를 하여 인증을 하면 문제가 발생하지 않는다. 공짜는 참 힘들다. 


Posted by leechwin
,

[Github] Tips

Tip 2015. 8. 26. 17:02

Github의 프로젝트를 직접 다운받아 수정 후 upstream에 기여하는 방법에 대한 Tip 정리


SSH key 등록

저장소 생성

  • 대부분의 Github 프로젝트는 upstream으로부터 자기 계정의 fork 하여 개발 후 upstream에 merge를 요청하게 된다.
  • 이를 pull request 라고 한다.
  • Github 프로젝트에서 우측 상단에 Fork버튼을 눌러 프로젝트 저장소를 생성한다.

개발

  • fork하여 생성된 저장수에서 개발 및 수정을 하고 commit & push를 자유롭게 할 수 있다.
  • upstream에서 받아온 merge commit과 자신의 commit이 섞여 있어서 보기에 안좋을 때는 git rebase를 하도록 한다.
    • git rebase
  • 이전에 commit 한 내용을 수정하려면, 내용을 수정한뒤 다음 명령어를 사용하여 중복된 수정내용을 하나의 commit으로 합칠 수 있다.
    • git commit --amend
  • 만약 commit 한 내용을 이미 push 하였다면 다음 명령어를 사용하여 이전의 push에 강제로 합칠 수 있다.
    • git push --force

Upstream 프로젝트의 변경 사항을 받아오기

  • Upstream의 변경 사항을 fork받은 자신의 프로젝트에 반영하려면 remote에 upstream 설정을 해 놓아야 한다.
  • remote 설정
    • // remote에 upstream 설정 등록

      // upstreamname 및 projectname 설정 필요

      git remote add upstream git://github.com/upstreamname/projectname.git


      // upstream의 반영사항을 받아온다.

      git fetch upstream


      // upstream의 반영사항으로 rebase

      git rebase upstream/master


      // git push

      git push -f master


      // 최신내용을 현재 작업하고 있는 브랜치에 merge

      git merge upstream/master 

내 변경 사항을 Upstream에 반영하기

  • 내 변경사항이 모두 push되었으면 원래 프로젝트로 가서 Pull requests 버튼을 눌러 나의 변경사항이 원본프로젝트에 반영되도록 요청한다.

Reference


Posted by leechwin
,