Skip to content

Instantly share code, notes, and snippets.

View sarguments's full-sized avatar
💭
I may be slow to respond.

Servercat sarguments

💭
I may be slow to respond.
  • Seoul, Korea
View GitHub Profile
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@samsalisbury
samsalisbury / .gitconfig
Last active June 22, 2022 19:30
Git diff and merge with p4merge (OSX)
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
tool = p4merge
@iamssen
iamssen / rest.md
Created April 17, 2013 08:07
OAuth2 로 github 로그인 처리 단계별 처리...

Github OAuth 참고

우선 https://github.com/settings/applications 에서 Application 에 등록된 정보들 확인

로그인처리

  1. get https://github.com/login/oauth/authorize?client_id={client_id}&redirect_uri={http://...} 형태로 어플리케이션 등록 정보를 바탕으로 앱 승인 주소로 날려보냄
  2. get http://ssen.name/devlog?code=x1aa07b850cbf6eeba1a 과 같은 형태로 code 를 보내주게 됨
  3. 받은 코드를 사용해서 post https://github.com/login/oauth/access_token 로 정보를 요청
  • header Accept : application/json
  • param code : {받은 코드}