Skip to content

Instantly share code, notes, and snippets.

View nopedev's full-sized avatar
💭
뿜뿜

nope nopedev

💭
뿜뿜
View GitHub Profile

git reset remote commit

  • git reset --hard 수정내용 남기지 않고 리셋
  • git reset --soft 수정내용 add된 상태로 리셋
  • git reset --mixed 수정내용 워크스페이스 파일에 반영되어 있는 상태로 리셋
> git reset --mixed HEAD~1
> git push -f origin main
@nopedev
nopedev / 우분투스왑.md
Last active April 19, 2021 03:36
우분투 스왑파일

스왑 파일/파티션 존재 여부 확인

sudo free -m
sudo swapon -s => 아무것도 안나오면 미설정 상태

스왑파일 생성

# 스왑용도 파일 생성
@nopedev
nopedev / 윈도우10 WSL2 Ubuntu.md
Last active March 24, 2022 05:42
윈도우10 WSL2 Ubuntu
  1. update Window

  2. in CMOS enable Virtualization Technology

  3. Powershell or CMD open ad Admin

    Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
    
    # 온라인 스토어를 통해 다운로드할 수 있는 Linux 배포판 목록
    

wsl -l -o | wsl --list --online

@nopedev
nopedev / gist:58f0efaecd1dda3294f94f2c1dcc40d4
Last active July 15, 2020 08:44
LetsEncrypt Group Change
// Create group with root and nodeuser as members
$ sudo groupadd certusers
$ sudo usermod -a -G certusers root
$ sudo usermod -a -G certusers nodeuser

// Make the relevant letsencrypt folders owned by said group.
$ sudo chgrp certusers /etc/letsencrypt/live/site.domain.com
$ sudo chgrp certusers /etc/letsencrypt/archive/site.domain.com
@nopedev
nopedev / docker-desktop-laradock-port-2222.md
Created November 7, 2019 09:10
Docker Desktop / laradock / windows 10 사용시 port 2222 권한 획득 못할경우

Windows 10 에서 docker-compose 실행시 port 2222 권한 획득 못할 경우

  • Hyper-V 기능 활성화시 2222 포트를 예약해버려서 laradock 에서 못쓰는게 원인
  1. cmd 관리자 권한으로 실행
  2. netsh int ipv4 show excludedportrange protocol=tcp 실행해서 2222 포트 예약되어 있는지 확인
  3. 예약되어 있다면 Hyper-V 종료 → PC 리부트
  4. netsh int ipv4 add excludedportrange protocol=tcp startport=2222 numberofports=1 실행해서 직접관리포트로 등록
  5. Hyper-V 활성화 → PC 리부트
  6. netsh int ipv4 show excludedportrange protocol=tcp 실행해서 2222 포트가 직접관리 포트로 빠져있는지 확인
#.bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# ==========
# ALIAS
# ==========
alias ll="ls -alv"
@nopedev
nopedev / .vimrc
Created May 9, 2018 06:33
.vimrc simple setting
"Syntax Highlighting
if has("Syntax")
syntax on
endif
set autoindent
set cindent
set ts=4
set shiftwidth=4

python

pyenv

install pyenv

brew update

brew install pyenv

add to .bash_profile

@nopedev
nopedev / .bash_profile
Created April 4, 2018 02:06 — forked from KennethanCeyer/.bash_profile
bash_profile for MAC users
#.bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
#============================================================
#
# ALIASES AND FUNCTIONS
# Arguably, some functions defined here are quite big.
# If you want to make this file smaller, these functions can