From 70dd0d162e73a7f76a90d6c6261669a147f1ab1b Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Mon, 25 Nov 2019 06:07:21 -0500 Subject: [PATCH 01/22] Changing command prompt colors + git pager. --- config/.bashrc | 8 ++++++-- config/.gitconfig | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/.bashrc b/config/.bashrc index e444b75..109e590 100755 --- a/config/.bashrc +++ b/config/.bashrc @@ -61,6 +61,9 @@ shopt -s checkwinsize # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # Terminal colors if interactive +# +# to see colors use +# for i in {0..255}; do echo $(tput setaf $i)$i; done # if [ -n "$PS1" ]; then # @@ -80,10 +83,10 @@ if [ -n "$PS1" ]; then c_green=$(tput setaf 2) c_orange=$(tput setaf 3) c_blue=$(tput setaf 4) - c_pink=$(tput setaf 5) + c_pink=$(tput setaf 33) c_cyan=$(tput setaf 6) c_white=$(tput setaf 7) - c_viol=$(tput setaf 12) + c_viol=$(tput setaf 99) # bold foreground #cbf_red=$(tput bold; tput setaf 1) # @@ -217,6 +220,7 @@ fi # VIM # export EDITOR=vim +export LESS=-R # # enable programmable completion features (you don't need to enable diff --git a/config/.gitconfig b/config/.gitconfig index ebf136e..0f463b1 100644 --- a/config/.gitconfig +++ b/config/.gitconfig @@ -23,5 +23,8 @@ path = ~/.gitconfig.local [core] excludesfile = ~/.gitignore.global + pager = less -F -X [credentail] helper = cache +[pager] + branch = false From fbd8aa8e740524a2728ed3bbf30fc979d612cf6c Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Mon, 24 Feb 2020 15:02:09 -0500 Subject: [PATCH 02/22] bashrc: prompt revisited --- config/.bashrc | 109 ++++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 52 deletions(-) diff --git a/config/.bashrc b/config/.bashrc index 109e590..1ba3efa 100755 --- a/config/.bashrc +++ b/config/.bashrc @@ -70,23 +70,15 @@ if [ -n "$PS1" ]; then # If there is no terminal info in the system for current terminal but there is # one in local terminfo then use it. # - tput -T $TERM longname 2>/dev/null >/dev/null - if [ "$?" -ne "0" ] && [ -f $HOME/.terminfo/$kernel/${TERM:0:1}/$TERM ]; then - export TERMINFO=$HOME/.terminfo/$kernel; - fi + #tput -T $TERM longname 2>/dev/null >/dev/null + #if [ "$?" -ne "0" ] && [ -f $HOME/.terminfo/$kernel/${TERM:0:1}/$TERM ]; then + # export TERMINFO=$HOME/.terminfo/$kernel; + #fi # # Number of colors and standard colors. # c_num=$(tput colors) - # regular foreground - c_red=$(tput setaf 1) - c_green=$(tput setaf 2) - c_orange=$(tput setaf 3) - c_blue=$(tput setaf 4) - c_pink=$(tput setaf 33) - c_cyan=$(tput setaf 6) - c_white=$(tput setaf 7) - c_viol=$(tput setaf 99) + # # bold foreground #cbf_red=$(tput bold; tput setaf 1) # @@ -95,6 +87,23 @@ if [ -n "$PS1" ]; then if [ $c_num -ge 256 ] && [ -f ~/.dir_colors ]; then eval $(dircolors ~/.dir_colors) fi + + function term_colors(){ + for i in {0..15}; do + for j in {0..15}; do + c=$((i*16+j)); + printf " $(tput setab $c)%04d" $c; + done; + printf "$(tput sgr0)\n"; + done + for i in {0..15}; do + for j in {0..15}; do + c=$((i*16+j)); + printf " $(tput setaf $c)%04d" $c; + done; + printf "$(tput sgr0)\n"; + done + } fi # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -107,38 +116,26 @@ if [ -n "$PS1" ]; then # if [ $c_num -ge 256 ]; then c_reset="$(tput sgr0)" - c_user="$c_green" - c_cwd="$c_viol" - c_time="$c_pink" - c_branch="$c_cyan" - c_exit="$c_red" - c_jobs="$c_orange" + c_user="$(tput setaf 112)" #Green + c_cwd="$(tput setaf 99)" + c_time="$(tput setaf 33)" #Light blue + c_branch="$(tput setaf 138)" + c_exit="$(tput setaf 203)" #Red + c_jobs="$(tput setaf 220)" #Yellow else c_reset="$(tput sgr0)" - c_user="$c_green" - c_cwd="$c_viol" - c_time="$c_pink" - c_branch="$c_cyan" - c_exit="$c_red" - c_jobs="$c_orange" + c_user="$(tput setaf 2)" #Green + c_cwd="$(tput setaf 7)" #White + c_time="$(tput setaf 6)" #Cyan + c_branch="$(tput setaf 6)" #Cyan + c_exit="$(tput setaf 1)" #Red + c_jobs="$(tput setaf 3)" #Yellow fi [ -n "$(which svn)" ] && prompt_check_svn=true [ -n "$(which git)" ] && prompt_check_git=true - # - # Colors should be set here and surrounded with \[\]otherwise bash fails to - # calculate prompt length. The text is set through PROMPT_COMMAND - PS1="\[$c_user\]\u@\h:" # username@host: - PS1+="\[$c_time\]\t" # time - PS1+=" \[$c_cwd\]\w" # working_dir - PS1+="\[$c_branch\]\$git_text" # git branch - PS1+="\[$c_branch\]\$svn_text" # svn revision - PS1+="\[$c_exit\]\$exit_text" # exit status of last command - PS1+="\[$c_jobs\]\$jobs_text" # background/suspended jobs - PS1+="\[$c_reset\]\$ " # reset colors and print $ - - export PROMPT_COMMAND="__prompt_command; $PROMPT_COMMAND" + export PROMPT_COMMAND="__prompt_command" function __prompt_command() { # @@ -147,15 +144,16 @@ if [ -n "$PS1" ]; then # local exit_code="$?" prompt_extra="" + PS1="\[$c_user\]\u@\h:" # username@host: + PS1+="\[$c_time\]\t" # time + PS1+=" \[$c_cwd\]\w" # working_dir # # git branch if exist # if [ -n "$prompt_check_git" ]; then local git_branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null | tr -d ' ') if [ -n "$git_branch" ]; then - git_text="[$git_branch]" - else - git_text="" + PS1+="\[$c_branch\]/$git_branch" fi fi # @@ -164,29 +162,36 @@ if [ -n "$PS1" ]; then if [ -n "$prompt_check_svn" ]; then local svn_rev=$(svn info . 2> /dev/null | awk -F ':' '/Revision:/ { print $2 }') if [ -n "$svn_rev" ]; then - svn_text="[$svn_rev]" - else - svn_text="" + svn_text="@$svn_rev" + PS1+="\[$c_branch\]\$svn_text" # svn revision fi fi # # exit code if not zero # if [ "$exit_code" -ne "0" ]; then - exit_text="[exit=$exit_code]" - else - exit_text="" + PS1+=",\[$c_exit\]rc=$exit_code" fi # # Info about jobs. # local jobs_bg=$(jobs -r | wc -l | tr -d ' ') - local jobs_stopped=$(jobs -s | wc -l | tr -d ' ') - if [ $jobs_bg -gt 0 ] || [ $jobs_stopped -gt 0 ]; then - jobs_text="[bg:$jobs_bg,stp:$jobs_stopped]" - else - jobs_text="" + if [ $jobs_bg -gt 0 ]; then + PS1+=",\[$c_jobs\]bg=$jobs_bg" fi + # + # Info about jobs. + # + local jobs_stopped=$(jobs -s | wc -l | tr -d ' ') + if [ $jobs_stopped -gt 0 ]; then + PS1+=",\[$c_jobs\]stp=$jobs_stopped" + fi + + + # + # Colors should be set here and surrounded with \[\]otherwise bash fails to + # calculate prompt length. The text is set through PROMPT_COMMAND + PS1+="\[$c_reset\]\$ " # reset colors and print $ } # Turn on checkwinsize shopt -s checkwinsize From 243da630aff31772b4449814ba243c49874d2c58 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Mon, 24 Feb 2020 16:12:00 -0500 Subject: [PATCH 03/22] bb setings. --- local/bb/.bashrc.local | 222 +++++++++++++++++++++++++++++++++++++++++ local/bb/.vimrc.lib | 48 +++++++++ local/bb/.vimrc.local | 31 ++++++ 3 files changed, 301 insertions(+) create mode 100755 local/bb/.bashrc.local create mode 100755 local/bb/.vimrc.lib create mode 100755 local/bb/.vimrc.local diff --git a/local/bb/.bashrc.local b/local/bb/.bashrc.local new file mode 100755 index 0000000..c5e15ec --- /dev/null +++ b/local/bb/.bashrc.local @@ -0,0 +1,222 @@ +#!/bin/bash + +# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# if chimera generated aliases exist, pull them into the current ENV +[ -f ~/.bbalias ] && . ~/.bbalias + +#wget +#export http_proxy=devproxy.bloomberg.com:82 +#export https_proxy=devproxy.bloomberg.com:82 + +if [[ "$(hostname)" == "lnxmqts01" ]]; then + export SKELETON_DEPLOY=$HOME/devel/bb/skeleton_internals +fi + +export DEV_CINC=-I. +export DEV_CPPINC=-I. +export DEV_FINC=-I. + +#I need this to run distributor locally. +export PGPASSFILE=$HOME/.fit_pgpass +export PGSERVICEFILE=$HOME/.fit_pg_service.conf + +export SRC_DIR=$HOME/devel/src +export BOOST_DIR=$SRC_DIR/boost +#export TBB_DIR=$SRC_DIR/tbb +#export TBB_LIB=$TBB_DIR/build/linux_intel64_gcc_cc4.8.2_libc2.12_kernel2.6.32_release/ +#export TBB_LIB_DEBUG=$TBB_DIR/build/linux_intel64_gcc_cc4.8.2_libc2.12_kernel2.6.32_debug/ + +alias bb='cd $HOME/devel/bb >/dev/null' +#complete -f -X '!*.mk' plink +#complete -f -X '!*.mk' llcalc +#complete -W "build clean build_all clean_all skeleton_setup jenkins_update" make + +stty sane # should normalize backspace issues? + +# +# BLOOMBERG and TOMS +# +export BB=$HOME/devel/bb +PATH=$PATH:$BB/scripts +PATH=$MYSCRIPTS/local/bb:$PATH +# PATH=$HOME/bb/bas-codegen/bin:$PATH + +export BBTAG=local +if [[ "$os" == "GNU/Linux" ]]; then + export IS_64BIT=yes + #PATH=/bb/build/Linux-x86_64-64/release/robolibs/stage/opt/bb/libexec/build-base/:$PATH +fi + +getop() { # BOX + if [[ $# -ne 1 ]]; then + echo "Usage: getop " + else + local BOX="$1" + local BIN="/bb/bin/getprdwin" + $BIN -u op1 -i -s $BOX -d "op1 for $USER on $BOX" + fi +} + +run() { + if [[ $# -lt 1 ]]; then + echo "Usage: run " + elif [[ $# -eq 1 ]]; then + SERVER=$1 + ssh $LOGNAME@$SERVER "cd $PWD; exec $BASH --login" + else + SERVER=$1 + shift + ssh $LOGNAME@$SERVER "cd $PWD; $@" + fi +} + +sun() { # CMD + if [[ $# -ne 1 ]]; then + echo "Usage: sun " + else + run njtsdev3 $@ + fi +} + +ibm() { # CMD + if [[ $# -ne 1 ]]; then + echo "Usage: ibm " + else + run ibm3 $@ + fi +} + +git-repo-setup(){ + + if [[ $# -ne 0 ]]; then + echo "Usage: just run inside a bbgithub repo." + return + fi + + st=$(git status) + if [[ $? -ne 0 ]]; then + echo "Looks this is not a git repo." + return + fi + + us=$(git remote get-url upstream 2> /dev/null) + if [[ $? -eq 0 ]]; then + echo "Upstream already exist as $us." + return + fi + + url=$(git remote get-url origin) + if [[ $? -ne 0 ]]; then + echo "Origin URL is unknown." + return + fi + + re="^(.*)[/:]([^/:]*)/(.*)$" + if [[ $url =~ $re ]]; then + prefix=${BASH_REMATCH[1]} + org=${BASH_REMATCH[2]} + repo=${BASH_REMATCH[3]} + else + echo "Failed to pars the repo URL." + return + fi + + upstream_repo=bbgithub:$org/$repo + origin_repo=bbgithub:vkhachatrya5/$repo + + git remote rm origin + echo "Setting origin=$origin_repo" + git remote add origin $origin_repo + echo "Setting upstream=$upstream_repo" + git remote add upstream $upstream_repo + git remote -v +} + +git-master-refresh(){ + git fetch upstream master + git co upstream/master + git br -D master + git co -b master +} + +# +#alias dirs='dirs -v' +#alias ack='ack --ignore-file=ext:d,dd' +# +#alias dirtree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' " +#alias currgit='cd /bb/mbig/mbig1205/devgit/s_tktapi2/src; echo -e "I am here $(pwd)"' +#alias tktapi='cd /bb/mbig/mbig1205/devgit/tktapi/src; echo -e "I am here $(pwd) \n $(ls)"' +#alias bastest='/bbsrc/abin/basclient' +#alias bas_codegen='/bb/shared/bin/bas_codegen.pl' +#alias metasymfind="cat - | awk '{ print \$1 }' | xargs symfind | awk 'BEGIN{FS=\"[\"} { print \$1 }' | sort | uniq | tr '\n' ' ' | sed -e 's/\(\b\S\)/-l\1/g' && echo \"\"" +# +#alias git-robo='ssh devgit svnsync $(git remote -v | grep "(fetch)" | cut -d ":" -f2 | cut -d "(" -f1); git fetch origin; git pull; git merge robo/trunk; read -p "!!!!! PUSH the merged version back !!!!! ? [Y] / Ctrl+C to stop"; git push' +#alias intuorcreate=/bbsrc/internal/isystest/uorcreate/intuorcreate +# +# +# +#export BIGHOME=/bb/mbig/mbig1205 +#export PLINK_PARALLEL_BUILD=true +#export EDITOR=/opt/swt/bin/nedit +#export PAGER=less +#export GROUP=trading-systems-group +#export mysvn="svn+ssh://devsvn" +#export myrobosvn="svn+ssh://devsvn/robo/branches/trunk" +#export PATH=/opt/swt/bin:~/bin:/bb/util/common/studio12/SUNWspro/bin:${PATH} +#export DEVGIT=${BIGHOME}/devgit +#export VISUAL=/opt/swt/bin/nedit +#export MAIL=/usr/mail/${LOGNAME:?} +# + +# + +# +##ssh() { +# #echo "wut" +# #[[ -n "$INSCREEN" ]] && TERM=screen-256color +# #env ssh -t $* +# #$SCREEN_TITLE_CMD +##} +# +# +#biggest() { +# dir=${1:-.} +# find $dir -type f -exec du -a {} \+ | sort -rn +#} +# +## Screen variables +#function last2dirs { +# pwd | awk -F\/ '{print $(NF-1),$(NF)}' | sed 's# #/#' +#} +# +##screen specific functionality +##if [[ -n ${STY} ]] +##then +# PROMPT_COMMAND='echo -ne "\033k${HOSTNAME} $(last2dirs)\033\\"; +# history -a;' +##fi +# +#function dupscreen { +# screen bash -c "export SSHCDPATH=$PWD && exec $SHELL --login" +#} +# +#if [[ -e ~/.git-completion.bash ]] +#then +# source ~/.git-completion.bash +#fi +# +#if [ -n "$BBENV" ] && [[ -f ~/bin/hijackEOD.sh ]] +#then +# source `which hijackEOD.sh` +#fi +# +# + +# +# Don't source the rest twice. +# +#if [ "$BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE" == "true" ]; then +# return +#fi + + diff --git a/local/bb/.vimrc.lib b/local/bb/.vimrc.lib new file mode 100755 index 0000000..3d3a5e3 --- /dev/null +++ b/local/bb/.vimrc.lib @@ -0,0 +1,48 @@ +let g:srcdir="/home/vkhachatrya5/devel/src" + +" +" STL +" +"let &path.=",".g:tbbinc + +" +" BOOST +" +let g:boostdir=g:srcdir."/boost" +let g:boostinc=g:boostdir +let g:boostlib=g:boostdir."/stage/lib" +let g:boostbin=g:boostlib +let g:Bboost=g:boostbin.":" +let g:Iboost=" -I".g:boostinc +let g:Lboost=" -L".g:boostlib +let g:boost=g:Iboost.g:Lboost +let &path.=",".g:boostinc +" +" Intel TBB +" +let g:tbbdir=g:srcdir."/tbb" +let g:tbbinc=g:tbbdir."/include" +let g:tbblib=g:tbbdir."/build/linux_intel64_gcc_cc4.8.2_libc2.5_kernel2.6.18_release" +let g:tbbbin=g:tbblib +let g:Itbb=" -I".g:tbbinc +let g:Ltbb=" -L".g:tbblib." -ltbb" +let g:tbbmalloc=" -ltbbmalloc" +let g:tbbmproxy=" -ltbbmalloc_proxy" +let g:tbb=g:Itbb.g:Ltbb +let &path.=",".g:tbbinc +" +" Robo +" +let g:robodir="/bb/build/Linux-x86_64-64/release/robolibs/stage/dpkgroot/opt/bb/include" +let g:roboinc=g:robodir."/include" +let g:robolib=g:robodir."/lib64" +let g:Ibb=" -I".g:roboinc +let g:Lbb=" -L".g:robolib +let g:bb=g:Ibb.g:Lbb +let &path.=",".g:roboinc + + +" +" Append library paths to LD_LIBRARY_PATH +" +"let $LD_LIBRARY_PATH .= ':'.g:boostlib.':'.g:tbblib diff --git a/local/bb/.vimrc.local b/local/bb/.vimrc.local new file mode 100755 index 0000000..4aa20b9 --- /dev/null +++ b/local/bb/.vimrc.local @@ -0,0 +1,31 @@ +set expandtab +set visualbell +" Uncomment below to make screen not flash on error +set vb t_vb="" +set wildignore+=*.o,*.obj,*.bak,*.exe,*.tsk,*.d,*.dd + +"set path=.,/usr/include,/usr/include/c++/4.4.4,../,../../src,../src,./src +set path=.,/usr/include,../../src,../src,./src +set path+=/bb/build/SunOS-sparc-32/release/robolibs/stage/dpkgroot/opt/bb/include/stlport +set path+=/bb/build/SunOS-sparc-32/release/robolibs/stage/opt/bb/include/ +set path+=/bb/build/SunOS-sparc-32/release/robolibs/stage/opt/bb/include/00depbuild +set path+=/bb/build/SunOS-sparc-32/release/robolibs/stage/opt/bb/include/00deployed +set path+=/bb/build/SunOS-sparc-32/release/robolibs/stage/opt/bb/include/00offlonly +set path+=/bb/build/share/stp/include/00offlonly +set path+=/bbsrc/thirdparty/bbit/include +set path+=/bb/build/SunOS-sparc-32/release/robolibs/stage/dpkgroot/opt/bb/include/ + +set tags+=tags +set tags+=./tags +set tags+=../tags +set tags+=../../tags +"set tags+=../../../tags +"set tags+=../../../../tags +"set tags+=~/devel/bb/bbsrc/tags/all.tags + +"for t in split(glob('~/devel/bb/bbsrc/tags/*.tags'), '\n') +" exec "set tags+=".t +"endfor + +autocmd FileType make set noexpandtab + From 55db114d1f34a69b1b68ff8c8b9d3050cf8ff91f Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Mon, 24 Feb 2020 20:55:10 +0000 Subject: [PATCH 04/22] Merging with github.com. --- config/.gitconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config/.gitconfig b/config/.gitconfig index 0f463b1..7798dad 100644 --- a/config/.gitconfig +++ b/config/.gitconfig @@ -23,8 +23,21 @@ path = ~/.gitconfig.local [core] excludesfile = ~/.gitignore.global + autocrlf = false pager = less -F -X [credentail] helper = cache [pager] branch = false + +[url "https://vishap@github.com/"] + insteadOf = github: + +[url "https://gitlab.com/"] + insteadOf = gitlab: + +[url "http://192.168.0.4:8080/"] + insteadOf = mylab: + +[pager] + branch = false From 519c9e802dc69a724936baec692d04ef362b69a2 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Mon, 24 Feb 2020 22:00:37 +0000 Subject: [PATCH 05/22] .gitconfig.locla --- local/bb_local_dev/.gitconfig.local | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 local/bb_local_dev/.gitconfig.local diff --git a/local/bb_local_dev/.gitconfig.local b/local/bb_local_dev/.gitconfig.local new file mode 100644 index 0000000..14f8a28 --- /dev/null +++ b/local/bb_local_dev/.gitconfig.local @@ -0,0 +1,34 @@ +[user] + name = Vahagn Khachatryan + email = vkhachatrya5@bloomberg.net + +[url "bbgithub:"] + insteadOf = https://bbgithub.dev.bloomberg.com + +[http "https://github.com"] + proxy = http://proxy.bloomberg.com:81 + sslCAinfo = /usr/local/share/ca-certificates/bloomberg-root-ca.crt + +[url "https://github.com/"] + insteadOf = github.com: +[url "https://github.com/"] + insteadOf = git@github.com: +[url "https://github.com/"] + insteadOf = ssh://git@github.com/ + +[http "https://gitlab.com"] + proxy = http://proxy.bloomberg.com:81 + sslCAinfo = /usr/local/share/ca-certificates/bloomberg-root-ca.crt + +[url "https://gitlab.com/"] + insteadOf = gitlab.com: +[url "https://gitlab.com/"] + insteadOf = git@gitlab.com: +[url "https://gitlab.com/"] + insteadOf = ssh://git@gitlab.com/ + +[http "http://192.168.0.4:8080"] + proxy = socks5://127.0.0.1:1080 + +[url "http://git.kernel.org"] + insteadOf = git://git.kernel.org From 01e488783b6d4e0ba94fda8cc67d49c8b52aebf6 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Fri, 28 Feb 2020 05:55:45 -0500 Subject: [PATCH 06/22] Fix prompt errors on Solaris. --- config/.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/.bashrc b/config/.bashrc index 1ba3efa..c6b8084 100755 --- a/config/.bashrc +++ b/config/.bashrc @@ -160,7 +160,7 @@ if [ -n "$PS1" ]; then # svn branch if exist # if [ -n "$prompt_check_svn" ]; then - local svn_rev=$(svn info . 2> /dev/null | awk -F ':' '/Revision:/ { print $2 }') + local svn_rev=$(svn info . 2> /dev/null | nawk -F ':' '/Revision:/ { print $2 }') if [ -n "$svn_rev" ]; then svn_text="@$svn_rev" PS1+="\[$c_branch\]\$svn_text" # svn revision From 5f8fe54a8fb1bccb48f5f534a220083cf2ad164b Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Fri, 28 Feb 2020 05:57:38 -0500 Subject: [PATCH 07/22] Fix BBTAG for whole session. --- local/bb/.bashrc.local | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/local/bb/.bashrc.local b/local/bb/.bashrc.local index c5e15ec..a4c467b 100755 --- a/local/bb/.bashrc.local +++ b/local/bb/.bashrc.local @@ -41,11 +41,14 @@ PATH=$PATH:$BB/scripts PATH=$MYSCRIPTS/local/bb:$PATH # PATH=$HOME/bb/bas-codegen/bin:$PATH -export BBTAG=local if [[ "$os" == "GNU/Linux" ]]; then export IS_64BIT=yes + BBBITS=64 #PATH=/bb/build/Linux-x86_64-64/release/robolibs/stage/opt/bb/libexec/build-base/:$PATH +else + BBBITS=32 fi +export BBTAG=$(/opt/bb/bin/robolibs-current-build --tag local --bits $BBBITS) getop() { # BOX if [[ $# -ne 1 ]]; then From f3cc45cc576f15262f930119a9b3c3fe488b5940 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Tue, 8 Oct 2019 00:30:40 +0400 Subject: [PATCH 08/22] lsync.sh --- local/yerevak/lsync.sh | 1 + 1 file changed, 1 insertion(+) create mode 100755 local/yerevak/lsync.sh diff --git a/local/yerevak/lsync.sh b/local/yerevak/lsync.sh new file mode 100755 index 0000000..a20b6b9 --- /dev/null +++ b/local/yerevak/lsync.sh @@ -0,0 +1 @@ +rsync -av --progress --inplace --update --append-verify --remove-source-files -e "ssh -p 24" /mnt/ssd/deluge/done/$1 lusntag.vostan.org:/mnt/home/vahagn/tmp/tmp/$1 From 35f225f9a44102ffd1309608d516013bd3b813e8 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Tue, 8 Oct 2019 23:59:47 +0400 Subject: [PATCH 09/22] lsync.sh fixed bug with doubling dir name. --- bin/lsync.sh | 1 + local/yerevak/lsync.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100755 bin/lsync.sh delete mode 100755 local/yerevak/lsync.sh diff --git a/bin/lsync.sh b/bin/lsync.sh new file mode 100755 index 0000000..c9fe0d7 --- /dev/null +++ b/bin/lsync.sh @@ -0,0 +1 @@ +rsync -av --progress --inplace --append-verify --remove-source-files -e "ssh -p 24" /mnt/ssd/deluge/done/$1 lusntag.vostan.org:/mnt/home/vahagn/tmp/tmp diff --git a/local/yerevak/lsync.sh b/local/yerevak/lsync.sh deleted file mode 100755 index a20b6b9..0000000 --- a/local/yerevak/lsync.sh +++ /dev/null @@ -1 +0,0 @@ -rsync -av --progress --inplace --update --append-verify --remove-source-files -e "ssh -p 24" /mnt/ssd/deluge/done/$1 lusntag.vostan.org:/mnt/home/vahagn/tmp/tmp/$1 From 4e7dc264d6cc4345ad7e814eeff377e198803b6b Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Wed, 9 Oct 2019 00:06:28 +0400 Subject: [PATCH 10/22] upload.ready.deluge.sh --- bin/upload.ready.deluge.sh | 1 + 1 file changed, 1 insertion(+) create mode 100755 bin/upload.ready.deluge.sh diff --git a/bin/upload.ready.deluge.sh b/bin/upload.ready.deluge.sh new file mode 100755 index 0000000..82b5599 --- /dev/null +++ b/bin/upload.ready.deluge.sh @@ -0,0 +1 @@ +/usr/bin/rsync -av --progress --inplace --append-verify -e "ssh -p 24" /mnt/ssd/deluge/done lusntag.vostan.org:/mnt/home/vahagn/tmp/tmp From f4463206d56eec3283ac220ed2e69a62e48e8c0c Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 04:05:24 +0400 Subject: [PATCH 11/22] Update upload.ready.deluge.sh; --- bin/upload.ready.deluge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/upload.ready.deluge.sh b/bin/upload.ready.deluge.sh index 82b5599..c2d8607 100755 --- a/bin/upload.ready.deluge.sh +++ b/bin/upload.ready.deluge.sh @@ -1 +1 @@ -/usr/bin/rsync -av --progress --inplace --append-verify -e "ssh -p 24" /mnt/ssd/deluge/done lusntag.vostan.org:/mnt/home/vahagn/tmp/tmp +/usr/bin/rsync -av --inplace --append-verify -e "ssh -p 8080" /mnt/ssd/deluge/done lusntag.vostan.org:/mnt/home/vahagn/tmp/tmp From 52d2b8347996bd032bd9e8ab6cb10a874ff15538 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 04:07:38 +0400 Subject: [PATCH 12/22] Update Vundle.vim --- vim/bundle/Vundle.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/Vundle.vim b/vim/bundle/Vundle.vim index 9a38216..b255382 160000 --- a/vim/bundle/Vundle.vim +++ b/vim/bundle/Vundle.vim @@ -1 +1 @@ -Subproject commit 9a38216a1c0c597f978d73547d37681fc689c90d +Subproject commit b255382d6242d7ea3877bf059d2934125e0c4d95 From d18052d79376789e529f2772de46d953b93c8846 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 04:58:02 +0400 Subject: [PATCH 13/22] yerevak.motd --- motd/yerevak.motd | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 motd/yerevak.motd diff --git a/motd/yerevak.motd b/motd/yerevak.motd new file mode 100644 index 0000000..83cc486 --- /dev/null +++ b/motd/yerevak.motd @@ -0,0 +1,9 @@ + + _ _ _ + | |__ ____ | |_ _ _ _| | + | __|_/ _ \| _|_ _ | | | | | | | _ + | |__| | | |_| |_| | |_| |_| |_| | |_| | + \____/| | \____/\___\_______ _/\__ | + |_| |_| + + From 6a676ba410e8828e3941b4776575faded8891284 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 01:25:22 +0000 Subject: [PATCH 14/22] .ssh/config --- config/.ssh/config | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 config/.ssh/config diff --git a/config/.ssh/config b/config/.ssh/config new file mode 100644 index 0000000..15f4011 --- /dev/null +++ b/config/.ssh/config @@ -0,0 +1,20 @@ +Host lusntag + HostName lusntag.vostan.org + Port 8080 + User vahagn + +Host yerevak + HostName yerevak.vostan.org + Port 24 + User vahagn + +Host hrat + HostName 192.168.0.4 + User vahagn + +Host github.com + User vishap + Hostname ssh.github.com + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa + Port 443 From 9eebd300389b2f57b337917953e4e3fc7ff912d0 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 18:42:12 +0000 Subject: [PATCH 15/22] lusntag.motd --- motd/lusntag.motd | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 motd/lusntag.motd diff --git a/motd/lusntag.motd b/motd/lusntag.motd new file mode 100644 index 0000000..d368dd7 --- /dev/null +++ b/motd/lusntag.motd @@ -0,0 +1,7 @@ + _ _ + | | ____ _ |_\_ ___ _ _ _ ___ + | | / _ \ _ | | | | | __/ _ \| | | | | |/ _ \ + | |__| | | | |_| |_| | |_) | |/) / |_| | | | (_) |_ + \____|_| |_|___,\___/ \___/| |\_/\_________/\__ _| + |_| |_| + From bd5b1623eaa4b7e7f3d8ad03526d1ba6b824bc1e Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 19:15:19 +0000 Subject: [PATCH 16/22] bb vpn laptop wsl ssh config. --- config/.gitconfig | 11 ------ local/bb_local_dev/.gitconfig.local | 16 -------- local/bb_local_dev/.ssh/config | 59 +++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 27 deletions(-) create mode 100644 local/bb_local_dev/.ssh/config diff --git a/config/.gitconfig b/config/.gitconfig index 7798dad..219816c 100644 --- a/config/.gitconfig +++ b/config/.gitconfig @@ -30,14 +30,3 @@ [pager] branch = false -[url "https://vishap@github.com/"] - insteadOf = github: - -[url "https://gitlab.com/"] - insteadOf = gitlab: - -[url "http://192.168.0.4:8080/"] - insteadOf = mylab: - -[pager] - branch = false diff --git a/local/bb_local_dev/.gitconfig.local b/local/bb_local_dev/.gitconfig.local index 14f8a28..c636431 100644 --- a/local/bb_local_dev/.gitconfig.local +++ b/local/bb_local_dev/.gitconfig.local @@ -9,26 +9,10 @@ proxy = http://proxy.bloomberg.com:81 sslCAinfo = /usr/local/share/ca-certificates/bloomberg-root-ca.crt -[url "https://github.com/"] - insteadOf = github.com: -[url "https://github.com/"] - insteadOf = git@github.com: -[url "https://github.com/"] - insteadOf = ssh://git@github.com/ - [http "https://gitlab.com"] proxy = http://proxy.bloomberg.com:81 sslCAinfo = /usr/local/share/ca-certificates/bloomberg-root-ca.crt -[url "https://gitlab.com/"] - insteadOf = gitlab.com: -[url "https://gitlab.com/"] - insteadOf = git@gitlab.com: -[url "https://gitlab.com/"] - insteadOf = ssh://git@gitlab.com/ - [http "http://192.168.0.4:8080"] proxy = socks5://127.0.0.1:1080 -[url "http://git.kernel.org"] - insteadOf = git://git.kernel.org diff --git a/local/bb_local_dev/.ssh/config b/local/bb_local_dev/.ssh/config new file mode 100644 index 0000000..7b31dc6 --- /dev/null +++ b/local/bb_local_dev/.ssh/config @@ -0,0 +1,59 @@ +# Note that value for 'User' must be 'git'. +Host bbgithub bbgithub.dev.bloomberg.com + HostName bbgithub.dev.bloomberg.com + IdentityFile ~/.ssh/bbgithub + User git + UserKnownHostsFile /dev/null + StrictHostKeyChecking no + +Host github.com + User vishap + Hostname github.com + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa_home + ProxyCommand=nc -X 5 -x localhost:1080 %h %p + + +Host lusntag + HostName lusntag.vostan.org + Port 8080 + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa_home + User vahagn + ProxyCommand=nc -X 5 -x localhost:1080 %h %p + +Host yerevak + HostName yerevak.vostan.org + Port 24 + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa_home + User vahagn + ProxyCommand=nc -X 5 -x localhost:1080 %h %p + + +Host hrat + HostName 192.168.0.4 + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa_home + User vahagn + ProxyCommand=nc -X 5 -x localhost:1080 %h %p + + +Host * + AddKeysToAgent yes + IdentitiesOnly yes + StrictHostKeyChecking no + UserKnownHostsFile /dev/null + +Host v5dev v5devgateway.bdns.bloomberg.com + ControlMaster auto + ControlPersist 8h + IdentityFile ~/.ssh/id_rsa.openssh + ControlPath /tmp/%r@%h-%p + Port 22 + +Host *.bloomberg.com !bbgithub.dev.bloomberg.com !v5prqsgateway.bdns.bloomberg.com + ControlPath /tmp/%r@%h-%p + ControlMaster auto + ControlPersist 24h + From 6833f5b5c92cef717ff2fbf384a2d99a6851cf39 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sat, 29 Feb 2020 23:41:18 +0000 Subject: [PATCH 17/22] docker files for calibre and gerbera. --- bin/docker-calibre.sh | 8 ++++++++ bin/docker-gerbera.sh | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 bin/docker-calibre.sh create mode 100755 bin/docker-gerbera.sh diff --git a/bin/docker-calibre.sh b/bin/docker-calibre.sh new file mode 100755 index 0000000..0446296 --- /dev/null +++ b/bin/docker-calibre.sh @@ -0,0 +1,8 @@ +sudo docker create \ + --name=calibre --restart=always \ + -v /srv/calibre/books:/books \ + -v /srv/calibre/config:/calibre-web/config \ + -v /etc/localtime:/etc/localtime:ro \ + -e PGID=33 -e PUID=33 -p 8095:8083 \ + technosoft2000/calibre-web + diff --git a/bin/docker-gerbera.sh b/bin/docker-gerbera.sh new file mode 100755 index 0000000..f0d994b --- /dev/null +++ b/bin/docker-gerbera.sh @@ -0,0 +1,15 @@ +docker run \ + -d \ + --net=host \ + --name gerbera \ + --hostname gerbera \ + --restart always \ + --volume /srv/gerbera/config:/root/.config \ + --volume /srv/gerbera/books:/books \ + --volume /srv/gerbera/music:/music \ + --volume /srv/gerbera/video:/video \ + --volume /mnt/hdd/download/movies:/hdd_video2 \ + --volume /mnt/hdd2/public/movies:/hdd_video \ + --volume /mnt/hdd/public/music:/hdd_music \ + gerbera/gerbera + From 93fec3e4b41ad0163b05319a7a7f4a6c2b1b88ae Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 22:41:38 +0000 Subject: [PATCH 18/22] vimrc conflicts resolved. Vundle updated. --- vim/vimrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index e9b2904..e19623f 100755 --- a/vim/vimrc +++ b/vim/vimrc @@ -428,8 +428,7 @@ if filereadable(expand(s:vundle_path.'/README.md')) let g:airline#extensions#tabline#left_alt_sep = '|' let g:airline_powerline_fonts = 1 - " - " + " Plugin 'scrooloose/nerdtree' let g:NERDTreeQuitOnOpen = 1 @@ -488,6 +487,7 @@ if filereadable(expand(s:vundle_path.'/README.md')) " Tmux integration. " Plugin 'benmills/vimux' + " " Extends modeline to variables. " Needed by CF5 compile to read options right from file. From e90b6dfede3b7e2d80ad6502e85becfc77f9bd1c Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 22:46:11 +0000 Subject: [PATCH 19/22] hrat.motd --- motd/hrat.motd | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 motd/hrat.motd diff --git a/motd/hrat.motd b/motd/hrat.motd new file mode 100644 index 0000000..ab72707 --- /dev/null +++ b/motd/hrat.motd @@ -0,0 +1,7 @@ + __ + \ \ _____ _ _ _ _ ____ + / / / _ | | | | | | | / _ \ + / /___| | |_| |_| |_| | |_| | | | + (______| | \________/\_____/ |_| + |_| + From 98db749815770bcf69726ebd6b8214a5eb2e2f04 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 1 Mar 2020 22:49:37 +0000 Subject: [PATCH 20/22] .ssh/config --- config/.ssh/config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/.ssh/config b/config/.ssh/config index 15f4011..8601654 100644 --- a/config/.ssh/config +++ b/config/.ssh/config @@ -2,19 +2,22 @@ Host lusntag HostName lusntag.vostan.org Port 8080 User vahagn + PreferredAuthentications publickey Host yerevak HostName yerevak.vostan.org Port 24 User vahagn + PreferredAuthentications publickey Host hrat HostName 192.168.0.4 User vahagn + PreferredAuthentications publickey Host github.com User vishap - Hostname ssh.github.com + Hostname github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa - Port 443 + From 39c3b43ab7b57167fcc44d6c80285399e068db13 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Mon, 9 Mar 2020 02:33:26 +0400 Subject: [PATCH 21/22] Yerevak .ssh config. --- bin/upload.ready.deluge.sh | 11 ++++++++++- local/yerevak/.ssh/config | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 local/yerevak/.ssh/config diff --git a/bin/upload.ready.deluge.sh b/bin/upload.ready.deluge.sh index c2d8607..ccfdbe9 100755 --- a/bin/upload.ready.deluge.sh +++ b/bin/upload.ready.deluge.sh @@ -1 +1,10 @@ -/usr/bin/rsync -av --inplace --append-verify -e "ssh -p 8080" /mnt/ssd/deluge/done lusntag.vostan.org:/mnt/home/vahagn/tmp/tmp +set -x +if [ ! -z "$*" ]; then + for i in "$@"; do + /usr/bin/rsync -av --inplace --progress --append-verify "/mnt/ssd/deluge/done/$i" "hrat:tmp/tmp/done/" + done +else + echo "/usr/bin/rsync -av --inplace --append-verify /mnt/ssd/deluge/done hrat:tmp/tmp" +fi + + diff --git a/local/yerevak/.ssh/config b/local/yerevak/.ssh/config new file mode 100644 index 0000000..61b40ed --- /dev/null +++ b/local/yerevak/.ssh/config @@ -0,0 +1,24 @@ +# Note that value for 'User' must be 'git'. + +Host lusntag + HostName lusntag.vostan.org + Port 8080 + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa + User vahagn + +Host yerevak + HostName yerevak.vostan.org + Port 24 + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa + User vahagn + + +Host hrat + HostName 192.168.0.4 + PreferredAuthentications publickey + IdentityFile ~/.ssh/id_rsa + User vahagn + ProxyCommand=ssh -W %h:%p lusntag + From 716ef8d098bd026192b7969158f9f3cabb54279e Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Tue, 14 Apr 2020 00:33:49 +0100 Subject: [PATCH 22/22] docker compose for nextcloud --- docker/nextcloud/docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docker/nextcloud/docker-compose.yml diff --git a/docker/nextcloud/docker-compose.yml b/docker/nextcloud/docker-compose.yml new file mode 100644 index 0000000..4727d43 --- /dev/null +++ b/docker/nextcloud/docker-compose.yml @@ -0,0 +1,13 @@ +version: '2' + +services: + nextcloud: + image: nextcloud:18 + ports: + - 8090:80 + volumes: + - /srv/nextcloud:/var/www/html + restart: always + +volumes: + nextcloud: