These files are an accumulation of bash aliases, shortcuts and functions that i have collected over the years.
While these are Mac specific (for example, the LSCOLORS is different as compared to the GNU LS_COLORS), they can easily be ported for use on Linux.
Shortcuts for directories, programs, system processes and commands.
desk
go to Desktopdl
go to Downloadsproj
go to the folder where all projects are (variable)sites
go to the folder where all sites are (variable)
ydl
shortcut foryoutube-dl
gath
starts ssh-agent and loads SSH key (variable). used for Git purposes
emptytrash
Empty the Trash on all mounted volumes and the main HDDcleanup
Recursively delete .DS_Store fileschromekill
Kill all the tabs in Chrome to free up memoryafk
Lock the screen (when going AFK)reload
Reload the shell (i.e. invoke as a login shell)tree
Always list the tree command in color coding
ll
List all (-a) files and directories in a detailed (-l), human readable (-h), color coded (-G) way with a trailing slash (-F).lsd
Only list directories, including hidden ones
dang
repeat the last command with sudo, basicallysudo !!
equivalent
ducks
List top ten largest files/directories in current directoryds
Find the biggest in a folder
wotgobblemem
What's gobbling the memory?
flush
,flushdns
Flush DNS cachedig
Better and more to-the-point dig results
ip
,myip
Show Public IP addresslocalip
Show local IP
netlisteners
Show active network listeners
This file has ANSI color codes saved into human readable variables. The variable names and codes have been taken from here and have been kept the same for universal recognition.
.bash_colors
has variables with eight colors and their bold, underlined,
and background versions.
Six basic colors (blue, cyan, green, magenta, red, yellow) have been set in .bash_colors
for easy use.
You can use these anywhere in the terminal once the ~/.bash_colors
file has been sourced inside ~/.bash_profile
Wrap the code you want to color in the appropriate tags. There is an
opening tag in the format of $NAME
and a closing tag $COLORRESET
at
the end. For example
echo -e "\n${YELLOW}Current date :${COLORRESET} " ; date
will echo Current date :
in yellow color and then output date
in
default color on the next line.
There are four available types of colors: Regular, Bold, Underline, and Background.
BLACK='\033[0;30m' # Regular Black
BBLACK='\033[1;30m' # Bold Black
UBLACK='\033[4;30m' # Underline Black
ONBLACK='\033[40m' # Background Black
You can also use multiple color tags in one statement like so:
${GREEN} WordPress was sucessfully copied! Don't forget to edit ${BGREEN}wp-config.php ${GREEN}to add Database details ${COLORRESET}
PS1
- Prompt shows only current working directory\w
and\$
. Newline at both beginning and end makes differentiating command output easier
take()
create a dir and cd to it by taking a namefopen()
create a file and open it in Sublime Textextract()
Extract most know archives with one commandii()
display useful host related informatongetwebsite()
wget a whole websitespy()
identify and search for active network connectionssniff()
sniff GET and POST traffic over http v2bell()
Ring the system bell after finishing a script/compilejpost
Create new Jekyll posts
gplv3
Add a GPL license file to your projectgruntfile
Add gruntfile.js template file to the projectocmod()
Create an OCMOD script with template code. Provide a name for script as argument.vqmod()
Create a vQmod script with template code. Provide a name for script as argument.install()
Install popular software/frameworks with one command. Supports WordPress, Opencart and Bootstrap at the moment.jekylldo
build jekyll, run some grunts and deploy on Amazon S3jpost()
create a new Jekyll post in the pre-defined directory with YAML template. Takes-o
flag for opening files in Sublime Text after they are created.ocext()
create opencart module/extension skeletondash()
Initiate a Dash search from within Terminalbbkey()
Lets youadd
,load
,list
,try
andcheck
Bitbucket Key
- Take a look at Command Line Fu for some really cool commands