Skip to content

Instantly share code, notes, and snippets.

View LeoHeo's full-sized avatar

JinHan LeoHeo

View GitHub Profile
from django.core.files.uploadfile import SimpleUploadedFile
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.conf import settings
class TestImageAPI(TestCase):
def setUp(self):
"""
TestCode 실행전 JWT Token만들기

remote 장소 구체적인 정보 확인

# git remote show [remote name]
$ git remore show origin

tag 만들기

tag는 Lightweight, Annotated 태그가 존재

S3 Seoul Region 사용

원인

기존 리전들의 S3는 Signature Version 4와 Version 2 모두 지원하는 반면

비교적 최근에 생긴 서울, 프랑크푸르트 등 리전의 S3는 Signature Version 4만 지원한다.

django-storages의 리전 설정을 서울로 변경하게 되면 Signature Version 2를 사용하게 되어

모든 응답이 400 Bad Request로 오게 된다. Signature Version 4를 사용하도록 해주어야 한다.

Fast-Forward Merge

현재 브랜치가 가리키는 커밋(부모 커밋)이 Merge할 조상과 같으면 Fast-Forward

A브랜치에서 다른 B 브랜치를 Merge 할때 B브랜치가 A브랜치 이후의 커밋을 가리키고 있으면 A브랜치가 B브랜치와 동일한 커밋을 가리키도록 이동시킨다.

$ git checkout master
$ git checkout -b fast-forwad

reset 명령은 HEAD가 가리키는 브랜치의 포인터를 옮기고

checkout 명령은 HEAD 자체를 옮긴다.

python TextWrap

문제 제기

ABCDEFGHIJKLIMNOQRSTUVWXYZ 라는 문자열이 있다. 이 문자열을 n개씩(여기서는 4개라고 가정) 잘라서 아래와 같이 만들고 싶다.

ABCD
EFGH

File Open

Class: ⌘O File (directory): ⇧⌘O Symbol: ⌥⌘O

ShortCuts

How To Set Up the Babel 6 Plugin in WebStorm

blog

@LeoHeo
LeoHeo / toros.md
Last active August 13, 2016 13:26

토로스(추천시스템)

  • 파이썬, C/C++
  • 시시각각 변화에 따른 분석이 가능해야함

왜 파이썬이여야 했냐?

  • 맨처음에는 이렇게 커질지 몰랐다.
  • 빠른개발속도와 비교적 저렴한 유지 비용
  • 폭넓은 라이브러리 front-end to machine learning
  • 활발한 커뮤니티
  • 확장성, C/C++의 좋은 라이브러리를 가져다 쓸 수 있었음

CNAME Swapping

  • 기존 Nova를 새로운 Nova로 교체

__import__을 한 이유는 exception일때 자동 정지 timestamp를 찍는 이유는 local routing table cache문제

왜 Python인가?

  • bash script로 했을때 문제점들
  • SED hell, JSON string handling