From db6129f94261ad487462ac0ea1c1f222188031e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 11 Feb 2023 20:26:52 +0100 Subject: sourcing private untracked files --- root/.profile | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 root/.profile diff --git a/root/.profile b/root/.profile new file mode 100644 index 0000000..e8f0038 --- /dev/null +++ b/root/.profile @@ -0,0 +1,70 @@ +HISTCONTROL=ignoreboth +shopt -s histappend +HISTSIZE=100000000 +HISTFILESIZE=1000000000 +shopt -s checkwinsize +function upload () { + chmod 0644 "$1" + sftp -b- upload@upload <<< "put '$1' www/`[ '$2'x = x ] && echo $1 || echo $2`" +} +function mcd () { + mkdir -p $@ && cd $@ +} +function ocd () { + cd $OLDPWD +} +function atoi () { + # Returns the integer representation of an IP arg, passed in ascii dotted-decimal notation (x.x.x.x) + IP=$1 + IPNUM=0 + for (( i=0 ; i<4 ; ++i )); do + ((IPNUM+=${IP%%.*}*$((256**$((3-${i})))))) + IP=${IP#*.} + done + echo $IPNUM +} +function itoa () { + # returns the dotted-decimal ascii form of an IP arg passed in integer format + echo -n $(($(($(($((${1}/256))/256))/256))%256)). + echo -n $(($(($((${1}/256))/256))%256)). + echo -n $(($((${1}/256))%256)). + echo $((${1}%256)) +} +export QT_QPA_PLATFORMTHEME=qt5ct +alias gdb="gdb -q" +alias x11vnc="x11vnc -repeat -multiptr" +alias digs="dig +nocomments +noquestion +nostats +norrcomments +nocmd" +alias nc="nc -v" +alias m=make +alias torbrowser="while read a; do export $a; done < /etc/env.d/99torbrowser && torbrowser" +alias n="git --git-dir=$HOME/projects/n --work-tree=/" +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac +color_prompt=yes +if [ "$color_prompt" = yes ]; then + PS1='\[\033[00;32m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[35m\][\[\033[33m\]$?\[\033[35m\]]\[\033[31m\]\$\[\033[00m\] ' +else + PS1='\h:\w[$?]\$ ' +fi +unset color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in + xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; + *) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then +test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" +alias l='ls -lah --color=auto' +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +fi +[ -f ~/.bash_aliases ] && . ~/.bash_aliases +[ -f ~/.private_source ] && . ~/.private_source -- cgit v1.2.3