update script and added zsh config
This commit is contained in:
121
.zshrc
Normal file
121
.zshrc
Normal file
@@ -0,0 +1,121 @@
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=$HOME/.oh-my-zsh
|
||||
ZSH_THEME="agnoster"
|
||||
|
||||
|
||||
# Set name of the theme to load.
|
||||
# Look in ~/.oh-my-zsh/themes/
|
||||
# Optionally, if you set this to "random", it'll load a random theme each
|
||||
# time that oh-my-zsh is loaded.
|
||||
|
||||
# Use sublimetext for editing config files
|
||||
alias zshconfig="nano ~/.zshrc"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
||||
# sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git colored-man colorize github pip python zsh-syntax-highlighting)
|
||||
|
||||
# User configuration
|
||||
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# ssh
|
||||
# export SSH_KEY_PATH="~/.ssh/dsa_id"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
|
||||
|
||||
# Git
|
||||
alias pull="git pull"
|
||||
alias push="git push"
|
||||
alias gmm="git merge master"
|
||||
alias gf="git fetch --all --prune"
|
||||
alias gs="git status"
|
||||
alias glg="git log --graph --decorate --pretty=oneline --abbrev-commit --all"
|
||||
alias subinit="git submodule update --init --recursive"
|
||||
|
||||
# get current weather
|
||||
alias weather="curl wttr.in"
|
||||
|
||||
# other aliases
|
||||
alias k="clear"
|
||||
alias x="exit"
|
||||
alias ltr="ls -ltr"
|
||||
alias vi=vim
|
||||
alias ...="../.."
|
||||
alias ....="../../.."
|
||||
alias .....="../../../.."
|
||||
alias rm=trash # safer deleting using trash-cli
|
||||
alias please=sudo
|
||||
|
||||
# print contents of directory immediately when switching
|
||||
function cd(){
|
||||
emulate -L zsh
|
||||
builtin cd $@ &&
|
||||
ls -la
|
||||
}
|
||||
|
||||
# tree
|
||||
function t() {
|
||||
tree -I '.git|node_modules|bower_components|.DS_Store' --dirsfirst --filelimit 15 -L ${1:-3} -aC $2
|
||||
}
|
||||
25
setup.sh
25
setup.sh
@@ -31,14 +31,13 @@ sudo sh -c "echo '/dev/sda1 /mnt/usb ext4 defaults 0
|
||||
echo "Mounting all drives"
|
||||
sudo mount -a
|
||||
sudo chmod 777 /mnt/usb
|
||||
sudo chmod 777 /mnt/usb/*
|
||||
|
||||
|
||||
echo "Configuring MySQL to use the USB drive"
|
||||
sudo apt-get install mariadb-server mariadb-client
|
||||
sudo apt-get install mariadb-server mariadb-client -y
|
||||
cd /mnt/usb
|
||||
sudo mkdir mysql
|
||||
sudo cp -Rv /var/lib/mysql/* /mnt/usb/mysql/
|
||||
sudo cp -Rv /var/lib/mysql/* /mnt/usb/mysql/y
|
||||
sudo chown -R mysql:mysql /mnt/usb/mysql
|
||||
cd $installLoc/setup
|
||||
sudo service mysql stop
|
||||
@@ -46,10 +45,10 @@ sudo sed 's:/var/lib/mysql:/mnt/usb/mysql:g' /etc/mysql/my.cnf
|
||||
sudo service mysql restart
|
||||
|
||||
|
||||
echo "Configuring MySQL"
|
||||
sudo service mysql restart
|
||||
mysql --user="root" --password="henrypump" --execute="source WellDataEmpty.sql"
|
||||
mysql --user="root" --password="henrypump" --execute="source setupUsers.sql"
|
||||
# echo "Configuring MySQL"
|
||||
# sudo service mysql restart
|
||||
# mysql --user="root" --password="henrypump" --execute="source WellDataEmpty.sql"
|
||||
# mysql --user="root" --password="henrypump" --execute="source setupUsers.sql"
|
||||
|
||||
|
||||
# echo "installing TuxEip"
|
||||
@@ -98,7 +97,7 @@ wget https://bootstrap.pypa.io/get-pip.py
|
||||
sudo python get-pip.py
|
||||
sudo pip install mysql requests pycomm
|
||||
|
||||
cd $installLoc/../www
|
||||
cd $installLoc/www
|
||||
bower install
|
||||
npm install
|
||||
|
||||
@@ -119,12 +118,20 @@ npm install
|
||||
# sudo service hostapd start
|
||||
# sudo service isc-dhcp-server start
|
||||
|
||||
echo "Setup Complete!"
|
||||
|
||||
cd $installLoc
|
||||
mv setup .setup
|
||||
sudo userdel pi
|
||||
|
||||
cd $installLoc/.setup
|
||||
echo "Setting up zsh"
|
||||
sudo apt-get install zsh trash-cli -y
|
||||
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||
cp .zshrc ~/
|
||||
chsh -s $(which zsh)
|
||||
|
||||
echo "Setup Complete!"
|
||||
|
||||
read -n1 -r -p "Press any key to reboot..." key
|
||||
|
||||
if [ "$key" = ' ' ]; then
|
||||
|
||||
Reference in New Issue
Block a user