#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| <?php | |
| function bubble_sort($array) | |
| { | |
| $start = microtime(true); | |
| do | |
| { | |
| $sw = false; | |
| for($i = 0, $size = count($array) - 1; $i < $size; $i++) | |
| { | |
| if( $array[$i] > $array[$i + 1] ) |
| # .bash_profile | |
| # Get the aliases and functions | |
| if [ -f ~/.bashrc ]; then | |
| . ~/.bashrc | |
| fi | |
| # User specific environment and startup programs |
| -- Haversine Formula based geodistance in miles (constant is diameter of Earth in miles) | |
| -- Based on a similar PostgreSQL function found here: https://gist.github.com/831833 | |
| -- Updated to use distance formulas found here: http://www.codecodex.com/wiki/Calculate_distance_between_two_points_on_a_globe | |
| CREATE OR REPLACE FUNCTION public.geodistance(alat double precision, alng double precision, blat double precision, blng double precision) | |
| RETURNS double precision AS | |
| $BODY$ | |
| SELECT asin( | |
| sqrt( | |
| sin(radians($3-$1)/2)^2 + | |
| sin(radians($4-$2)/2)^2 * |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync