This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
#!/bin/bash | |
# Created on 7/17/13 by Ryan Sechrest | |
# Deploys pushed branch from the origin repository to the web directory | |
if [[ (-n $1) && (-n $2) && (-n $3) ]]; then | |
# Set path to project directory | |
project_path="/var/www/domains/$2/$3" |
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
<html> | |
<body> | |
<p>Here are Webber’s points:</p> | |
<ul> | |
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li> | |
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li> | |
<li>Use echo’s multiple parameters instead of string concatenation.</li> | |
<li>Set the maxvalue for your for-loops before and not in the loop.</li> | |
<li>Unset your variables to free memory, especially large arrays.</li> | |
<li>Avoid magic like __get, __set, __autoload</li> |