bashrc & zshrc: add alias peminfo (shows information on .pem file).

It seems that autoretab happened too.
This commit is contained in:
Mikaela Suomalainen 2014-06-05 16:36:20 +03:00
parent 404450c50d
commit 901f41a9b4
2 changed files with 45 additions and 39 deletions

47
bashrc
View File

@ -54,12 +54,12 @@ force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if which tput >&/dev/null && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
color_prompt=
fi
fi
@ -531,6 +531,9 @@ alias reset-matepanel="mate-panel --reset"
alias isodate='date "+%Y-%m-%d %H:%M:%S%z"'
alias isodateu='date -u "+%Y-%m-%d %H:%M:%S%z"'
# Show information on PEM file.
alias peminfo="openssl x509 -text -in"
# Allow custom aliases to be put in .aliases or .bash_aliases .
# .aliases
@ -555,28 +558,28 @@ function cmdpkg() { PACKAGE=$(dpkg -S $(which $1) | cut -d':' -f1); echo "[${PAC
# Down for everyone or just me? Copied from the ultimate bashrc http://goo.gl/qGK5j
function downforme() {
RED='\e[1;31m'
GREEN='\e[1;32m'
YELLOW='\e[1;33m'
NC='\e[0m'
if [ $# = 0 ]
then
echo -e "${YELLOW}usage:${NC} downforme website_url"
else
RED='\e[1;31m'
GREEN='\e[1;32m'
YELLOW='\e[1;33m'
NC='\e[0m'
if [ $# = 0 ]
then
echo -e "${YELLOW}usage:${NC} downforme website_url"
else
JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's just you"))
if [ ${#JUSTYOUARRAY} != 0 ]
then
echo -e "${RED}It's just you. \n${NC}$1 is up."
else
echo -e "${GREEN}It's not just you! \n${NC}$1 looks down from here."
fi
fi
if [ ${#JUSTYOUARRAY} != 0 ]
then
echo -e "${RED}It's just you. \n${NC}$1 is up."
else
echo -e "${GREEN}It's not just you! \n${NC}$1 looks down from here."
fi
fi
}
# Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j
function top10() {
# copyright 2007 - 2010 Christopher Bratusek
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
# copyright 2007 - 2010 Christopher Bratusek
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
}
# ex command. Copied from bashrc of bioterror ( http://ricecows.org/configs/bash/.bashrc ). Original comment below:

37
zshrc
View File

@ -500,6 +500,9 @@ alias reset-matepanel="mate-panel --reset"
alias isodate='date "+%Y-%m-%d %H:%M:%S%z"'
alias isodateu='date -u "+%Y-%m-%d %H:%M:%S%z"'
# Show information on PEM file.
alias peminfo="openssl x509 -text -in"
# .aliases
if [ -f ~/.aliases ]; then
source ~/.aliases
@ -522,28 +525,28 @@ function cmdpkg() { PACKAGE=$(dpkg -S $(which $1) | cut -d':' -f1); echo "[${PAC
# Down for everyone or just me? Copied from the ultimate bashrc http://goo.gl/qGK5j
function downforme() {
RED='\e[1;31m'
GREEN='\e[1;32m'
YELLOW='\e[1;33m'
NC='\e[0m'
if [ $# = 0 ]
then
echo -e "${YELLOW}usage:${NC} downforme website_url"
else
RED='\e[1;31m'
GREEN='\e[1;32m'
YELLOW='\e[1;33m'
NC='\e[0m'
if [ $# = 0 ]
then
echo -e "${YELLOW}usage:${NC} downforme website_url"
else
JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's just you"))
if [ ${#JUSTYOUARRAY} != 0 ]
then
echo -e "${RED}It's just you. \n${NC}$1 is up."
else
echo -e "${GREEN}It's not just you! \n${NC}$1 looks down from here."
fi
fi
if [ ${#JUSTYOUARRAY} != 0 ]
then
echo -e "${RED}It's just you. \n${NC}$1 is up."
else
echo -e "${GREEN}It's not just you! \n${NC}$1 looks down from here."
fi
fi
}
# Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j
function top10() {
# copyright 2007 - 2010 Christopher Bratusek
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
# copyright 2007 - 2010 Christopher Bratusek
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
}
# ex command. Copied from zshrc of bioterror ( http://ricecows.org/configs/zsh/.zshrc ). Original comment below: