본문 바로가기 메뉴 바로가기

민호.닷컴

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

민호.닷컴

검색하기 폼
  • 분류 전체보기 (105)
    • 소소한일상 (7)
    • 관심폭발 (5)
    • 공부합시다 (47)
      • ionic (2)
      • php (16)
      • express (2)
      • python (5)
      • Golang (4)
    • 비밀이여 (0)
    • 갑자기 문뜩 (5)
    • What did u do today (0)
  • 방명록

분류 전체보기 (105)
HTTPie

터미널에서 API에 간단하게 질의할 때 보통 curl을 많이 사용했는데, 단순하게 결과만 나오는 부분에서 아쉬운 점이 있었다. 이번에 파이썬을 공부하다 보니 Django에서 공식페이지에서 HTTP로 커맨드 하는 부분이 있어 찾아보았다. Response 뿐만 아니라 헤더 정보와 http 상태도 같이 볼 수 있어 괜찮은 것 같다. 보통 윈도우나, 맥os 만 공식적으로 지원하는 부분이 많은데 리눅스까지 지원해 주는 부분도 인상적이다. 사용방법은 간단하다 설치하고 터미널에서 http로 질의하면 끝. 설치하기 맥os brew install httpie 윈도우 # Make sure we have an up-to-date version of pip and setuptools: pip install --upgrade ..

공부합시다 2020. 6. 25. 09:47
Django RESTframework

환경설정 1.1. 기본구성 pip >= 19.0.3 python >= 3.4 (django 2.2 지원 최소버전) # pip upgrade last version pip install --upgrade pip # check pip version pip --version pip 19.0.3 from /Users/.../pip-19.0.3-py3.7.egg/pip (python 3.7) 1.2. install django pip install django==2.2 pip install djangorestframework==3.11.0 $ django-admin startprject {project_name} $ ls {project_name}/ # django server start $ .manage.py ..

공부합시다/python 2020. 6. 25. 09:36
Flask RESTful 시작하기

api.py from flask import Flask from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) class HelloWorld(Resource): def get(self): return {'hello': 'world'} api.add_resource(HelloWorld, '/') if __name__ == '__main__': app.run(debug=True) 실행하기 $ python api.py * Running on http://127.0.0.1:5000/ * Restarting with reloader #파이참 사용시 .html 사용으로 rest api test 할 수 있다. # helloworld.h..

공부합시다/python 2020. 5. 21. 15:07
Array를 Object로 변경하기

가끔 사용하다 보면 특히 API로 작업할 경우 결과를 Object로 전달해 줘야 할 때가 있다. 그럴 때 간단하게 형을 선언해주는 것 만으로도 변경이 가능하다. 참조 : https://www.lesstif.com/php-and-laravel/php-26083746.html PHP 배열을 오브젝트 변환 www.lesstif.com

공부합시다/php 2020. 5. 20. 14:09
php 정규식 테스트

https://www.phpliveregex.com/#tab-preg-match PHP Live Regex i case insensitive m treat as multi-line string s dot matches newline x ignore whitespace in regex A matches only at the start of string D matches only at the end of string U non-greedy matching by default www.phpliveregex.com

공부합시다/php 2020. 5. 19. 11:32
zsh, oh-my-zsh 터미널 home, end 안될 때

맥os 카탈리나부터 기본 쉘이 zsh로 바뀌면서 기존에 잘 사용했던 home, end키가 먹히지 않는다. 생각없이 사용하고 있다 안되니 불편하구만 특이하게 vim이나 다른 곳에서는 사용이 가능한게 zsh에서 안되는 것 같아 찾아보니 비슷한 증상으로 해결방법이 있다. zshrc에 아래 코드 입력해주면 정상적으로 사용할 수 있다. vi ~/.zshrc #home end 안될 때 bindkey "\033[1~" beginning-of-line bindkey "\033[4~" end-of-line https://yumere.tistory.com/95 zsh, oh-my-zsh에서 home/end 키가 안될 때 그냥 개인 기록용... 환경: Ubuntu 16.04 Xshell 을 이용한 ssh 연결 zsh she..

카테고리 없음 2020. 5. 13. 08:23
mysql 조회 후 외부에 결과파일 생성하기

https://www.lesstif.com/dbms/mysql-client-query-csv-text-54951965.html MySQL client query 결과를 csv 나 text 파일로 저장 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement www.lesstif.com SELECT order_id,product_name,qty FROM orders INTO OUTFILE '/tmp/orders.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' 파일 생성은 된 ..

카테고리 없음 2020. 5. 12. 11:50
curl POST 예제

출처: https://gist.github.com/subfuzion/08c5d85437d5d4f00e58 Common Options `-#, --progress-bar` Make curl display a simple progress bar instead of the more informational standard meter. `-b, --cookie ` Supply cookie with request. If no `=`, then specifies the cookie file to use (see `-c`). `-c, --cookie-jar ` File to save response cookies to. `-d, --data ` Send specified data in POST request. Det..

공부합시다 2020. 2. 7. 14:02
이전 1 ··· 3 4 5 6 7 8 9 ··· 14 다음
이전 다음
공지사항
  • 오예 도메인 주소 변경
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 코드스쿨
  • 코드전쟁!@
  • 변수명짓기
  • PHP-GRAPHQL
  • 해커랭크
  • excaildraw
TAG
  • password-manager
  • graphql
  • bitwarden-cli
  • eloquent-observer
  • MySQL
  • msmtp
  • 자바스크립트
  • 정규식
  • Python
  • l5-swagger-response
  • laravel-test
  • 정의
  • addMonthWithoutOverflow
  • 메일
  • POP3
  • graphql-php
  • 컨테이너내에서 메일 발송하기
  • php
  • vim
  • observer 매개변수 전달하기
  • laravel-kafka
  • addMonth
  • redis
  • 라라벨
  • django
  • l5-swagger
  • Laravel
  • 테스트_다중트랜잭션
  • exception-test
  • aaa패턴
more
«   2025/06   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바