This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_='run the below scripts line by line not run the whole as a batch file'; | |
_='gist github ref. bit.ly/nnpipenv'; | |
_='create $bashrc soft-linked to ~/.bash_profile, as in macos, if $bashrc file not exists while ~/.bash_profile does exist'; | |
if [[ ! -f ~/.bashrc ]] && [[ -f ~/.bash_profile ]]; then ln -s ~/.bash_profile ~/.bashrc ; fi ; | |
bashrc="$HOME/.bashrc" ; `# must use $HOME instead of ~ here to get '>> $bashrc' working below` | |
_='#region install pyenv for ubuntu 16'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://www.python.org/doc/versions/ | grep 3.6 | head -n1 | cut -d'>' -f3 | cut -d' ' -f2 | cut -d'<' -f1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bonus rule | |
https://help.trello.com/article/814-earning-activating-trello-gold | |
more google search http://bit.ly/trello-gantt-chart | |
give new user-candidate your refer link from | |
https://trello.com/recommend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf | |
# ref. https://stackoverflow.com/a/30659970/248616 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash -i | |
#ref. https://blog.bigdinosaur.org/easy-ps1-colors/ | |
#ref. https://stackoverflow.com/a/5716557/248616 | |
#ref. https://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/ | |
echo " | |
# color code color code bold | |
# ---------------- ---------------- | |
ps1_BLACK='\[\033[0;30m\]' b_ps1_BLACK='\[\033[1;30m\]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
: run the below scripts line by line not run the whole as a batch file | |
: install pyenv ref. bit.ly/nnpipenv | |
#create $bashrc soft-linked to ~/.bash_profile, as in macos, if $bashrc file not exists while ~/.bash_profile does exist | |
if [[ ! -f ~/.bashrc ]] && [[ -f ~/.bash_profile ]]; then ln -s ~/.bash_profile ~/.bashrc ; fi | |
bashrc='~/.bashrc' | |
cd ~/.pyenv; git pull # update pyenv to latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo `cat << EOF | |
line 1 | |
line 2 | |
EOF` | |
echo $(cat << EOF | |
line 1 | |
line 2 | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: search file containing specific text | |
YOUR_TEXT='YOUR_TEXT'; grep -R . -iE $YOUR_TEXT | cut -d':' -f1 | sort -u | |
# ref. https://stackoverflow.com/a/16957078/248616 https://unix.stackexchange.com/a/9923/17671 | |
: search filename | |
find . -name "*YOUR TEXT*" | |
# ref. https://unix.stackexchange.com/a/248763/17671 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: ref. https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-engine---community-1 | |
`# remove previous version if any` | |
sudo apt -y remove docker docker-engine docker.io ; | |
`# set up apt repository` | |
sudo apt-get update ; | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg-agent ; | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - ; sudo apt-key fingerprint 0EBFCD88 ; | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref. https://askubuntu.com/a/1075516/22308 | |
sudo swapoff /swapfile # make all swap off | |
sudo rm -rf /swapfile # remove the current | |
# 8Gb=8*1024Mb=8192 Mb | |
# 4Gb=4*1024Mb=4096 Mb | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 # resize the swapfile to 4Gb | |
# = |
OlderNewer