본문 바로가기

728x90

전체 글

[python] 파이썬 로또 번호 생성기 파이썬 로또 번호 생성기 lotto_v1.py 생성 import random ### 로또 번호 생성 def lotto_numbers(): numbers = random.sample(range(1, 46), 6) numbers.sort() print(numbers) ### 로또 시행 횟수 def lotto_count(): count = int(input("시행 횟수 : ")) print("#" * 30) if 0 < count range object range(start, stop[, step]) range() : 시작(포함), 끝(제외), step(옵션) ex) range(1, 46), 6 = 시작(1), 끝(45) 실행 $ python lotto_v1.py 시행 횟수 : 1 ###############.. 더보기
python 모듈 탐색 경로 찾기 python 모듈 탐색 경로 찾기 테스트 환경 $ python --version Python 3.9.13 파이션 3.9의 sys.path 값 - 임포트할 모듈 경로 python import sys for place in sys.path: print(place) $ python Python 3.9.13 (main, Aug 7 2022, 01:19:39) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> for place in sys.path: ... print(place) ... /opt/homebrew/Cella.. 더보기
[리눅스] macOS에 ansible 설치 macOS에 ansible 설치 테스트 환경 system_profiler SPSoftwareDataType | egrep 'System Version' $ system_profiler SPSoftwareDataType | egrep 'System Version' System Version: macOS 12.5 (21G72) ansible 설치(brew install) ansible search brew search ansible $ brew search ansible ==> Formulae ansible ansible-cmdb ansible-language-server ansible-lint [email protected] [email protected] ==> Casks ansible-dk ansible informatio.. 더보기
macOS 버전 정보 확인(command) macOS 버전 정보 확인(command) macOS 버전 확인 $ sw_vers -h Usage: sw_vers [-productName|-productVersion|-buildVersion] sw_vers $ sw_vers ProductName:macOS ProductVersion:12.5 BuildVersion:21G72 system_profiler 명령 $ system_profiler -h Usage: system_profiler [-listDataTypes] system_profiler [-xml | -json] [-timeout n] [-detailLevel n] system_profiler [-xml | -json] [-timeout n] [dataType1 ... dataTypeN] -de.. 더보기
[기타] 코드로서의 다이어그램(Diagram as Code) 코드로서의 다이어그램(Diagram as Code) https://blog.bytebytego.com/p/diagram-as-code?fbclid=IwAR1B-4U1aOf7lssmFww7SRJ0GqMsYw8sOwIhuH0ELgYgOqOIT4ban3edJIU Diagram as Code 6 different ways to turn code into beautiful architecture diagrams blog.bytebytego.com 더보기
GitLab에서 리포지토리 미러링을 구성하는 방법(gitlab -> github 미러링) GitLab에서 리포지토리 미러링을 구성하는 방법(gitlab -> github 미러링) github 리포지토리 생성 및 tokens 생성 repository 생성 repository name : gitlab_mirror tokens 생성 Settings > Developer settings > Personal access tokens gitlab 프로젝트 생성 및 미러링 설정 프로젝트 생성 프로젝트 그룹 : testG 프로젝트 이름 : gitlab_source 미러링 설정 testG > gitlab_source > 저장소 설정 Git 저장소 URL : https://아이디@github.com/아이디/gitlab_morror.git 미러 방향 : Push 인증 방법 : 패스워드 패스워드 : 2691109.. 더보기
gitlab ssh를 사용하여 미러링 구성(gitlab 리포지토리 미러링) gitlab ssh를 사용하여 미러링 구성(gitlab 리포지토리 미러링) GitLab 미러링은 외부 Git 리포지토리(예: GitHub, Bitbucket)와 GitLab 사이의 리포지토리 동기화를 허용합니다. [구성] 원본 리포지토리 : gitlab-mirror-source 미러 리포지토리 : gitlab-mirror-target 원본 리포지토리 저장소 설정 프로젝트 > gitlab-mirror-source > 저장소 설정 - 미러 리포지토리 SSH URL 필요 미러링 저장소 설정 Git repository URL(Git 저장소 URL) Mirror direction(미러 방향) Detect Host Keys(호스트 키 발견) Authentication method(인증 방법) 미러링 설정 완료 미러.. 더보기
Let's Encrypt(certbot) SSL 인증서를 발급하는 방법 Let's Encrypt(certbot) SSL 인증서를 발급하는 방법 Let's Encrypt는 무료로 SSL/TLS 인증서를 발급하는 공개 기관으로, Certbot라는 도구를 통해 간단하게 SSL 인증서를 발급할 수 있습니다. Plugin Auth Inst Notes Challenge types (and port) apache Y Y Apache를 사용하여 인증서 획득 및 설치를 자동화합니다. http-01(80) nginx Y Y Nginx로 인증서 획득 및 설치를 자동화합니다. http-01 (80) webroot Y N 이미 실행 중인 웹 서버의 webroot 디렉토리에 기록하여 인증서를 얻습니다. http-01(80) standalone Y N "standalone" 웹 서버를 사용하여 인증서.. 더보기

728x90