Skip to content

Instantly share code, notes, and snippets.

View ayonliu's full-sized avatar

Lyon Liu ayonliu

View GitHub Profile
@ayonliu
ayonliu / HessianClient.php
Created June 12, 2014 10:19
How to use HessianPHP
<?php
include 'src/HessianClient.php';
$fp = fopen(dirname(__FILE__).'/unit_tests/ok.png', "r");
$options = new HessianOptions();
$options->version = 2;
$options->transport = "http";
// hessian server address
@ayonliu
ayonliu / global.php
Last active August 29, 2015 14:02
Register The Laravel Class Loader without Composer updating.
<?php
/*
| path: app/start/global.php
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
@ayonliu
ayonliu / geodistance.php
Created June 9, 2014 09:49
Calculate distance between two locations
<?php
/*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
/*:: :*/
/*:: This routine calculates the distance between two points (given the :*/
/*:: latitude/longitude of those points). It is being used to calculate :*/
/*:: the distance between two locations using GeoDataSource(TM) Products :*/
/*:: :*/
/*:: Definitions: :*/
/*:: South latitudes are negative, east longitudes are positive :*/