Personal Stuff.

Useful Codes

[다음](/think-bayes/#More)
...
<a id="More"></a>이하는 여담, 간만에 빠른 의식의 흐름으로 전개...
  • Post 설정 예시
---
title: "Think Bayes"
date: 2019. 3. 25. 오후 9:23:22
categories:
tags:
use_math: true
toc: true
toc_label: "Table of Contents"
toc_icon: "cog"
toc_sticky: true
---
---
title: "Bayesian Methods for Hackers"
date: 2019. 4. 2. 오후 10:45:33
categories:
tags:
use_math: true
classes: wide
---
  • 비공개 전환 필요시 published : false 추가

  • Page 설정 예시

---
title: "Personal Stuff."
permalink: /misc/
layout: single
author_profile: true
---
---
title: "Page Not Found"
excerpt: "Page not found. Your pixels are in another canvas."
permalink: /404.html
layout: single
author_profile: true
---
  • 문장 강조
문장 강조
{: .notice--info}

문장 강조

  • Inline 강조
`Inline 강조` 예시

Inline 강조 예시


github.io


Markdown


MathJax


실행 스크립트

  • github_push.sh (sh github_push.sh “Modify-Post.”)

#!/bin/sh
cd /Users/kimsanghun/MissFlash/Github
git remote add missflash https://github.com/missflash/missflash.github.io.git
git remote -v
git pull missflash master
git add .
git commit -m “$@”
git push -u missflash master

cd /Users/kimsanghun/MissFlash/Github_MF_Stuff
git remote add mf_stuff https://github.com/missflash/MF_Stuff.git
git remote -v
git pull mf_stuff master
git add .
git commit -m “$@”
git push -u mf_stuff master

  • github_push2.sh (sh github_push2.sh “Update-Repository.”)

#!/bin/sh
cd /Users/kimsanghun/Dropbox/MissFlash/Personal/Visiting_Scholars/4.Research/Samsung-KAIST
git remote add Reinforcement_Project https://github.com/missflash/Reinforcement_Project.git
git remote -v
git pull Reinforcement_Project master
git add .
git commit -m “$@”
git push -u Reinforcement_Project master

cd /Users/kimsanghun/PycharmProjects/TensorFlowV1/lib/python3.7/site-packages/pyjssp
git remote add pyjssp https://github.com/missflash/pyjssp.git
git remote -v
git pull pyjssp master
git add .
git commit -m “$@”
git push -u pyjssp master

  • github 참고사항
    • sh 실행
      • cd /Users/kimsanghun/MissFlash
      • sh github_push.sh “Modify-Post.”
    • 초기 설정
      • Project 디렉토리로 이동
      • git config –global user.name “missflash”
      • git config –global user.email “missflash@gmail.com”
      • git config –global credential.helper store (로그인 정보는 ~/.git-credentials 에 저장)
      • git config –global color.ui “auto”
      • git config –global alias.glog “log –oneline –graph”
        • git glog 로 명령어 alias
    • 설정 확인
      • git config –list
    • 사용자 계정 삭제
      • Mac > 키체인 접근 > 모든 항목 > github.com 삭제
    • [Not Works!] 사용자 계정 삭제
      • –git credential-osxkeychain erase
    • [Not Works!] 사용자 비밀번호 변경
      • –git config –global –unset user.password
    • Git 저장소 생성 (.git 디렉토리 생성)
      • git init
    • 로컬 경로 이동
      • cd /Users/kimsanghun/MissFlash/Github
    • 리모트 저장소 연결
      • git remote add origin https://github.com/missflash/missflash.github.io.git
    • 리모트 저장소 확인
      • git remote -v
    • 다운로드
      • git pull origin master
      • git pull https://github.com/missflash/missflash.github.io.git master
      • // – fatal: refusing to merge unrelated histories 에러 발생시 아래 명령 수행
      • // git pull origin master –allow-unrelated-histories
    • 로컬 경로 모든 파일 업로드 (_post 폴더에 글 작성 후)
      • git add .
      • git commit -m “.”
    • 업로드
      • git push -u origin master
      • git push https://github.com/missflash/missflash.github.io.git master
    • remote 제거
      • git remote remove origin
    • Commit 삭제 : https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html
      • git reset –hard HEAD~3
    • 100MB 이상 파일 Commit 불가
    • Your branch is ahead of ‘origin/master’ by 3 commits 에러 메시지 발생시
      • git push -u origin master 으로 정상 push 시도
      • 위 방법으로 안될 경우,
        • local 수정 파일을 다른 경로로 이동
        • git reset –hard origin/master 으로 remote의 버전으로 local 리셋
        • local 수정 파일 다시 복원
        • git push -u origin master 으로 정상 push 시도
    • 새로운 Repository 추가
      • 신규 디렉토리 new_project 생성
      • cd new_project
      • git init
      • vi .gitignore
      • 스크립트 수정
      • 스크립트 실행 테스트
    • Commit 취소하기 (HEAD 위치 변경, 로컬 저장소를 Commit 이전으로 변경)
      • git log –pretty로 되돌릴 Commit의 “해시” 확인
        • git log –oneline
      • “git reset –hard 해시”로 Commit 복귀
      • “git clean -n”로 삭제대상 파일 확인
      • “git clean -f”로 파일 삭제
      • git commit -m “Reset Commit”
      • git push -u –force pg master
    • Commit 내용 되돌리기
      • git log –oneline
      • “git revert 해시”로 Commit 내용 되돌리기
      • git commit -m “Revert Commit”
      • git push -u –force pg master
    • 상태 확인
      • git status