Skip to content

Instantly share code, notes, and snippets.

@shdennlin
shdennlin / README.md
Last active August 7, 2023 07:34
asdf-python with virtualenv and virtualenvwrapper
@shdennlin
shdennlin / pyenv_install.sh
Last active March 17, 2023 02:28
pyenv + pyenv-virtualenv + pyenv-virtualenvwrapper on Ubuntu
# ubuntu
sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
# install pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
F="$HOME/.profile"
echo "#pyenv" >> $F
echo "export PYENV_ROOT=\"\$HOME/.pyenv\"" >> $F
@shdennlin
shdennlin / ptt_autologin_hold.sh
Last active December 21, 2021 16:53
Auto login PTT via SSH and hold
#!/usr/bin/expect -f
# Auto login PTT via SSH and hold
# Preparation:
# -- Ubuntu: $ sudo apt install expect
# Usage: /bin/bash -c ${FILE_PATH_OF_THIS_SCRIPT}
spawn ssh -oBatchMode=no -oStrictHostKeyChecking=no [email protected]
@shdennlin
shdennlin / ptt_autologin.sh
Last active August 29, 2021 08:57 — forked from fkztw/ptt_autologin.sh
A shell script to login PTT via ssh automatically.
#!/usr/bin/env expect
# Login into PTT via SSH.
# Combine crontab with this script so you don't forget to login PTT everyday.
# Preparation:
# Ubuntu: $ sudo apt install expect
# Usage: /bin/bash -c ${FILE_PATH_OF_THIS_SCRIPT}
# Example in crontab: