[github] Public repo를 private으로 바꾸기

public project를 가져와서 혼자 몰래 뭘 해보고 싶을 때, Apache 2.0 License 등 derived works의 source code 공개 의무가 없는 프로젝트의 경우 private으로 바꿔서 작업을 해볼 수 있다.

다음과 같이 한다.

먼저 만들고 싶은 이름으로 github에서 project를 하나 private으로 만든다.

$ git clone --bare https://github.com/publicproject/project.git
$ cd project.git
$ git push --mirror https://github.com/myname/myproject.git

그리고 나서 실제로 clone해서 쓰면 된다.

$ git push https://github.com/myname/myproject.git

최신 코드로의 업데이트는 public repository를 여기다 remote로 추가해서 fetch & rebase하면 된다.

push는 public으로 fork해온 후 거기다 push 해서 pull request하면 될 듯.

참고: https://medium.com/@bilalbayasut/github-how-to-make-a-fork-of-public-repository-private-6ee8cacaf9d3

SSH 접속 password 입력없이 RSA키로 접속하기

ssh 접속할 때마다 password 치기가 귀찮다…

클라이언트에서 키 생성

$ ssh-keygen -t rsa -N '' -q -f ~/.ssh/id_rsa

접속하려는 서버로 공개키 복사.

$ ssh-copy-id <account>@<server hostname>

위의 복사는 아래와 같은 동등하다. 위 명령을 했다면 아래를 할 필요는 없음.

$ scp ~/.ssh/id_rsa.pub <account>@<server hostname>:.ssh/authorized_keys

[Windows+Linux] WSL 사용 시 참고

Ubuntu 20.04 내의 파일 저장 경로



예를 들어, C:\Users\dasom\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs


\\wsl$ 를 입력하면 배포판이 보인다.



Xming 같은 Xserver를 사용해서 WSL로 설치한 Ubuntu 등에서 GUI 를 사용할 수 있다.

WSL 1을 WSL 2로 변환하기

WSL로 설치한 항목은 다음으로 확인 가능하다.

wsl -l -v

여기서 WSL Version이 1인 것을 다음과 같이 2로 바꿀 수 있다. 예제로 Ubuntu-20.04 를 바꾸고 싶다면 다음과 같이 하면 된다.

wsl --set-version Ubuntu-20.04 2


아래 글이 매우 정리가 잘 되어 있다.

[go] Ubuntu 에서 go 여러버전 사용하기

Ubuntu 리눅스에서 go의 여러 버전을 심볼릭 링크로 사용할 때 update-alternatives로 셋팅해서 사용하자.

# update-alternatives --install /usr/local/go go /usr/local/go1.17.2 1
update-alternatives: using /usr/local/go1.17.2 to provide /usr/local/go (go) in auto mode

# update-alternatives --install /usr/local/go go /usr/local/go1.16.8 2
update-alternatives: using /usr/local/go1.16.8 to provide /usr/local/go (go) in auto mode

# update-alternatives --install /usr/local/go go /usr/local/go1.14.15 3
update-alternatives: using /usr/local/go1.14.15 to provide /usr/local/go (go) in auto mode

# update-alternatives --config go
대체 항목 go에 대해 (/usr/local/go 제공) 3개 선택이 있습니다.

  선택       경로                우선순� 상태
* 0            /usr/local/go1.14.15   3         자동 모드
  1            /usr/local/go1.14.15   3         수동 모드
  2            /usr/local/go1.16.8    2         수동 모드
  3            /usr/local/go1.17.2    1         수동 모드

현재 선택[*]을 유지하려면 <엔터>를 누르고, 아니면 선택 번호를 입력하시오:

[Docker] docker commands

실행 중인 docker process (machine) 보기

docker ps

실행 중 + 실행 중이 아닌 docker process 보기

docker ps -a

docker 이미지 보기

docker images

docker process 삭제

docker rm -rf [container name]

docker 이미지 삭제

docker rmi [image name]

docker 이미지 가져오기

docker pull [image name]

docker process 시작

docker start [container name]

docker process 중지

docker stop [container name]

실행 중인 모든 컨테이너 강제 종료

docker kill $(docker ps -q -f status=running)

실행 중인 모든 컨테이너 중지

docker stop $(docker ps -q -f status=running)

종료된 모든 컨테이너 삭제

docker rm $(docker ps -q -f status=exited)

시스템 상의 모든 이미지 삭제

docker image rm -f $(docker image ls -q)

docker 로그 보기

docker logs [container name]

docker network 삭제

docker network prune -f

alias해서 간편히 사용하기

alias dockerkill='docker kill $(docker ps -q -f status=running)'
alias dockerstop='docker stop $(docker ps -q -f status=running)'
alias dockerrm='docker rm $(docker ps -q -f status=exited)'
alias dockerimgrm='docker image rm -f $(docker image ls -q)'
alias dockernetprune='docker network prune -f'

[English] Put on your shoes and put your shoes on (Two-Word Verbs 2)

two-word 동사(put on / take off, etc.)는 가끔 목적어object를 가진다. Sometimes a two-verb (put on / take off, etc.) has an object.

put on your coat
이렇게 쓸 수 있다:
put on your coat
put your coat on

take off your shoes
이렇게 쓸 수 있다:
take off your shoes
take your shoes off

그러나 it/them (대명사pronouns)는 언제나 on/off, etc. 앞에 온다. But it/them (pronouns) always go before on/off, etc:
put it on (not put on it)
take them off (not take off them)

  • It was cold, so I put on my coat. or … I put my coat on.
  • Here’s your coat. Put it on.
  • I’m going to take off my shoes. or … take my shoes off.
  • Your shoes are dirty. Take them off.

더 많은 two-word 동사verbs + 목적어object. More two-word verbs + objects

turn on / turn off (lights, machines, faucets, etc.)

  • It was dark, so I turned on the light. or … I turned the light on.
  • I don’t want to watch this program. You can turn it off.

pick up / put down

  • Those are my keys on the floor. Can you pick them up for me?
  • I stopped reading and put my book down. orput down my book.

bring back / take back / give back / put back

  • You can take my umbrella but please bring it back.
  • I took my new sweater back to the store. It was too small.
  • I have Diane’s keys. I have to give them back to her.
  • I read the letter and then put it back in the envelope.

[English] Go in, fall off, run away, etc. (Two-Word Verbs 1)

Two-word 동사는 동사 (go/look/be, etc.) + in/out/down, etc.이다. A two-word verb is a verb (go/look/be, etc.) + in/out/up/down, etc.


  • Erin opened the door of the car and got in. (= into the car)
  • I waited outside the house. I didn’t go in.


  • The car stopped and two women got out. (= out of the car)
  • I went to the window and looked out.


  • The bus came, and I got on.


  • Be careful! Don’t fall off.


  • He stood up and left the room.
  • I usually get up early. (= get out of bed)
  • We looked up at the stars.


  • Would you like to sit down?
  • The picture fell down.
  • Lie down on the floor.

away or off

  • The thief ran away. (or … ran off)
  • Erin got into the car and drove away. (ordrove off)

be/go away (= in/to another place)

  • Erin has gone away for a few days.


  • We went out for dinner and then went back to our hotel.
  • Go away and don’t come back!

be back

  • Erin is away. She’ll be back on Monday.


  • I’m not sure what kind of car I want. I want to look around first.
  • Somebody shouted my name, so I turned around.
  • We went for a long walk. After six miles we turned around and went back.

[English] Listen to …, look at …, etc. (Verb + Preposition)

ask somebody for

  • A man stopped me and asked me for money.

belong to

  • Does this book belong to you? (= Is this your book?)

happen to

  • I can’t find my pen. What happened to it?

listen to …

  • Listen to this music. It’s great!

look at

  • She’s looking at her watch.
  • Look at these flowers! They’re beautiful.
  • Why are you looking at me like that?

look for

  • He lost his key. He’s looking for it.
  • I’m looking for Sarah. Have you seen her?

speak/talk to somebody about

  • Did you talk to Paul about the problem?
  • (on the phone) Can I speak to Chris, please?

take care of

  • When Pat is at work, a friend of hers takes care of her children.
  • Don’t lose this book. Take care of it.

thank somebody for

  • Thank you very much for your help.

think about … or think of …

  • He never thinks about (or of) other people.
  • Mark is thinking of (or about) buying a new car.

wait for

  • Wait for me! I’m almost ready.

write and call

write (to) somebody

  • I never get letters. Nobody writes to me. (or Nobody writes me.)

call somebody (no preposition)

  • I have to call my parents. (not call to …)


depend on으로 말한다. We say depend on …:

  • A: Do you like to eat in restaurants?
    B: Sometimes. It depends on the restaurant. (not it depends of)

on을 쓰거나 안써서 it depends what/where/how로 말할 수 있다. it depends what/where/how, etc., with or without on.

  • A: Do you want to go out with us?
    B: It depends where you’re going. (or It depends on where you’re going.)