Home
sookyeong.dev
Cancel

Total (107)

MySql › MySql 레코드 단위로 정돈하여 출력하기

MySql 레코드 단위로 정돈하여 출력하기 쿼리의 끝에 ; 대신 \G 를 붙여준다. ; 으로 끝냈을 시 \G로 끝냈을 시

Flask › Flask CORS 설정

Flask CORS 설정 직접 헤더에 추가해주는 방법도 있지만 간단히 사용할 수 있는 모듈이 있다. 모듈 설치 pip install flask_cors CORS 설정 from flask_cors import CORS app = Flask(__name__) CORS(app)

Flask › Flask production server (Nginx+Gunicorn)

Flask production server 구조 Client - Web Server (Nginx) - WSGI Middleware (Gunicorn) - Web Application (Flask) - DB 위 구조로 세팅해야한다. Nginx는 Apache와 양대산맥을 이루는 웹서버로, event-driven 방식이라 Apache에 비해 가...

PHP › PHP Prepared Statement (SQL Injection Secure Coding)

PHP Prepared Statement 바인딩 데이터는 SQL 문법이 아닌 내부의 인터프리터나 컴파일 언어로 처리하므로 문법적인 의미를 가질 수 없다. 따라서 파라미터 바인딩 과정을 거치면 대부분의 SQL Injection 공격을 방지할 수 있다. $sql = "INSERT INTO apply(id, name, student_id,...

CSS › checked 상태에 따라 label 꾸미기

checked 상태에 따라 label 꾸미기 HTML <input type="radio" id="yes" value="yes" checked> <label for="yes"></label> CSS #yes+label { display: inline-block; width: 6...

CSS › checked 상태에 따라 display ON/OFF

checked 상태에 따라 display ON/OFF HTML <input type="checkbox" id="other" onclick="tool_other()" value="other"> <label for="other"></label> <div id="other_text" style="di...

Linux › HTTPS 자물쇠 달기 (Let's Encrypt)

Let’s Encrypt란? 무료 SSL 인증서 3분 만에 간단히 웹사이트에 HTTPS를 적용할 수 있다. 무료인 대신 기간 제한이 있다. 그러나 갱신도 무료다. 자동 갱신해주는 방법도 있으니 필요하다면 찾아보자. 사용 방법 Let’s Encrypt에 들어간...

CSS › hr 꾸미기

hr 꾸미기 hr { border: none; border-top: 1px solid #E3E7EB; overflow: visible; text-align: center; margin-top: 24px; height: 17px; } hr:after { content: "Welcome"; ...

Linux › nohup (no hangups)

755 이상 권한 부여 $ chmod 755 file.py nohup으로 실행 기본 $ nohup python3 file.py & 로그 즉시 확인 옵션 $ nohup python3 -u file.py & 로그파일명 변경 $ nohup python3 -u file.py > 로...

Linux › Background (&)

Background에서 작업 실행 $ python3 file.py & Foreground 작업을 Background로 옮기기 실행 $ python3 file.py 프로세스 일시정지 Ctrl+Z 백그라운드에서 재구동 $ bg 소유권 포기 $ disown -h Ba...

❤ Recent Post
❤ How About This
❤ Visitor Counter