Help files. Added the rest of bash it
diff --git a/functions/base.funtions.bash b/functions/base.funtions.bash
new file mode 100644
index 0000000..bbb6f2f
--- /dev/null
+++ b/functions/base.funtions.bash
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+function rh {
+ history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
+}
+
+function ips {
+ ifconfig | grep "inet " | awk '{ print $2 }'
+}
+
+
+# View man documentation in Preview
+pman () {
+ man -t "${1}" | open -f -a /Applications/Preview.app/
+}
+
+
+pcurl() {
+ curl "${1}" | open -f -a /Applications/Preview.app/
+}
+
+pri() {
+ ri -T "${1}" | open -f -a /Applications/Preview.app/
+}
+
+
+# disk usage per directory
+usage ()
+{
+ if [ $1 ]
+ then
+ du -hd $1
+ else
+ du -hd 1
+ fi
+}
\ No newline at end of file
diff --git a/functions/git.functions.bash b/functions/git.functions.bash
new file mode 100644
index 0000000..50f4459
--- /dev/null
+++ b/functions/git.functions.bash
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+function git_remote {
+ echo "Running: git remote add origin ${GIT_HOSTING}:$1.git"
+ git remote add origin $GIT_HOSTING:$1.git
+}
+
+function git_first_push {
+ echo "Running: git push origin master:refs/heads/master"
+ git push origin master:refs/heads/master
+}
+
+function git_remove_missing_files() {
+ git ls-files -d -z | xargs -0 git update-index --remove
+}
\ No newline at end of file
diff --git a/functions/javascript.functions.bash b/functions/javascript.functions.bash
new file mode 100644
index 0000000..f37859d
--- /dev/null
+++ b/functions/javascript.functions.bash
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function rails_jquery {
+ curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js
+}
+
+function jquery_install {
+ curl -o public/javascripts/jquery.js http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
+}
+
+function jquery_ui_install {
+ curl -o public/javascripts/jquery_ui.js http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js
+}
\ No newline at end of file
diff --git a/functions/nginx.functions.bash b/functions/nginx.functions.bash
new file mode 100644
index 0000000..7aa1653
--- /dev/null
+++ b/functions/nginx.functions.bash
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+function nginx_reload() {
+ FILE="${NGINX_PATH}/logs/nginx.pid"
+ if [ -e $FILE ]; then
+ echo "Reloading NGINX..."
+ PID=`cat $NGINX_PATH/logs/nginx.pid`
+ sudo kill -HUP $PID
+ else
+ echo "Nginx pid file not found"
+ return 0
+ fi
+}
+
+function nginx_stop() {
+ FILE="${NGINX_PATH}/logs/nginx.pid"
+ if [ -e $FILE ]; then
+ echo "Stopping NGINX..."
+ PID=`cat $NGINX_PATH/logs/nginx.pid`
+ sudo kill -INT $PID
+ else
+ echo "Nginx pid file not found"
+ return 0
+ fi
+}
+
+function nginx_start() {
+ FILE="${NGINX_PATH}/sbin/nginx"
+ if [ -e $FILE ]; then
+ echo "Starting NGINX..."
+ sudo $NGINX_PATH/sbin/nginx
+ else
+ echo "Couldn't start nginx"
+ fi
+}
+
+function nginx_restart() {
+ FILE="${NGINX_PATH}/logs/nginx.pid"
+ if [ -e $FILE ]; then
+ echo "Stopping NGINX..."
+ PID=`cat $NGINX_PATH/logs/nginx.pid`
+ sudo kill -INT $PID
+ sleep 1
+ echo "Starting NGINX..."
+ sudo $NGINX_PATH/sbin/nginx
+ else
+ echo "Nginx pid file not found"
+ return 0
+ fi
+}
\ No newline at end of file