일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- ubuntu
- Jupyter
- GoCD
- appium
- STF
- mysql
- ftp
- insert
- PYTHON
- sshpass
- nGrinder
- 28015
- perfect
- 실행권한
- kitura
- nmap
- centos
- create table
- nohup
- rethinkdb
- postgres
- SWIFT
- Materials
- openpyxl
- postgresql
- port forwarding
- ssh
- STF_PortForwarding
- appium server
- Jupyter Notebook
- Today
- Total
don't stop believing
WordPress를 설치하고 홈페이지 관리를 해야 합니다.WordPress를 실행하려면 LAMP가 필요합니다. L: Linux (이번 wordpress는 CentOS 7에서 진행합니다.) A: Apache 웹 서버 M: MySQL 또는 MariaDB P: PHP LAMP부터 설치하고 WordPress 설치로 넘어가겠습니다. Linux를 확인합니다.CentOS에 접속했다면 버전부터 확인하고 가겠습니다. $ cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME..
Server 개발 시 비동기로 처리해야 할 때가 있습니다. 저 같은 경우 redis에 쓰기 처리를 할때는 보통 비동기로 처리하기도 합니다.go에서 비동기 처리 할 때는 goroutine을 사용합니다.https://github.com/gin-gonic/gin#goroutines-inside-a-middleware goroutine을 사용할 때 중요한 부분은 gin의 원본 context를 사용하면 안되고 읽기 전용으로 복제해서 사용해야 합니다.When starting new Goroutines inside a middleware or handler, you SHOULD NOT use the original context inside it, you have to use a read-only copy. 바로 코..
url path에 paramater가 추가되는 경우의 binding 방법입니다.https://github.com/gin-gonic/gin#bind-uri 바로 코드를 보겠습니다. package main import ( "github.com/gin-gonic/gin" ) type User struct { Name string `uri:"name" binding:"required"` Age uint16 `uri:"age" binding:"required"` ID string `uri:"id" binding:"required,uuid"` } func setupRouter() *gin.Engine { // Disable Console Color // gin.DisableConsoleColor() r := gin..
로그 파일을 만들어 보겠습니다.https://github.com/gin-gonic/gin#how-to-write-log-file 코드는 몇지 되지 않습니다.먼저 command 창에 로그를 찍지 않도록 합니다.gin.DisableConsoleColor() 로그 파일 이름을 지정하기 위해 날짜를 받아와 로그파일 이름을 만들어 줍니다.t := time.Now()startTime := t.Format("2006-01-02 15:04:05")logFile := "example/ngleLog-" + startTime 그리고 os.Create()로 로그 파일을 만들어 줍니다.f, err := os.Create(logFile) 로그파일을 gin.DefaultWriter에 넣습니다.gin.DefaultWriter = i..
업무 기록을 위해 Posting 합니다. 웹 서버 배포 후 특정 폴더만 지워야 할 일이 있었습니다.조건은 아래와 같습니다. 1. Storage 폴더 (로그 기록을 위한 root 폴더)에는 여러 파일과 폴더가 있다.2. 특정 패턴의 폴더를 지워야 한다.3. 생성 날짜(수정 날짜)를 기준으로 최근의 10개는 남겨야 하며 11번째 이후 것만 삭제한다. (오래된 것 삭제하기) 우선 아래와 같이 폴더가 있습니다.특정 시간에 ngle_ 로 시작되는 폴더에 파일이 쌓이게 됩니다.이걸 먼저 생성된 순서대로 10개는 남기고 11번째부터 삭제해야 합니다.위 Directory의 폴더와 파일을 시간 순서대로 보내 아래와 같습니다.sh는 remove.sh 파일에 있고 Shell Script는 아래와 같습니다. #!/bin/ba..
어떤 Method로 오건 Query String 데이터를 binding하려면 ShouldBindQuery()를 사용하면 됩니다.https://github.com/gin-gonic/gin#only-bind-query-string 아래 간단한 예제 코드가 있습니다.r.Any()에 ShouldBindQuery()를 사용했습니다. package main import ( "net/http" "time" "github.com/gin-gonic/gin" ) type User struct { User string `form:"user" json:"user" xml:"user" binding:"required"` Password string `form:"password" json:"password" xml:"passwo..