This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls . # files in current directory | |
ls .. # files in parent directory | |
tree > log.txt # put the results of a command in a file (You must have tree installed. It's available via macports <sudo port install tree>) | |
ls >> log.txt # append the results of a command in a file | |
mkdir -p one/two/ # create multiple directories in one step | |
env # print out environment variables in name value pair | |
Control + a # go to the beginning line | |
Control + e # go to the end line | |
Control + k # delete all to the right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UTILS | |
alias tc='top -o cpu' # check cpu usage | |
alias tm='top -o vsize' # check memory usage | |
alias dud="du -d 1 -h" # disk usage | |
alias c="clear" # clear interface | |
alias dc="rm -rf" # remove folder with content in it | |
alias h="history" # review log of commands | |
alias tgzu="tar -xzvf" # uzip tar gzip file | |
alias dl="wget -N" # download file and overwrite if required | |
alias dlc="curl -O" # download file and overwrite if required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ENV Variables | |
export PATH=/opt/local/bin:/opt/local/sbin:$PATH:~/bin | |
export USER_NAME=`whoami` | |
export IP="YOUR_IP_ADDRESS" | |
export PORT="YOUR_PORT_NUMBER" | |
export USER="YOUR_USER_NAME" | |
export DEVPATH=~/Documents/Projects/yourprojectname | |
export SVN_REPO_PATH=~/Documents/svn | |
export GIT_REPO_PATH=~/Documents/git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Documentation on Colors from http://wiki.archlinux.org/index.php/Color_Bash_Prompt | |
#Prompt Elements: | |
#\u -Username | |
#\w -Current Directory | |
#\d -Date | |
#\D -{fmt} Date as sprintf | |
#\h -Subdomain | |
#\H -Full Host name | |
#\n -new line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "<html><head><title>VIRTUAL HOST TEST</title></head><body><h1>VIRTUAL HOST CONFIGURED!</h1></body></html>" > /vhosts/domains/YOURDOMAIN.com/public/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# domain: YOURDOMAIN.com | |
# public: /vhosts/domains/YOURDOMAIN.com/public | |
<VirtualHost YOURIP:80> | |
# Admin email, Server Name (domain name) and any aliases | |
ServerAdmin [email protected] | |
ServerName YOURDOMAIN.com | |
ServerAlias www.YOURDOMAIN.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml text/css application/x-javascript text/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .htaccess | |
# To be stored in a web directory in which you wish to password protect from the public. | |
# This simple script refers to an .htpasswd file that should be stored outside of the public html folder of your domain. | |
# Be sure to update the path to the AuthUserFile, the root path of your webserver will differ based on your host. | |
Options +Indexes | |
AuthUserFile /{YOUR_HOME_DIRECTORY}/{YOUR_PATH}/{YOUR_SECURE_PATH}/.htpasswd | |
AuthType Basic | |
AuthName "Login Required:" | |
Require valid-user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options -Indexes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options +Indexes |