Password Validation Regular Expression

조건

10~20 자리 이내 영문, 숫자, 특수문자(!, @, ) 중 2종류 이상 또는 8~20자리 이내 영문, 숫자, 특수문자(!, @, ) 중 3종류 이상을 조합

조건 정리

  1. 10~20 자리 이내 영문, 숫자, 특수문자(!, @, *) 중 2종류 이상 조합
  2. 8~20자리 이내 영문, 숫자, 특수문자(!, @, *) 중 3종류 이상 조합

상세 조건 및 정규식

    1. password must contain 1 number (0-9)
    2. password must contain 1 uppercase letters or 1 lowercase letters
    3. password must contain 1 special characters, of the group !@*
    4. password must contain 2 or more of the above
    5. password is 10-20 characters with no space
    1. password must contain 1 number (0-9)
    2. password must contain 1 uppercase letters or 1 lowercase letters
    3. password must contain 1 special characters, of the group !@*
    4. password is 10-20 characters with no space

정규식

  1. password must contain 1 number (0-9)
    • (?=.*\d)
  2. password must contain 1 uppercase letters or 1 lowercase letters
    • (?=.*[a-zA-Z])
  3. password must contain 1 special characters, of the group !@*
    • (?=.[!@])
  4. password is 10-20 or 8-20 characters with no space
    • ([^\s]){10,20} or ([^\s]){8,20}

정규식

  1. ^(?=.\d)(?=.[!@])([^\s]){10,20}$|^(?=.\d)(?=.[a-zA-Z])([^\s]){10,20}$|^(?=.[a-zA-Z])(?=.[!@])([^\s]){10,20}$
  2. ^(?=.\d)(?=.[a-zA-Z])(?=.[!@])([^\s]){8,20}$

^(?=.\d)(?=.[!@])([^\s]){10,20}$|^(?=.\d)(?=.[a-zA-Z])([^\s]){10,20}$|^(?=.[a-zA-Z])(?=.[!@])([^\s]){10,20}$|^(?=.\d)(?=.[a-zA-Z])(?=.[!@])([^\s]){8,20}$

최종

https://regex101.com/r/hqMtyd/3

(?=.\d)(?=.[!@])([\s]){10,20}$|(?=.\d)(?=.[a-zA-Z])([^\s]){10,20}|(?=.[a-zA-Z])(?=.[!@])([\s]){10,20}|(?=.\d)(?=.[a-zA-Z])(?=.[!@])([^\s]){8,20}

.htaccess http를 https로 redirect

.htaccess

.htaccess = hypertext access

웹 서버가 지원하는 디렉터리 수준의 설정파일

Apache에서 주로 사용

www폴더에 존재

redirect

http로 접속시 자동으로 https 프로토콜로 전환

해당 URL로 이동시켜주는 역활

방법

.htaccess 파일 수정

1
2
3
4
5
6
7
8
9
10
11
12
13
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>

에러

쿠키 어쩌고 하면서 안되는 경우

firefox기준

이 문제는 드물게 해당 사이트에서 요구하는 쿠키를 차단하여 발생할 수 있습니다.

index 이름을 갖고 있는 파일이 여러개인 경우 정확한 파일을 찾지 못하여 문제가 발생 할 수 있음

사용하는 index.html 하나만 위치시키면 해결

나도 zsh를 써보고 싶었다.

나도 zsh이 쓰고 싶다

zsh가 사용하고 싶었음.

윈도우 사용자라 못생긴 검정 cmd말고 알록달록 예쁜 zsh이 부러움.

zsh는 사용 못 하지만 cmd이 아닌 PowerShell을 이용하면 oh-my-posh라는 것을 사용 할 수 있음.

PowerShell에 ConEmu라는 것을 이요하여 oh-my-posh를 설치하고 FluentTerminal을 이용하여 PowerShell을 사용하면 됨.

gh-pages를 이용한 github.io에 게시하기

ng-pages

설치

1
$ npm i gh-pages

package.json 설정

“homepage”추가

http://<github ID>.github.io/<Repository Name>

1
2
3
4
"name": "coin_explorer",
"version": "0.1.0",
...
"homepage": "https://hicucu.github.io/ReactjsStudy-CoinExplorer/"

script에 deploy, predeploy 추가

1
2
3
4
5
6
7
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
...
"deploy" : "gh-pages -d build",
"predeploy" : "npm run build"
},

내가 기억하려고 적어두는 javascript, html, css

html / CSS

node vs element

node : 태그 노드와 텍스트 노드 전체
element : 텍스트 노드 제외

children : 텍스트 노드 제외
childNodes: 텍스트 노드 포함


선택자

id : 고유값, 중복 불가, #id명로 선택
class : 중복 가능, .class명으로 선택
[특정속성] : 특정 속성을 갖는 모든 요소
[특정속성=’’] : 특정 속성의 값이 ‘’인 요소


선택자 우선순위

!important를 포함한 규칙 > 인라인 스타일 속성 > id선택자 > 클래스, 속성, 가상 선택자 > 요소 선택자 > 전체 선택자

높은 우선순위의 선택자를 더 많이 사용한 규칙이 우선
| #id .wrap .content div span > #id .content div span

head 안 style > style안 @import > link로 연결한 css > link로 연결한 css 안에 @import > 브라우저 기본


border-box vs content-box

content-box : padding, border 영역을 제외한 크기를 width, heigh로 가짐

border-box : padding, border 영역을 포함한 width, height를 가짐

aws-angular-todolist-2

AWS STUDY

  1. PuTTY로 aws ec2로 만든 리눅스 환경 접속하기

  2. ec2에-npm-설치

  3. express설치하고 helloworld 출력하기 feat 포트 열기

  4. AWS, Angular를 이용한 todo-list 만들기(1)

  5. AWS, Angular를 이용한 todo-list 만들기(2)


AWS, Angular를 이용한 todo-list 만들기(2)

메서드 추가 생성

API Gateway에서 /선택 후 작업-메서드 생성

GET선택 후 myTodos 함수 선택

PATCHPOST 만들고 myTodos 선택

image

매칭 템플릿 생성

application/json, 메소드 요청 패스스루GET, PATCH, POST에 각각 추가

요청에 따라 다른 응답 만들기

요청 구분

path”: {
“id”: “2”
} 처럼 path에 id가 있으면 해당 id에 대한 요청

path가 비어 있으면 todos에 대한 요청

aws-angular-todolist-1

AWS STUDY

  1. PuTTY로 aws ec2로 만든 리눅스 환경 접속하기

  2. ec2에-npm-설치

  3. express설치하고 helloworld 출력하기 feat 포트 열기

  4. AWS, Angular를 이용한 todo-list 만들기(1)

  5. AWS, Angular를 이용한 todo-list 만들기(2)


AWS, Angular를 이용한 todo-list 만들기(1)

AWS

API Gateway, Lambda, DynamoDB를 이용한 Server less 구축

API Gateway 만들기

구성

AWS의 API Gateway와 AWS의 Lambda를 이용하여 Client의 요청을 받음

GET ~/todos => todo list 전체 전달

PATCH ~/todos => todo list 전체의 completed 일괄 변경

POST ~/todos => todo list의 새로운 todo 등록

PATCH ~/todos/{id} => 해당 id의 todo 변경

DELETE ~/todos/{id} => 해당 id의 todo 삭제

eslint, Babel, Webpack을 이용한 개발환경 구축

개발 환경 구축

vscode에서 eslint, bable, webpack을 설치하고 개발환경을 구출

폴더 생성 및 프로젝트 init

1
2
$ mkdir <project-name> && cd <project-name>
$ npm init -y

-y를 입력하면 package name, version등의 질문없이 package.json파일을 생성

ec2 아마존 리눅스에 MonogoDB install

AWS STUDY

  1. PuTTY로 aws ec2로 만든 리눅스 환경 접속하기

  2. ec2에-npm-설치

  3. express설치하고 helloworld 출력하기 feat 포트 열기

  4. AWS, Angular를 이용한 todo-list 만들기(1)

  5. AWS, Angular를 이용한 todo-list 만들기(2)


MonogoDB install

Install MongoDB Community Edition on Amazon Linux을 참고하여 설치합시다.

설치

1. Configure the package management system (yum).

vi로 /etc/yum.repos.d/mongodb-org-4.0.repo을 열어서

1
2
3
4
5
6
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

을 넣어줍니다.

저장이 안된다면 vi를 열 때 sudo를 이용하면 됩니다.
저는…

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×