전체 글 썸네일형 리스트형 [코딩테스트 입문] 문자 반복 출력하기 문자 반복 출력하기1안) solution.pydef solution(my_string, n): answer = '' my_list = [] for mystr in my_string: my_list.append(mystr * n) answer = ''.join(my_list) return answer2안) solution.pydef solution(my_string, n): answer = '' for m in my_string: answer += (m * n) return answer 참고URL- 프로그래머스(코딩테스트 연습) : https://school.programmers.co.kr/learn/c.. 더보기 [코딩테스트 입문] 아이스 아메리카노 아이스 아메리카노1안) solution.pydef solution(money): answer = [] coffee = money // 5500 change = money % 5500 answer = [coffee,change] return answer2안) solution.pydef solution(money): answer = [] coffee,change = divmod(money,5500) answer = [coffee,change] return answer 출처 - 프로그래머스(코딩테스트 연습) : https://school.programmers.co.kr/learn/courses/30/lessons/120819 더보기 [코딩테스트 입문] 문자열안에 문자열 문자열안에 문자열 1안) solution.py def solution(str1, str2): answer = 0 if str2 in str1: answer = 1 else: answer = 2 return answer 2안) solution.py def solution(str1, str2): answer = 0 answer = str1.find(str2) if answer == -1: answer = 2 else: answer = 1 return answer 출처 - 프로그래머스(코딩테스트 연습) : https://school.programmers.co.kr/learn/courses/30/lessons/120908 더보기 [mac] vscode(Visual Studio Code)에서 Python 개발환경 설정 vscode(Visual Studio Code)에서 Python 개발환경 설정 vscode 명령 표시 및 실행 - MAC : command + shift + p - WINDOWS : ctrl + shift + p 명령 표시 및 실행 창에서 "Python: Select Interpreter" 검색 인터프리터 선택 - /opt/homebrew/bin/python3 선택 test1.py 코딩 # -*- coding: utf-8 -*- #!/usr/bin/env python import os import requests url = "https://www.sangchul.kr" response = requests.get(url) print("status code :", response.status_code) py.. 더보기 [스크립트] AWS 클라우드프론트 아이피를 가져와 zonefile을 생성하시오 AWS 클라우드프론트 아이피를 가져와 zonefile을 생성하시오 aws 서울 리전 클라우드프론트 아이피를 가져와서 현재 iplist.txt 파일에 있는 아이피 리스트와 대역을 비교하여 일치하면 iplist.txt에 있는 아이피로 A 레코드를 등록하고 zonefile을 생성하시오 cat iplist.txt 13.210.67.230 서울 리전의 클라우드프론트에 대한 모든 IPv4 주소 가져오기 curl -Ssf https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.region=="ap-southeast-2") | select(.service=="CLOUDFRONT") | .ip_prefix' $ curl -Ssf http.. 더보기 Shell 스크립트 if 조건문 Shell 스크립트 if 조건문기본 구문(if 문법)if [ condition ]then # code to execute if condition is truefiif - else 문법if [ condition ]then # code to execute if condition is trueelse # code to execute if condition is falsefiif - elif - else 문법if [ condition1 ]then # code to execute if condition1 is trueelif [ condition2 ]then # code to execute if condition2 is trueelse # code to execute if both conditions .. 더보기 [기타] 티스토리 블로그 도메인을 구매한 도메인으로 리다이렉트(redirect) 설정 티스토리 블로그 도메인을 구매한 도메인으로 리다이렉트(redirect) 설정 4wxyz.tistory.com 티스토리 블로그 도메인을 sangchul.kr 도메인으로 리다이렉트 설정하기 티스토리 관리자 페이지 > 꾸미기 > 스킨 편집 > html 편집 아래와 같이 추가 사이에 추가합니다. 티스토리 블로그 이름 클릭 시 4wxyz.tistory.com -> sangchul.kr 리다이렉트 됩니다. 더보기 티스토리에 클라우드플레어를 설정하고 연동하기 티스토리(tistory) 클라우드플레어(Cloudflare) 설정 및 연동하기클라우드플레어(Cloudflare) URL : https://www.cloudflare.com/ 1. 사이트 추가사이트 입력(sangchult.kr)2. 빠른 스캔3. DNS 레코드 검토- 레코드 추가티스토리 연결을 위해 오리진 및 www 서브 도메인 추가- host.tistory.io 또는 blog.tistory.com이름(서브 도메인)형식(레코드)IPv4(값)비고@A27.0.236.139 wwwCNAMEhost.tistory.io blogCNAMEhost.tistory.io 4. 이름 서버 변경(네임서버 변경) 5. 레지스트라(registrar) 도메인 네임 변경레지스트라에 등록되어 있는 네임서버 정보를 변경합니다.기존(h.. 더보기 이전 1 ··· 125 126 127 128 129 130 131 ··· 298 다음