This file contains hidden or 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 sh | |
| has_gid () { | |
| cut -d: -f1,4 /etc/passwd | grep -q "^${1}:${2}" || return 1 | |
| } | |
| # example: ensure_user btsync 1000 1000 | |
| ensure_user () { | |
| local user=$1 | |
| local uid=$2 |
This file contains hidden or 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
| git fetch --all | |
| git reset --hard origin/master | |
| git pull origin master |
This file contains hidden or 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
| def has_pkg(package): | |
| import importlib | |
| try: | |
| importlib.import_module(package) | |
| except ImportError: | |
| return False | |
| return True | |
| def pip_install(package): | |
| import pip |
This file contains hidden or 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
| # tmux v2.3 installation steps for Ubuntu [various OS versions] | |
| sudo apt-get update -yqqu | |
| sudo add-apt-repository -y ppa:pi-rho/dev | |
| sudo apt-get update -yqqu | |
| sudo apt-get install -yqqu python-software-properties software-properties-common | |
| sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu16.04.1 | |
| # sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu15.10.1 | |
| # sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu15.04.1 | |
| # sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu14.04.1 |
OlderNewer