Post

2022-03-23-TIL

2022-03-23-TIL

Today I Learned

Linux Crontab

특정 시간에 한 번만 특정 작업을 수행해야하는 경우에는 at 명령어로 예약을 걸어둘 수 있다. 하지만 주기적으로 반복해야하는 작업의 경우에는 crontab을 사용해야한다.

1
2
*       *        *        *        *
분(0-59)  시간(0-23)  일(1-31)  월(1-12)   요일(0-7)

Examples

1
0 1 * * * /home/script/test.sh >> /home/logs/test.log.$(date --utc +\\%Y\\%m\\%d_\\%H\\%M\\%SZ)

매일 1시 00분 /home/test.sh 스크립트를 실행하고, 그 출력결과를 /home/logs/test.log에 날짜포맷으로 저장한다.

  • https://jdm.kr/blog/2
  • https://www.baeldung.com/linux/create-crontab-script
  • https://24hours-beginner.tistory.com/210

OBS 가상 배경

게더타운에서 가상배경을 어떻게 쓰는지 찾아보다가 OBS를 통해 가상배경을 사용할 수 있다는 공식 답변을 발견했다.

  • https://obsproject.com/ko
  • https://www.youtube.com/watch?v=a-nA3JjBIrI
  • https://www.youtube.com/watch?v=3UNhCrFXGZw
  • https://www.flexclip.com/learn/obs-remove-background-without-green-screen.html
  • https://medium.com/@mhatrep/remove-video-background-without-a-green-screen-in-obs-studio-f73735b40c65
  • https://github.com/royshil/obs-backgroundremoval/releases/tag/v0.4.0
  • https://www.youtube.com/watch?v=8798QbmWp08

셸 스크립트 문법

  • https://probe29.tistory.com/47
  • https://blog.gaerae.com/2015/01/bash-hello-world.html
  • https://blog.d0ngd0nge.xyz/shell-script/
  • https://twpower.github.io/131-simple-shell-script-syntax
  • https://educoder.tistory.com/entry/Bash-%ED%8C%8C%EC%9D%BC-%EB%94%94%EB%A0%89%ED%86%A0%EB%A6%AC-%EA%B2%BD%EB%A1%9CPath-%EB%8B%A4%EB%A3%A8%EA%B8%B0-dirname-basename

자주쓰는 셸 스크립트

  • https://yangbongsoo.tistory.com/2
  • https://bannavi.tistory.com/77
  • http://seongwon654.blogspot.com/2017/06/shell-script.html
  • https://yangbongsoo.tistory.com/2?category=919802
  • https://5log.tistory.com/65

셸 스크립트 예제

  • https://linuxhint.com/30_bash_script_examples/
  • http://www.macs.hw.ac.uk/~hwloidl/Courses/LinuxIntro/x864.html
  • https://www.shellscript.sh/first.html
  • https://www.guru99.com/introduction-to-shell-scripting.html
  • https://www.tutorialspoint.com/unix/shell_scripting.htm
  • https://www.fosslinux.com/46250/35-bash-script-examples.htm
  • https://linuxhint.com/while_read_line_bash/
  • https://www.cyberciti.biz/faq/unix-linux-bash-read-comma-separated-cvsfile/

셸 스크립트 Best Practices

  • https://www.networkworld.com/article/2694433/unix-good-coding-practices-for-bash.html
  • https://learn.openwaterfoundation.org/owf-learn-linux-shell/best-practices/best-practices/
  • https://www.javacodegeeks.com/2013/10/shell-scripting-best-practices.html
  • https://bertvv.github.io/cheat-sheets/Bash.html
  • https://betterprogramming.pub/best-practices-for-bash-scripts-17229889774d
  • https://linuxhint.com/bash-programming-best-practices/

셸 스크립트 책

  • http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791162243893&orderClick=LAG&Kc=
  • http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791161751412&orderClick=LAG&Kc=
  • http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791161751009&orderClick=LAG&Kc=

Facebook Clone

  • https://github.com/tschellenbach/Django-facebook
  • https://github.com/bolah2009/facebook-clone
  • https://rails-fb-clone.herokuapp.com/users/sign_in
  • https://github.com/itswadesh/facebook-redesign
  • https://www.sourcecodester.com/php/facebook-alike-code.html
  • https://socialnetworking.solutions/social-engine/facebook-clone-package/

G1GC and ZGC

  • https://huisam.tistory.com/entry/jvmgc
  • https://sarc.io/index.php/java/2098-zgc-z-garbage-collectors

Tomcat log 확인

  • https://solbel.tistory.com/1150

Yn(char) 타입 vs boolean(tinyint)) 타입

Yn타입을 쓰는 경우는 만약에 true/false 이외의 값이 와도 변경에 대응할 수 있다는 장점이 있다. 하지만 장단점이 있다기보다는 기존에 DBMS의 타입 지원, Host Language와의 호환과 관련이 있던것이 관습적으로 내려오는 것 같다.

이전 회사의 시니어 개발자분이 “데이터가 직관적이라서 바로 파악이 가능하다.”라고 장점을 말했는데, 사실 나는 도저히 공감이 안 간다. 단지 그 이유만으로 선택하기에는 별로 장점이라고 하기 힘든 것 같다. 왜냐하면 1/0으로 저장된 값과 컬럼 이름만으로도 충분히 직관적이기 때문이다.

  • https://stackoverflow.com/questions/470984/what-is-your-preferred-boolean-pair-1-0-yes-no-true-false
  • https://dba.stackexchange.com/questions/84501/enum-vs-boolean-in-case-of-multiple-yes-no-fields
  • https://okky.kr/article/303186
  • https://okky.kr/article/429651
  • https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_db&wr_id=218562
  • https://jaehoney.tistory.com/80
  • https://stackoverflow.com/questions/2023476/which-is-faster-char1-or-tinyint1-why
  • https://nomadlee.com/mysql-%EC%B5%9C%EC%A0%81%EC%9D%98-%EB%8D%B0%EC%9D%B4%ED%84%B0-%ED%83%80%EC%9E%85-%EC%84%A0%ED%83%9D-%EB%B0%A9%EB%B2%95/
  • https://stackoverflow.com/questions/4351394/sql-best-way-to-store-yes-no-values-looking-after-performance-in-huge-database
  • https://stackoverflow.com/questions/1908454/using-0-1-versus-y-n-versus-t-f-in-a-logical-boolean-database-fiel

DB에서 char과 varchar

  • https://okky.kr/article/217655
This post is licensed under CC BY 4.0 by the author.