Browse Source

Merge branch 'master' of http://git.dev0.sh/piper/html5_dev0

shouldnt cause issues, hope to overwrite bashrc
master
piper 2 years ago
parent
commit
e0e6179381
  1. 145
      bashrc
  2. 8
      index.html

145
bashrc

@ -1,145 +0,0 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
export TERM=xterm
set -o vi
########
# Path #
########
export PATH=$PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/sbin:/usr/sbin:/snap/bin:~/bin
###########
# History #
###########
HISTCONTROL=ignoreboth
shopt -s histappend
shopt -s cdspell
HISTSIZE=1000
HISTFILESIZE=2000
HISTIGNORE="jrnl *"
###############
# Winsize fix #
###############
shopt -s checkwinsize
###########
# Prompts #
###########
color_prompt=yes
RED="$(tput setaf 1)"
BRED="$(tput bold; tput setaf 1)"
RESET="$(tput sgr0)"
BLUE="$(tput setaf 4)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
CYAN="$(tput setaf 6)"
PURPLE="$(tput setaf 5)"
if [ -n "$SSH_CLIENT" ]; then SES="$(tput setaf 3)ssh"; else SES="$(tput setaf 2)local"; fi
if [ $(whoami) == root ]; then USER="$(tput blink)$(tput setaf 1)groot$(tput sgr0)"; else USER="$(tput setaf 4)$(whoami)"; fi
PS1="\[$BRED\]┌[\[$RESET\]$SES\[$BRED\]][\[$RESET\]$USER\[$YELLOW\]@\[$PURPLE\]\h\[$BRED\]][\[$RESET\]\[$CYAN\]\w\[$BRED\]]\n\[$BRED\]┕\[$RESET\] "
#######################
# Colorize + Humanize #
#######################
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls -h --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
#################
# Auto Complete #
#################
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
#########
# Title #
#########
# This will run before any command is executed.
function PreCommand() {
if [ -z "$AT_PROMPT" ]; then
return
fi
unset AT_PROMPT
# Do stuff.
trap 'echo -ne "\033]2;$(history 1 | sed "s/^[ ]*[0-9]*[ ]*//g")\007"' DEBUG
}
trap "PreCommand" DEBUG
# This will run after the execution of the previous full command line. We don't
# want it PostCommand to execute when first starting a bash session (i.e., at
# the first prompt).
FIRST_PROMPT=1
function PostCommand() {
AT_PROMPT=1
if [ -n "$FIRST_PROMPT" ]; then
unset FIRST_PROMPT
return
fi
# Do stuff.
#echo "Return"
}
PROMPT_COMMAND="PostCommand"
##############
# Source RVM #
##############
#source /etc/profile.d/rvm.sh
###########
# Aliases #
###########
alias r='source ~/.bashrc'
alias pub='curl -s ipinfo.io/ip'
alias x='startx'
#alias vi='vim'
alias upbash='curl -L -k https://dev0.sh/bashrc > ~/.bashrc ; source ~/.bashrc'
alias iptables-list='sudo iptables -L -n --line-numbers'
alias rm='rm -i'
alias docker-stats='docker ps --format "table {{.Names}}\t{{.RunningFor}}\t{{.Status}}\t{{.Ports}}"'
alias clean-comments="grep -o '^[^#]*'"
# Sudo Fixes
alias apt='sudo apt'
alias dpkg='sudo dpkg'
alias eopkg='sudo eopkg'
alias yum='sudo yum'
alias pacman='sudo pacman'
alias zypper='sudo zypper'
#Functions
function wttr { curl wttr.in/"$1"; }
function speed { curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -; }
# Exports
export -f wttr
export PATH="$PATH:$HOME/.rvm/"
export -f speed
# Commands
echo -e "Hi, I am $(hostname). I am working with $(free -h | sed -n '2p' | awk '{print $4}') out of $(free -h | sed -n '2p' | awk '{print $2}') of RAM. I have been $(uptime -p). I can be found here $(ip route | sed -n '1p' | awk '{print $3}') and $(pub)."

8
index.html

@ -40,7 +40,7 @@
<ul>
<li><a href="#cloud">Cloud</a></li>
<li><a href="#wiki">Wiki</a></li>
<li><a href="#plex">Plex</a></li>
<li><a href="#files">Files</a></li>
<li><a href="#stats">Stats</a></li>
<!--<li><a href="#elements">Elements</a></li>-->
</ul>
@ -66,6 +66,12 @@
<p><a href="https://wiki.dev0.sh/books/homelab" class="icon fa-server"><span class="label">Server</span> Homelab</a>
<p><a href="https://wiki.dev0.sh/books/devrandom" class="icon fa-random"><span class="label">random</span> DevRandom</a>
</article>
<!-- files -->
<article id="files">
<h2 class="major">Files</h2>
<span class="image main"><img src="images/pic02.jpg" alt="" /></span>
<embed id="files" src="files" width="100%" height="700">
</article>
<!-- plex -->
<article id="plex">

Loading…
Cancel
Save