본문 바로가기

분류 전체보기511

Ubuntu 18.04에서 netplan을 사용한 static ip 설정 17.10부터 네트워크 인터페이스 설정이 netplan이라는 새로운 네트워크 설정이 생겼다. 기존에 인터페이스 설정(/etc/network/interfaces)보다는 간결해 보입니다. 변경 할 파일은 아래와 같습니다. sudo vi /etc/netplan/50-cloud-init.yaml 기본적으로 dhcp로 설치 했을 경우 아래와 같이 나옵니다. network: ethernets: enp4s0f2: addresses: [] dhcp4: true version: 2 그 내용을 아래와 같이 ip와 정보를 넣고 설정 해 주면 됩니다. network: ethernets: enp4s0f2: dhcp4: no addresses: [192.168.1.200/24] gateway4: 192.168.1.1 namese.. 2019. 1. 7.
우분투 노트북 서버 사용시 커버를 덮어도 잠들지 않도록 하기 먼저 터미널에서 아래와 같은 파일을 열어 줍니다. sudo vi /etc/systemd/logind.conf 파일에서 #HandleLidSwitch=suspend로 되어 있는 곳의 샵(#) 주석을 제거 하고 HandleLidSwitch=ignore 이렇게 변경해 줍니다. # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, o.. 2019. 1. 7.
우분투에서 한글 압축 깨질때.. 우분투 데스크탑을 쓰다 보면.. 한글 압축을 풀면서 한글이 이상하게 나오는 경우가 많습니다. 이런식으로.. 그래서 다른 분들의 글을 좀 찾아 봤는데… export UNZIP="-O cp949" export ZIPINFO="-O cp949" 이런 내용을 /etc/profile에 넣는 방법이 있었습니다. 하지만.. 이렇게 해 버리면.. utf-8로 압축된 파일이 또 문제가 발생 할 것 같아서.. 전 압축 파일에 euc-kr한글이 있을 경우 그냥.. terminal에서 풀기로 했습니다. ~/.bashrc 파일에 아래와 같이 추가하고.. alias hunzip='unzip -O cp949' 한글이 들어간 zip파일을 풀때는 터미널에서 $ hunzip [파일명].zip 이렇게 하려고 합니다. 다른 분들도 참고가 .. 2018. 11. 15.
Express with typescript and webpack Express with typescript and webpack 기본 패키지 설정 package.json 파일을 만들어 줍니다. npm init -y express에 필요한 패키지를 설치해 줍니다. yarn add express body-parser Typescript 설정 typescript에 사용할 패키지를 설치 합니다. yarn add --dev typescript ts-loader ts-node tslint @types/node @types/express typescript에 필요한 내용을 설치 합니다. 그리고 tsconfig.json파일을 아래와 같이 입력 해 줍니다. { "compilerOptions": { "target": "es6", "module": "commonjs", "moduleRe.. 2018. 11. 13.
Serverless & Webpack & Typescript 구성하기 Serverless & Webpack & Typescript 구성하기 serverless에서 webpack을 이용해서 typescript를 구성해 보면서 작업 하던걸 기록 해 둡니다. 기본 환경 구성 기본적으로 node.js가 설치 되어 있어야 합니다. serverless를 설치 합니다. npm install -g serverless 그리고, 프로젝트를 생성해 줍니다. $ serverless create -t aws-nodejs -p hello-lambda Serverless: Generating boilerplate... Serverless: Generating boilerplate in "/home/gyuha/workspace/hello-lambda" _______ __ | _ .-----.----... 2018. 11. 7.
Ubuntu 18.04에서 리그오브레전드 설치하기. 우분투에서 롤을 빠르게 설치하는 방법이 있어서 소개 합니다. 당연하게 wine을 이용한 방법이고, snap 패키지 매니져에 롤이 등록이 되어 있어서.. 간편하게 설치를 할 수 있네요. 터미널을 띄우고, wine-platform-i386을 설치 합니다. snap install wine-platform-i386 그리고, snap install leagueoflegends --edge --devmode 이렇게 하면 설치는 끝납니다… 참 쉽죠? 그리고, 런처에서 leauge를 치시면 롤 아이콘이 보입니다. 우선 실행을 합니다. 그리고, 지역은 아무거나 골라도 상관 없습니다. 한국으로 바꿀테니 까요.. 전 첫번째꺼를 했습니다. 적당히 패치를 해서 기본 내용의 설치를 완료하고 종료 합니다. 그리고, 한국 지역으로 .. 2018. 10. 21.
vscode의 신규 기능 project level snippets VSCode Project level snippets 기존에 vscode를 사용하면서 프로젝트 단위로 snippet을 지원하지 않아서.. extension을 설치 해서 사용 했었다. 하지만, 이번 업데이트(September 2018 (version 1.28)에서 프로젝트 snippet이 지원해서 기록해 둔다. (나중에 까먹을 까봐 -_-);;; .vscod 폴더에 [사용할 언어].code-snippets라는 파일을 만들고 snippet을 넣어 주면 된다. 참고 : https://code.visualstudio.com/updates/v1_28#_project-level-snippets ​ 2018. 10. 15.
VSCode 익스텐션 목록 vscode를 사용하다가, 설치 된 확장자를 공유 해야 할 일이 가끔 있다. 아래와 같이 터미널 창에 넣어 주면 설치 명령어와 같이 목록이 나온다. code --list-extensions | xargs -L 1 echo code --install-extension > list.txt 내 경우에는 아래와 같이 나왔다. code --install-extension alefragnani.Bookmarks code --install-extension bungcip.better-toml code --install-extension ChakrounAnas.turbo-console-log code --install-extension christian-kohler.npm-intellisense code --insta.. 2018. 10. 12.
Serverless를 사용해서 S3에 파일 바로 업로드 하기 Serverless file upload to S3 동작 구조 먼저 lambda 서버에 s3의 올릴 url을 요청 한다. 업로드 할 url을 받는다. 받은 s3 url에다가 파일을 보내 준다. 위와 같이 업로드를 진행 해서 자바스크립트 코드에 aws의 인증키를 노출하지 않고 S3에 바로 업로드를 진행 할 수 있다. Serverless 설치 $ npm i serverless -g # AWS 계정 설정하기 $ serverless config credentials --provider aws --key --secret Serverless 기본 프로젝트 만들기 $ serverless create --template aws-nodejs -p serverless-file-upload Serverless: Genera.. 2018. 10. 10.
Python & Serverless(lambda) 기본 사용 요약 Python & Serverless 기본 사용 요약 $ npm install -g serverless # AWS 계정 만들기 $ serverless config credentials --provider aws --key --secret $ serverless create --template aws-python3 --path $ cd 가상 환경 구성 $ python3 -m virtualenv env $ source env/bin/activate serverless.yml에 events에 http를 추가해 준다. functions: hello: handler: handler.hello events: - http: path: /hello method: get 로컬 서버 구성 $ npm install serve.. 2018. 10. 9.