[git] fatal: refusing to merge unrelated histories
push 또는 pull 할 때 아래와 같은 에러가 났다. fatal: refusing to merge unrelated histories 이는 git에서 서로 관련 기록이 없는 다른 프로젝트를 병합할 때 이런 에러가 뜬다고 한다. 그래서 이를 허용해주려면 쳤던 명령어에서 아래와 같은 명령어 옵션을 붙여준다. --allow-unrelated-histories
2023.09.27
no image
[Tmux] Tmux 사용법
Tmux Tmux는 terminal multiplexer의 약자로 하나의 터미널에서 화면 분할을 할 수 있게끔 해주고, 특히 딥러닝을 학습 시 ssh 연결을 통해 작업을 많이 하게 되는데, 이 때 tmux를 사용하면 ssh 서버와 연결이 끊겨도 작업중인 세션들이 사라지지 않도록 해준다. Tmux 설치하기 및 설치 확인 $ sudo apt install tmux $ tmux -V Tmux 생성하기 $ tmux 아래와 같이 session에 이름을 지정하여 생성하는 방법은 아래와 같다. $ tmux new -s [세션명] test라는 이름을 지정하여 생성하면 아래와 같이 창이 나타난다. Session 확인하기 아래와 같이 명령어를 입력해주면 detached 되어있는 session을 확인할 수 있다. $ tmu..
2023.04.27
[GitHub] 주로 사용하는 GitHub 명령어 모음
⭐⭐⭐⭐⭐ 내가 헷갈려서 정리해보는 주로 사용하는 GitHub 명령어 모음집 ⭐⭐⭐⭐⭐ Git 기본 명령어 현재 상태 확인 (내가 제일 많이 사용하는 명령어)git status 전체 로그 확인 git log git 저장소 생성하기 git init 저장소 복제 및 다운로드 git clone [https: ~~~~ ] 저장소에 코드 추가git addgit add * 커밋에 파일의 변경 사항을 한번에 모두 포함 git add -A 커밋 생성git commit -m "message" 변경 사항 원격 서버 업로드 (push)git push origin master 원격 저장소의 변경 내용을 현재 디렉토리로 가져오기 (pull)git pull 변경 내용을 merge 하기 전에 바뀐 내용 비교git diff [브랜치..
2022.10.28
[OpenGL] How to write PYopenGL in to JPG image
Python 환경에서 OpenGL 창을 image로 저장할 때 사용하는 코드는 아래와 같다. 여기서는 PIL 라이브러리를 사용한다. from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * from PIL import Image from PIL import ImageOps import sys width, height = 300, 300 def init(): glClearColor(0.5, 0.5, 0.5, 1.0) glColor(0.0, 1.0, 0.0) gluOrtho2D(-1.0, 1.0, -1.0, 1.0) glViewport(0, 0, width, height) def render(): glClear(GL_COLOR_BU..
2022.09.19
no image
[Ubuntu] 우분투 하드디스크 이름 변경
우분투 하드디스크 이름이 /media/name/5b6a0f05-0f7f-4bbb-8b52-a3********b71 이런 식으로 설정되어 있어서 reboot을 할 때 마다 위 이름 끝자리에 넘버링이 추가로 되면서 계속 이름이 변경되길래 /mnt/storage 로 이름을 변경하였다. 1. Disks 앱 열기 2. 변경할 하드디스크 파티션 선택 3. 설정 버튼 클릭 4. Edit mount options 5. User Sessioin Defaults 토글 버튼 해제 6. Mount Point 경로 수정 참고자료 : https://askubuntu.com/questions/904561/how-to-change-hard-drive-name How to change hard drive name my hard dri..
2022.06.27
[FFmpeg] 비디오 자르기(video crop)
command ffmpeg -i input.mp4 -filter:v "crop=w:h:x:y" -c:a copy output.mp4 -i input.mp4 specifies the input video (input.mp4 being the input / original video in this case) -filter:v (can be abbreviated to -vf) specifies we're using a video filter "crop=W:H:X:Y" means we're using the "crop" video filter, with 4 values: w the width of the output video (so the width of the cropped region), which def..
2022.01.24
[FFmpeg] usb cam 이용하여 실시간 영상 저장하기
먼저 아래와 같이 연결된 디바이스를 확인해준다. v4l2-ctl --list-devices 그 다음 디바이스 네임을 이용하여 영상을 저장한다. ffmpeg -f v4l2 -framerate 30 -video_size 1920x1080 -i /dev/video0 output.mp4
2022.01.13
[LaTex] 기호 모음
1. 그리스 문자 α \alpha β \beta γ \gamma δ \delta ϵ \epsilon ζ \zeta η \eta θ \theta ι \iota κ \kappa λ \lambda μ \mu ν \nu ξ \xi o o (omicron) π \pi ρ \rho σ \sigma τ \tau υ \upsilon ϕ \phi χ \chi ψ \psi ω \omega ε \varepsilon ϑ \vartheta ϰ \varkappa ϖ \varpi ϱ \varrho φ \varphi ς \varsigma A A (Alpha) B B (Beta) Γ \Gamma Δ \Delta E E (Epsilon) Z Z (Zeta) H H (Eta) Θ \Theta I I (Iota) K K (Kappa) Λ ..
2021.08.09
no image
[LaTex] Overleaf 에서 Latex 로 문서 편집하기
Overleaf https://www.overleaf.com/ Overleaf, Online LaTeX Editor An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more. www.overleaf.com LaTex 문법 사용법 PDF : http://mirrors.ibiblio.org/CTAN/info/lshort/korean/lshort-ko.pdf 한글로 문서를 작성할 경우 아래와 같이 kotex package 를 사용하면 된다. \documentclass{article} \usepackage{kotex} \..
2021.08.09
[FFmpeg] RSTP 영상 저장하기
아래와 같은 명령어로 RSTP 영상을 저장할 수 있다. ffmpeg -i "rtsp://address~" "001.mp4" 하지만 아래와 같이 에러가 날 경우, [rtsp @ 0x556150991900] Nonmatching transport in server reply rtsp://address~: Invalid data found when processing input 아래와 같이 rtsp_transport 옵션을 지정해준다. ffmpeg -rtsp_transport tcp -i "rtsp://address~" "001.mp4" -rtsp_transport ED...... set RTSP transport protocols (default 0) udp ED...... UDP tcp ED...... T..
2021.08.06
[FFmpeg] ffmpeg command
아래 명령어로 command 를 살펴보았다. 나중에 궁금한 내용 필요할 때 Ctrl+F 해서 찾아봐야겠다. ~$ ffmpeg -h full Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Getting help: -h -- print basic options -h long -- print more options -h full -- print all options (including all format and codec specific options, very long) -h type=name -- print all options for ..
2021.08.06
[ffmpeg] Linux에서 ffmpeg 으로 m3u8 URL 동영상 저장하기
ffmpeg -i "URL" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4 참고자료 : https://www.vividian.net/2020/09/42 m3u8를 mp4로 변환 (ffmpeg 이용) – vividian repository www.vividian.net
2021.06.04