Skip to content

Instantly share code, notes, and snippets.

View sigridjineth's full-sized avatar
🧙
@thisissigrid

Sigrid Jin (ง'̀-'́)ง oO sigridjineth

🧙
@thisissigrid
View GitHub Profile
@sigridjineth
sigridjineth / mysql_koreanconfiguration.md
Created April 17, 2020 02:59
[MySQL Tip] MySQL 한글 설정하기

How to set utf-8 support language (like Korean) to print correctly in MySQL Ubuntu

MySQL 설정 파일 위치 확인하기

  • 리눅스의 경우 다음의 명령어를 실행한다.
mysqld --verbose --help | grep -A 1 'Default options'

설정 파일 sudo vim으로 열기

  • 설정을 변경할 수 있는 파일의 위치가 운영체제 별로 다르다는 사실에 주의하면 된다.
@sigridjineth
sigridjineth / change_branchName.md
Last active April 28, 2020 09:26
[Git Tip] 브랜치 이름 바꾸기

[Git Tip] How to rename your branch

Here are the steps to rename the branch:

  • Switch to the branch which needs to be renamed
  • git branch -m <new_name>
  • git push origin :<old_name>
  • git push origin <new_name>:refs/heads/<new_name>
  • Make sure you run command git status and check that the newly created branch is pointing to its own ref and not the older one. If you find the reference to the older branch, you need to unset the upstream using:
    • git branch --unset-upstream
@sigridjineth
sigridjineth / shell_ifstatement.md
Last active April 28, 2020 03:52
[Shell Tip] if문 오류 해결

[Shell Tip] Troubleshooting syntax errors while using if-else statement

문제 상황

  • 다음과 같이 배포 스크립트를 작성했는데, if문에서 계속 에러가 난다.
now=`git rev-parse HEAD`
origin=`git rev-parse origin/deploy`

if [$now == $origin]; then
        echo "origin and local is in the same status >.0"
@sigridjineth
sigridjineth / springboot_cookie.md
Created April 28, 2020 09:46
스프링 부트 쿠키 설정 및 제거
@sigridjineth
sigridjineth / README.md
Created April 28, 2020 20:56 — forked from ksundong/README.md
NginX spring reverse proxy설정 및 프론트 산출물 저장 경로 알아내기

NginX Reverse Proxy 설정

  • 설정 파일 수정

    sudo vi /etc/nginx/sites-available/default

            # Add index.php to the list if you are using PHP
            index index.html index.htm index.nginx-debian.html;
    
    
@sigridjineth
sigridjineth / nginx_reverseproxy.md
Created April 29, 2020 00:01
nginx spring reverse proxy하는 방법

Nginx Reverse Proxy Configuration

  • 다음의 설정파일로 접속한다. sudo vi /etc/nginx/sites-available/default
  • 아래의 내용을 추가한다.
        location /develop/ {
                rewrite ^:8080/develop(/.*)$ $1 break; # url에서 api 뒤에 있는 URL을 전부 그대로 사용.
                # ip/api/blahblah로 들어온 요청은 ip/blahblah로 Spring에 전달됩니다.
                proxy_pass http://localhost:8080;
 }
@sigridjineth
sigridjineth / ec2_mvfile.md
Last active April 29, 2020 04:54
[EC2 Tip] scp로 local에서 인스턴스로 파일 옮긴 후에 Nginx 활용하여 배포하기

EC2 scp 명령어로 Nginx 배포하기

1. 로컬에서 인스턴스로 파일 옮기기

scp -i "codesquad_sidedish10_server2.pem" -r /Users/jypsnewmac/Documents/build ubuntu@ec2-13-125-179-178.ap-northeast-2.compute.amazonaws.com:/home/ubuntu

2. 폴더 안의 파일 전체 옮기기

  • 배포를 위해서는 옮겨진 폴더 내부의 전체 파일 을 /var/www/html로 옮겨야 합니다.
  • 다음과 같은 형태로 옮기지 않도록 주의하세요. /var/www/html/build
@sigridjineth
sigridjineth / mysql_install.md
Last active May 5, 2020 01:50
Ubuntu 18.04 MySQL 설치

Mysql

MySql 5.7

mysql 설치하기

  1. mysql version 확인

    > sudo apt-cache search mysql-server