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