전체 글
-
[python] openai chatGPT컴퓨터 2023. 3. 6. 11:11
import openai def query_gpt_35_turbo(query): openai.api_key = "YOUR API KEY IS HERE" response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[{"role": "system", "content":"You are a helpful assistant that helps users generate ..."}, {"role":"user", "content": query}] ) return response.choices[0].message.content if __name__ == "__main__": print(query_gpt_35_turbo("안녕? 내 이름은 hikas..
-
[mac] NGINX brew start error컴퓨터/web 2022. 9. 26. 17:48
homebrew를 통해서 nginx 실행 시 info를 찍어보면 실행이 안 되고 있다. ❯ brew services start nginx ==> Successfully started `nginx` (label: homebrew.mxcl.nginx) ❯ brew services info nginx nginx (homebrew.mxcl.nginx) Running: ✘ Loaded: ✔ Schedulable: ✘ 물론 sudo로 실행시킬 순 있지만 추천하지 않는 방법이니, 아래와 같이 log 폴더의 권한을 변경 해주면 된다. 기존엔 root, 변경 후엔 실행 시키는 user ❯ sudo chown -R $(whoami) /usr/local/var/log/nginx Alias tip: _ chown -R $(w..
-
NGINX Reverse Proxy regex(정규표현식)컴퓨터/web 2022. 9. 7. 14:38
정규표현석: https://stackoverflow.com/questions/59846238/guide-on-how-to-use-regex-in-nginx-location-block-section Guide on how to use regex in Nginx location block section? Nginx regex location syntaxe Regex expressions can be used with Nginx location block section, this is implemented with the PCRE engine. What does exactly this feature support as it is not fully stackoverflow.com 정규표현식에서 변수 캡쳐: ht..
-
[MAC] Lunar - 모니터 조절(제어) 앱컴퓨터/miscellaneous 2022. 5. 6. 16:42
https://lunar.fyi/ Lunar - The defacto app for controlling monitor brightness The defacto app for controlling monitors. Change brightness, switch inputs, adjust volume and turn off displays without fiddling with clunky buttons. lunar.fyi 모니터(외부/내부) 제어를 앱에서. 귀찮게 외부 모니터에 손이 안 가도 된다. 단 가격은 $23, 한화 25,000원
-
[시놀로지]HA https 설정컴퓨터/Home IoT, 스마트홈 2021. 7. 26. 15:46
최근(?) 버전의 Home Assistant에선 기본적으로 외부에서 접속이 안된다. 외부에서 접속을 하기 위해선(특히 SmartThings 연결을 위해선) 몇 가지 설정을 해주어야 한다. 전제 시놀로지에 Docker로 설치 Domain 보유 SSL 설정 완료 제어판 - 응용 프로그램 포털 - 역방향 프록시 대상, 호스트 이름을 보통 localhost로 하나 HA에선 시놀로지 IP를 적어주어야 한다. config 폴더 configuration.yaml 수정 13번 줄부터 추가 이렇게 하면 외부(https) 접속도 가능하고 삼성 SmartThings에서도 접속이 가능하다
-
[node.js] React with Docker EPERM: operation not permitted, copyfile컴퓨터/language 2021. 4. 9. 02:40
docker ubuntu 이미지 내에서 React를 사용해 개발을 하고 있다. 개발환경에서는 build가 잘 되는데 운용환경에선 react build시 에러가 난다. 단순하게 file을 복사하는 과정에서 바로 발생한다. 문제 해결 방법은 2가지 인데 1. Docker version을 upgrade 개발: Ubuntu, Docker: 20.10.3 운용: Centos, Docker: 1.10.3(2016-03-10에 릴리스 되었다!!) 2. node.js version을 downgrade 기존: 14.15.5 변경: 14.8(14.9에서 시작되었는데 아직 fix가 안됨, node 문제인지 docker 문제인지..)