prompt_status:5: command not found: wc mac에서 fzf 설치시 zshrc에 뭔가를 추가하는데 에러가 발생하여 아무것도 안되서 찾아보니 아래와 같이 임시로 우회하는 방법이 있다. 해당 명령 이후에 ~/.zshrc의 문제되는 부분을 수정 삭제하면 된다. 혹시 모르니 백업을 해두자..ㅠㅠ export PATH=%PATH:/bin:/usr/local/bin:/usr/bin 기타/MAC 2025.02.17
MAC 필수 프로그램 1. rectangle Mac윈도우처럼 화면을 배치 시킬 수 있는 프로그램https://rectangleapp.com/ RectangleMove and resize windows in macOS using keyboard shortcuts or snap areas. The official page for Rectangle.rectangleapp.com 2. owlfiles윈도우 탐색기와 가장 비슷한 프로그램https://www.skyjos.com/owlfiles/help/macos/help_macos.html Owlfiles - Skyjos www.skyjos.com 3. shottr 화면 캡쳐프로그램https://shottr.cc/ Shottr – screenshot app for pixel profe.. 기타/MAC 2024.12.16
windows powershell 에서 환경 변수를 설정해서 go 실행하는 방법 windows powershell에서는 linux에서 처럼 환경변수를 설정해서 하는 것이 같은 문법으로는 안된다.* linuxAPP_ENV=local go run main.go * powershell$env:APP_ENV="local"; go run main.go Dev/Go 2024.10.29
golang 숫자 표시 golang에서 숫자를 표시 할때"_" 를 통해서 쉼표(,)와 같은 구분 값을 넣을 수 있습니다. 꼭 3자리마다 _를 넣어야 하는 것은 아니며 단지 구분을 위해서 사용하는 코드입니다.fmt.Println(1_000_000_000, 100000000)fmt.Println(10_0_0_0_000, 10000000)1000000000 10000000010000000 10000000// 10_000_000_00// 10 000 000 00// 1000000000// 10_0_0_0_000// 10 0 0 0 000// 10000000 Dev/Go 2024.06.13
golang 문자열 포맷 스트링 tip golang에 포맷 문자열 생성시 C언어와 같이 %s %d 의 문자열 포맷을 설정 하는데 인자 순서와 일치 되어야 합니다. 아래의 코드 처럼 순서에 상관없이 인자를 출력 할 수 있는 방법이 있습니다. fmt.Printf("name : %[1]s, age : %[2]d, name : %[1]s\n", "haha", 10)name : haha, age : 10, name : haha Dev/Go 2024.06.13
golang Functional Options Pattern golang Functional Options Patternpackage servertype Server { host string port int timeout time.Duration maxConn int}func New(options ...func(*Server)) *Server { svr := &Server{} for _, o := range options { o(svr) } return svr}func (s *Server) Start() error { // todo}func WithHost(host string) func(*Server) { return func(s *Server) { s.host = host }}func WithPort(port int) func(*.. Dev/Go 2024.06.05
postgresql pid(session id) 확인 postgresql pid(session id) 확인SELECT * FROM pg_stat_activity;SELECT pg_backend_pid(); Database/Postgresql 2024.05.16
xz: Cannot exec: No such file or directory xz 파일 압축해제시 에러 발생하는 경우 tar xvf linux-arm64-based.tar.xz tar (child): xz: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now xz 패키지를 설치 한다. dnf -y install xz Dev/Linux 2024.04.19
docker image ENTRYPOINT override 기존의 docker image를 가지고 추가 작업을 하고 ENTRYPOINT를 수정하려고 하였는데 dockerfile에 ENTRYPOINT를 추가 하면 추가 인자로 인식되는 이상 짓을 하게 된다. 그래서 찾아보니 docker의 --entrypoint 옵션을 사용해야만 변경이 된다. docker compose 는 entrypoint: "새로운 명령어" 로 작업을 변경 할 수 있다. Dev/docker 2024.04.18
google Project IDX 이전에 신청해 놓은 google의 웹 개발 IDE의 사용이 허가 되었습니다. 우선 flutter의 에뮬레이터가 너무 궁금해서 프로젝트를 생성 했는데 실패....ㅠㅠ golang 프로젝트는 생성하는데 성공!!! 우선 IDE는 VS code 기반입니다.(이건 이전에 설명을 봐서 알고 있었습니다.) VS code도 Web 버전이 존재하는데 차이가 뭐가 있을까 했는데... 다른건 모르겠고 가장 큰 차이가 Extension이 거의 다 설치 되는 것!!! VS code Web은 Extension이 거의 설치 안되는데 IDX는 거의 설치가 가능!!! 써보니 그냥 VMWare 서버 한대를 나누어주는 구조이고 거기에 VS code를 프로파일별로 보여주는 듯 느낌은 너무 느리다. flutter의 에뮬은 web, andri.. Dev/Go 2024.04.02