mirror of
https://github.com/fergalmoran/settings-webstorm.git
synced 2025-12-22 01:39:34 +00:00
WS-2017.2 <fergalm@localhost Merge branch 'master'
Conflicts: bash_aliases bash_functions install.sh tmux.conf
This commit is contained in:
9
Xresources
Normal file
9
Xresources
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
XTerm*renderFont: true
|
||||||
|
XTerm*faceName: DejaVu Sans Mono
|
||||||
|
XTerm*faceSize: 10
|
||||||
|
XTerm*maximized: true
|
||||||
|
|
||||||
|
UXTerm*renderFont: true
|
||||||
|
UXTerm*faceName: DejaVu Sans Mono
|
||||||
|
UXTerm*faceSize: 10
|
||||||
|
UXTerm*maximized: true
|
||||||
77
bash_aliases
Normal file
77
bash_aliases
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
IP=$(hostname -I | cut -d' ' -f1)
|
||||||
|
HOSTNAME=`hostname -s`
|
||||||
|
# ignore
|
||||||
|
alias ls="ls -alh"
|
||||||
|
|
||||||
|
#Django stuff
|
||||||
|
alias djrun="source /home/fergalm/dev/personal/deepsouthsounds.com/dss.docker/api_env && python manage.py runserver 0.0.0.0:8001"
|
||||||
|
alias djshell="python manage.py shell_plus --use-pythonrc --ipython"
|
||||||
|
alias djdb="python manage.py dbshell"
|
||||||
|
alias djmigrate="python manage.py schemamigration spa --auto"
|
||||||
|
alias wole="source ./env/bin/activate"
|
||||||
|
|
||||||
|
alias dss="cd ~/dev/personal/deepsouthsounds.com/dss.api && workon dss.api"
|
||||||
|
alias dss_radio="cd ~/dev/personal/deepsouthsounds.com/dss.radio && workon dss.radio && docker start dssdocker_icecast_1"
|
||||||
|
|
||||||
|
alias pgdo="sudo -u postgres"
|
||||||
|
alias pgadmin="docker run -it --rm -v /home/fergalm/working/pgadmin-data:/pgadmin-data --net=host fergalmoran/pgadmin4:latest; xdg-open http://localhost:5050"
|
||||||
|
alias runmssql="docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=cTXu1nJLCpC/c' -p 1433:1433 -v /home/fergalm/working/mssql-data:/var/opt/mssql -d microsoft/mssql-server-linux"
|
||||||
|
alias tor="docker run -i -t --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro paulczar/torbrowser"
|
||||||
|
|
||||||
|
alias sqlw="/opt/SqlWorkbench/sqlworkbench.sh &"
|
||||||
|
alias se="/opt/StorageExplorer/StorageExplorer > /dev/null 2>&1 &"
|
||||||
|
alias dbv="dbeaver > /dev/null 2>&1 &"
|
||||||
|
alias rsl="rslsync --config /home/fergalm/.config/resilio-sync/config.json"
|
||||||
|
|
||||||
|
alias reloadbashrc="source ~/.bashrc"
|
||||||
|
alias server="livereload -p 9999 --host $IP"
|
||||||
|
alias upd="sudo apt update && sudo apt dist-upgrade && sudo apt autoremove"
|
||||||
|
alias psql="sudo -u postgres psql deepsouthsounds"
|
||||||
|
alias code="/usr/bin/code-insiders"
|
||||||
|
alias c="/usr/bin/code-insiders ."
|
||||||
|
|
||||||
|
alias dbstatus="dropbox.py status"
|
||||||
|
alias dbignore='find `pwd` -type d -regex ".*\(node_modules\|temp\|tmp\|bower_components\|cache\)$" -prune -exec dropbox exclude add {} \;'
|
||||||
|
alias dbrm="find . -name \*\'s\ conflicted\ copy\ \* -exec rm {} \;"
|
||||||
|
|
||||||
|
alias ping="ping -O"
|
||||||
|
|
||||||
|
alias pbcopy='xclip -selection clipboard'
|
||||||
|
alias pbpaste='xclip -selection clipboard -o'
|
||||||
|
alias iotop='sudo iotop'
|
||||||
|
alias rmq=' sudo rabbitmqctl'
|
||||||
|
alias congo='node /srv/dev/working/congo/server.js'
|
||||||
|
|
||||||
|
alias zap='/home/fergalm/working/ZAP/zap.sh > /dev/null 2>&1 &'
|
||||||
|
alias git-browse="xdg-open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`"
|
||||||
|
|
||||||
|
alias andconnect='adb connect 10.1.1.102:5555'
|
||||||
|
|
||||||
|
doAgFind(){
|
||||||
|
ag --ignore-dir node_modules --ignore-dir bower_components $1
|
||||||
|
}
|
||||||
|
alias ag=doAgFind
|
||||||
|
|
||||||
|
doGrepSearch(){
|
||||||
|
find | grep $1
|
||||||
|
}
|
||||||
|
alias f=doGrepSearch
|
||||||
|
|
||||||
|
doPsKill(){
|
||||||
|
sudo ps aux | grep -ie $1 | awk '{print $2}' | xargs kill -9
|
||||||
|
}
|
||||||
|
alias pskill=doPsKill
|
||||||
|
|
||||||
|
alias dcx="docker-compose -H podnoms.com:2376 --tlsverify --tlscacert /mnt/niles/sharing/docker-tls/podnoms/ca.pem --tlscert /mnt/niles/sharing/docker-tls/podnoms/cert.pem --tlskey /mnt/niles/sharing/docker-tls/podnoms/key.pem"
|
||||||
|
|
||||||
|
case $HOSTNAME in
|
||||||
|
(NILES) alias dockerx="docker --tlsverify -H=podnoms.com:2376 --tlscacert=/srv/sharing/docker-tls/podnoms/ca.pem --tlscert=/srv/sharing/docker-tls/podnoms/cert.pem --tlskey=/srv/sharing/docker-tls/podnoms/key.pem";;
|
||||||
|
(EDDIE) alias dockerx="docker --tlsverify -H=podnoms.com:2376 --tlscacert=/mnt/niles/sharing/docker-tls/podnoms/ca.pem --tlscert=/mnt/niles/sharing/docker-tls/podnoms/cert.pem --tlskey=/mnt/niles/sharing/docker-tls/podnoms/key.pem";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if type "$docker" > /dev/null; then
|
||||||
|
alias docker-nuke="docker rm $(docker ps -a -q) && docker rmi $(docker images -q)"
|
||||||
|
alias dc='docker-compose'
|
||||||
|
alias docker-rm-untagged='docker rmi -f $(docker images | grep "^<none>" | awk "{print $3}")'
|
||||||
|
fi
|
||||||
|
alias tmux="TERM=screen-256color-bce tmux attach || TERM=screen-256color-bce tmux"
|
||||||
48
bash_functions
Normal file
48
bash_functions
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
function pips() {
|
||||||
|
echo $'\n'$1 >> requirements.txt; pip install $1
|
||||||
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
function reset_webstorm(){
|
||||||
|
cd ~/.WebStorm*
|
||||||
|
rm config/eval/WebStorm*evaluation.key
|
||||||
|
rm config/options/options.xml
|
||||||
|
cd ~/.java/.userPrefs/jetbrains
|
||||||
|
rm -rf webstorm
|
||||||
|
}
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> parent of 02ed9ee... WS-2017.2 <fergalm@localhost Overwrite remote git@github.com:fergalmoran/dotfiles.git to local
|
||||||
|
cb() {
|
||||||
|
local _scs_col="\e[0;32m"; local _wrn_col='\e[1;31m'; local _trn_col='\e[0;33m'
|
||||||
|
# Check that xclip is installed.
|
||||||
|
if ! type xclip > /dev/null 2>&1; then
|
||||||
|
echo -e "$_wrn_col""You must have the 'xclip' program installed.\e[0m"
|
||||||
|
# Check user is not root (root doesn't have access to user xorg server)
|
||||||
|
elif [[ "$USER" == "root" ]]; then
|
||||||
|
echo -e "$_wrn_col""Must be regular user (not root) to copy a file to the clipboard.\e[0m"
|
||||||
|
else
|
||||||
|
# If no tty, data should be available on stdin
|
||||||
|
if ! [[ "$( tty )" == /dev/* ]]; then
|
||||||
|
input="$(< /dev/stdin)"
|
||||||
|
# Else, fetch input from params
|
||||||
|
else
|
||||||
|
input="$*"
|
||||||
|
fi
|
||||||
|
if [ -z "$input" ]; then # If no input, print usage message.
|
||||||
|
echo "Copies a string to the clipboard."
|
||||||
|
echo "Usage: cb <string>"
|
||||||
|
echo " echo <string> | cb"
|
||||||
|
else
|
||||||
|
# Copy input to clipboard
|
||||||
|
echo -n "$input" | xclip -selection c
|
||||||
|
# Truncate text for status
|
||||||
|
if [ ${#input} -gt 80 ]; then input="$(echo $input | cut -c1-80)$_trn_col...\e[0m"; fi
|
||||||
|
# Print status.
|
||||||
|
echo -e "$_scs_col""Copied to clipboard:\e[0m $input"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function gi() { curl -L -s https://www.gitignore.io/api/\$@ ;}
|
||||||
|
|
||||||
91
install.sh
Normal file
91
install.sh
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
|
||||||
|
############################
|
||||||
|
#ignore
|
||||||
|
########## Variables
|
||||||
|
|
||||||
|
dir=~/dotfiles # dotfiles directory
|
||||||
|
olddir=~/dotfiles_old # old dotfiles backup directory
|
||||||
|
files="tmux.conf zshrc bash_aliases bash_functions sqliterc Xresources" # list of files/folders to symlink in homedir
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
|
# create dotfiles_old in homedir
|
||||||
|
echo "Creating $olddir for backup of any existing dotfiles in ~"
|
||||||
|
mkdir -p $olddir
|
||||||
|
echo "...done"
|
||||||
|
|
||||||
|
# change to the dotfiles directory
|
||||||
|
echo "Changing to the $dir directory"
|
||||||
|
cd $dir
|
||||||
|
echo "...done"
|
||||||
|
|
||||||
|
# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
|
||||||
|
for file in $files; do
|
||||||
|
echo "Moving any existing dotfiles from ~ to $olddir"
|
||||||
|
mv ~/.$file ~/dotfiles_old/
|
||||||
|
echo "Creating symlink to $file in home directory."
|
||||||
|
ln -s $dir/$file ~/.$file
|
||||||
|
done
|
||||||
|
|
||||||
|
# merge Xresources
|
||||||
|
xrdb -merge ~/.Xresources
|
||||||
|
|
||||||
|
sudo cp -r fonts/* /usr/share/fonts/opentype
|
||||||
|
fc-cache -f -v
|
||||||
|
sudo fc-cache -f -v
|
||||||
|
|
||||||
|
|
||||||
|
git clone https://github.com/powerline/fonts.git pwfonts
|
||||||
|
cd pwfonts && ./install.sh
|
||||||
|
|
||||||
|
OMF=~/.oh-my-zsh/oh-my-zsh.sh
|
||||||
|
if [ ! -f $OMF ]; then
|
||||||
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
#install tmux plugin manager
|
||||||
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> parent of 02ed9ee... WS-2017.2 <fergalm@localhost Overwrite remote git@github.com:fergalmoran/dotfiles.git to local
|
||||||
|
#install git flow completion
|
||||||
|
git clone https://github.com/bobthecow/git-flow-completion ~/.oh-my-zsh/custom/plugins/git-flow-completion
|
||||||
|
|
||||||
|
# Setup default locales
|
||||||
|
sudo locale-gen "en_IE.UTF-8"
|
||||||
|
|
||||||
|
#install default packages
|
||||||
|
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
|
||||||
|
sudo apt update
|
||||||
|
sudo apt-get install -y exuberant-ctags build-essential cmake python-dev python3-dev libssl-dev vim-youcompleteme autojump nodejs htop ncdu python-pip python3-pip byobu zsh vim-gtk python-setuptools neovim tree git-extras cowsay fortune winbind libpq-dev xclip whois
|
||||||
|
sudo pip install --upgrade pip
|
||||||
|
sudo pip install --upgrade neovim
|
||||||
|
sudo pip3 install --upgrade neovim
|
||||||
|
ln -s ~/.vim ~/.config/nvim
|
||||||
|
ln -s ~/.vimrc ~/.config/nvim/init.vim
|
||||||
|
|
||||||
|
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
|
||||||
|
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
|
||||||
|
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
|
||||||
|
|
||||||
|
sudo pip install livereload speedtest-cli virtualenv virtualenvwrapper
|
||||||
|
sudo npm install -g goops
|
||||||
|
|
||||||
|
chsh -s /bin/zsh
|
||||||
|
|
||||||
|
git clone git@github.com:fergalmoran/vimfiles.git ~/.vim
|
||||||
|
ln -s ~/.vim/.vimrc ~/.vimrc
|
||||||
|
|
||||||
|
cd ~/.vim
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
vim +BundleInstall +qall
|
||||||
|
|
||||||
|
git config --global user.email "fergal.moran@gmail.com"
|
||||||
|
git config --global user.name "Fergal Moran"
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p ~/.local/share/fonts
|
||||||
|
cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20for%20Powerline%20Nerd%20Font%20Complete.otf
|
||||||
|
|
||||||
148
tmux.conf
Normal file
148
tmux.conf
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
# remap prefix to Control + a
|
||||||
|
set -g prefix C-a
|
||||||
|
# bind 'C-a C-a' to type 'C-a'
|
||||||
|
# bind C-a send-prefix
|
||||||
|
unbind C-b
|
||||||
|
|
||||||
|
setw -g mode-keys vi
|
||||||
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
######################
|
||||||
|
### DESIGN CHANGES ###
|
||||||
|
######################
|
||||||
|
|
||||||
|
## Status bar design
|
||||||
|
# status line
|
||||||
|
set -g status-justify left
|
||||||
|
set -g status-bg default
|
||||||
|
set -g status-fg colour12
|
||||||
|
set -g status-interval 2
|
||||||
|
|
||||||
|
# messaging
|
||||||
|
set -g message-fg black
|
||||||
|
set -g message-bg yellow
|
||||||
|
set -g message-command-fg blue
|
||||||
|
set -g message-command-bg black
|
||||||
|
|
||||||
|
#window mode
|
||||||
|
setw -g mode-bg colour6
|
||||||
|
setw -g mode-fg colour0
|
||||||
|
|
||||||
|
# window status
|
||||||
|
setw -g window-status-format " #F#I:#W#F "
|
||||||
|
setw -g window-status-current-format " #F#I:#W#F "
|
||||||
|
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
|
||||||
|
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
|
||||||
|
setw -g window-status-current-bg colour0
|
||||||
|
setw -g window-status-current-fg colour11
|
||||||
|
setw -g window-status-current-attr dim
|
||||||
|
setw -g window-status-bg green
|
||||||
|
setw -g window-status-fg black
|
||||||
|
setw -g window-status-attr reverse
|
||||||
|
|
||||||
|
# Info on left (I don't have a session display for now)
|
||||||
|
set -g status-left ''
|
||||||
|
|
||||||
|
# loud or quiet?
|
||||||
|
set-option -g visual-activity off
|
||||||
|
set-option -g visual-bell off
|
||||||
|
set-option -g visual-silence off
|
||||||
|
set-window-option -g monitor-activity off
|
||||||
|
set-option -g bell-action none
|
||||||
|
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
|
# The modes {
|
||||||
|
setw -g clock-mode-colour colour135
|
||||||
|
setw -g mode-attr bold
|
||||||
|
setw -g mode-fg colour196
|
||||||
|
setw -g mode-bg colour238
|
||||||
|
|
||||||
|
# }
|
||||||
|
# The panes {
|
||||||
|
|
||||||
|
# split panes using | and -
|
||||||
|
bind | split-window -h
|
||||||
|
bind _ split-window -v
|
||||||
|
unbind '"'
|
||||||
|
unbind %
|
||||||
|
bind k confirm kill-window
|
||||||
|
bind K confirm kill-server
|
||||||
|
bind < resize-pane -L 1
|
||||||
|
bind > resize-pane -R 1
|
||||||
|
bind - resize-pane -D 1
|
||||||
|
bind + resize-pane -U 1
|
||||||
|
bind r source-file ~/.tmux.conf
|
||||||
|
|
||||||
|
# switch panes using Alt-arrow without prefix
|
||||||
|
bind -n M-Left select-pane -L
|
||||||
|
bind -n M-Right select-pane -R
|
||||||
|
bind -n M-Up select-pane -U
|
||||||
|
bind -n M-Down select-pane -D
|
||||||
|
|
||||||
|
set -g pane-border-bg colour235
|
||||||
|
set -g pane-border-fg colour238
|
||||||
|
set -g pane-active-border-bg colour236
|
||||||
|
set -g pane-active-border-fg colour51
|
||||||
|
|
||||||
|
# Enable mouse control (clickable windows, panes, resizable panes)
|
||||||
|
set -g mouse on
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
# set-window-option -g mode-mouse on
|
||||||
|
# set-option -g mode-mouse on
|
||||||
|
# set-option -g mouse-select-pane on
|
||||||
|
# set-option -g mouse-resize-pane on
|
||||||
|
|
||||||
|
|
||||||
|
# }
|
||||||
|
# The statusbar {
|
||||||
|
|
||||||
|
set -g status-position bottom
|
||||||
|
set -g status-bg colour234
|
||||||
|
set -g status-fg colour137
|
||||||
|
set -g status-attr dim
|
||||||
|
set -g status-left ''
|
||||||
|
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
|
||||||
|
set -g status-right-length 50
|
||||||
|
set -g status-left-length 20
|
||||||
|
|
||||||
|
setw -g window-status-current-fg colour81
|
||||||
|
setw -g window-status-current-bg colour238
|
||||||
|
setw -g window-status-current-attr bold
|
||||||
|
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
|
||||||
|
|
||||||
|
setw -g window-status-fg colour138
|
||||||
|
setw -g window-status-bg colour235
|
||||||
|
setw -g window-status-attr none
|
||||||
|
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
|
||||||
|
|
||||||
|
setw -g window-status-bell-attr bold
|
||||||
|
setw -g window-status-bell-fg colour255
|
||||||
|
setw -g window-status-bell-bg colour1
|
||||||
|
|
||||||
|
# }
|
||||||
|
# The messages {
|
||||||
|
|
||||||
|
set -g message-attr bold
|
||||||
|
set -g message-fg colour232
|
||||||
|
set -g message-bg colour166
|
||||||
|
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
|
# Setup tmux resurrect
|
||||||
|
# List of plugins
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
if "test ! -d ~/.tmux/plugins/tpm" \
|
||||||
|
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
|
||||||
|
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
>>>>>>> parent of 02ed9ee... WS-2017.2 <fergalm@localhost Overwrite remote git@github.com:fergalmoran/dotfiles.git to local
|
||||||
Reference in New Issue
Block a user