added html_doc.sh, more functions, ls aliases, and some more symlinks in install.sh

This commit is contained in:
Brendan McDevitt 2016-10-17 03:18:20 -05:00
parent 4663dbc490
commit 4644e789d4
4 changed files with 69 additions and 0 deletions

View file

@ -1,3 +1,4 @@
# aliases # aliases
alias ll='ls -lah' alias ll='ls -lah'
alias ls='ls --color=auto

View file

@ -90,6 +90,7 @@ swap_sum()
# Extra many types of compressed packages # Extra many types of compressed packages
# Credit: http://nparikh.org/notes/zshrc.txt # Credit: http://nparikh.org/notes/zshrc.txt
extract() extract()
{ {
if [ -f "$1" ]; then if [ -f "$1" ]; then
case "$1" in case "$1" in
@ -112,3 +113,51 @@ extract()
echo "'$1' is not a valid file to extract" echo "'$1' is not a valid file to extract"
fi fi
} }
#global_python()
#{
# export PATH=$PATH
#
#}
user_python()
{
[[ -d "$HOME/install/python" ]] && export PATH="$PATH:/install/python/bin"
}
add_underscore()
{
sed -e s'/ /_/g' #single line to rename from pipe
}
rot13()
{
if [ -r $1 ]; then cat $1 | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]'; else echo $* | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]'; fi
}
histupdate()
{
history -a; history -n
}
mostusedcmds()
{
history | awk '{ print $2}' | sort | uniq -c | sort -rn | head
}
on()
{
user="$1"
if who | grep "^$user " > /dev/null; then
echo "$user is logged in"
fi
}

16
bin/html_doc.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
cat << HTML_TEMPLATE
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>
</title>
</head>
<body>
some sample text
</body>
</html>
HTML_TEMPLATE

View file

@ -12,6 +12,9 @@ DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# symlink our dotfiles to our users home dir so they can make use of all the good stuff in it # symlink our dotfiles to our users home dir so they can make use of all the good stuff in it
ln -sfv "$DOTFILES_DIR/.bash_profile" ~ ln -sfv "$DOTFILES_DIR/.bash_profile" ~
ln -sfv "$DOTFILES_DIR/.bashrc" ~ ln -sfv "$DOTFILES_DIR/.bashrc" ~
ln -sfv "$DOTFILES_DIR/.bash_aliases" ~
ln -sfv "$DOTFILES_DIR/.bash_functions" ~
ln -sfv "$DOTFILES_DIR/.env" ~
# pkg managers # pkg managers
. "$DOTFILES_DIR/install/pip.sh" . "$DOTFILES_DIR/install/pip.sh"