본문 바로가기

분류 전체보기223

keycloak 설치 * 가이드 https://www.keycloak.org/getting-started/getting-started-docker * 도커 컴포즈 version: '3' services: keycloak: image: quay.io/keycloak/keycloak:23.0.0 ports: - "8080:8080" environment: - KEYCLOAK_ADMIN=admin - KEYCLOAK_ADMIN_PASSWORD=admin command: ["start-dev"] * 테스트를 위해 https 요구사항 끄기 (컨테이너 내부에서 실행) cd /opt/keycloak/bin ./kcadm.sh config credentials --server http://localhost:8080 --realm maste.. 2023. 11. 24.
스플렁크 쿼리 결과 가져오기 import requests import pandas as pd from io import StringIO # 자체 인증서 사용시 필요 requests.packages.urllib3.disable_warnings() # 변수 정의 url = "https://splunk.test.com:8089/services/search/v2/jobs/export" #8089 포트 오픈 필요 username = "admin" password = "pw" search_query = "search host=log.test.com | timechart span=1h count" earliest_time = "-1d@d" latest_time = "now" output_mode = "csv" # 데이터 설정 data = { '.. 2023. 11. 10.
다른 PC로 파일 전송 https://news.hada.io/topic?id=11093 Croc - 2개의 컴퓨터간에 안전하고 쉽게 파일전송하기 | GeekNews CLI로 2개의 컴퓨터간 파일 전송(릴레이 사용)PAKE를 이용한 E2E 암호화 지원윈/맥/리눅스 크로스 플랫폼 전송다수 파일 및 폴더 전송 지원중단된 파일 이어받기 가능로컬서버 또는 포트포워딩 필 news.hada.io https://github.com/schollz/croc GitHub - schollz/croc: Easily and securely send things from one computer to another :package: Easily and securely send things from one computer to another :crocodi.. 2023. 10. 13.
도커로 postgresql 환경 구축 백업을 위한 볼륨 docker volume create pgdata --- version: '3' services: postgre_my: image: postgres container_name: postgre_my ports: - "8501:5432" environment: POSTGRES_PASSWORD: mypw volumes: - pgdata:/var/lib/postgresql/data pgadmin: image: dpage/pgadmin4 container_name: pgadmin ports: - "8080:80" environment: PGADMIN_DEFAULT_EMAIL: my@test.com PGADMIN_DEFAULT_PASSWORD: mypw depends_on: - postgre_my.. 2023. 9. 5.
깨진 링크 검사기 (broken link checker) gpt 도움으로 작성 import requests import sys from urllib.parse import urlparse, urljoin from bs4 import BeautifulSoup import time # Disable unnecessary warning messages requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning) SUPPORTED_SITES = { "1": "https://www.test1.com/", "2": "https://www.test2.com/", "3": "https://www.test3.com/" } EXCLUSION_LIST = .. 2023. 8. 23.
리눅스에서 도커 환경 구축하기 거의 모든 리눅스는 한방 설치 https://github.com/docker/docker-install curl -fsSL https://get.docker.com | sh --- 아마존 리눅스 2 엔진 설치 https://gist.github.com/npearce/6f3c7826c7499587f00957fee62f8ee9 sudo amazon-linux-extras install docker sudo service docker start sudo usermod -a -G docker ec2-user 파이썬 버전이 안맞으면 sudo update-alternatives --config python 부터 설정 컴포즈 설치 플러그인 방식은 안되므로 독립 실행형으로 진행 https://docs.docker.co.. 2023. 8. 11.
yield 한 방에 이해하기 지피티가 기가 막히게 설명해주네 비유를 사용하면, return은 책을 읽다가 북마크 없이 닫는 것과 같습니다. 다시 열면 처음부터 시작해야 하죠. 반면, yield는 책에 북마크를 끼워놓고 닫는 것과 유사합니다. 다시 열면 북마크가 있는 곳부터 계속 읽을 수 있습니다. 2023. 8. 4.
edge-tts 사용해보기 https://github.com/rany2/edge-tts edge-tts --voice ko-KR-SunHiNeural --text "안녕하세요. 오늘 하루 어땠나요?" --write-media hello.mp3 의외로 들을만? 2023. 7. 21.
amazon linux 2 - 파이썬 3.11 설치 sqlite와 ssl 사용시 문제 나올 수 있으니 주의 (아직 해결책 못찾음) ModuleNotFoundError: No module named '_sqlite3' ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002) --- 필요한 도구들 사전 설치 파이썬 3.10 부터는 openssl1.1.1 이상이 필요 (링크) sudo yum update -y sudo yum groupinstall "Development Tools" -y sudo yum erase openssl-devel -y sudo yum in.. 2023. 7. 10.