Skip to content

Instantly share code, notes, and snippets.

View hongjonghwa's full-sized avatar

hongjonghwa hongjonghwa

View GitHub Profile
# 1) remove ^M
find . -type f | xargs -Ix sed -i.bak -r 's/\r//g' x
# 2) delete *.bak
find . -type f -name '*.bak' | xargs -Ix rm x
# 1) pyenv install
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
# ~/.bashrc 외 ~/.profile, ~/.bash_profile, ~/.bash_login, ~/.zshrc ~/.zprofile, ~/.zlogin 등등
# 2) pyenv-virtualenv install
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
# 1) nvm install
git clone https://github.com/nvm-sh/nvm.git ~/.nvm
# 2) add these lines to ~/.bashrc, ~/.profile, or ~/.zshrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# 3) install nodejs
nvm install --lts=fermium # node v14 lts
find . -type f -name "*.pem" -print0 | xargs -0 -I{} openssl x509 -enddate -noout -in {}
grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" -R .
find . -name .git -type d -prune |xargs -l1 dirname | xargs -t -I{} git -C {} pull
find . -type d -empty -print0 | xargs -0 -I {} rmdir "{}"
find . -name .DS_Store -print0 | xargs -0 git rm -f --cached --ignore-unmatch
# CDROM
mount -t iso9660 /dev/sr0 /mnt/cdrom
1. Package install
sudo apt-get install xrdp
sudo apt-get install xorgxrdp
2. PolicyKit Authority Setup
sudo vi /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla