Skip to content

Instantly share code, notes, and snippets.

View moradgholi's full-sized avatar

Hossein Moradgholi moradgholi

View GitHub Profile
@moradgholi
moradgholi / gist:1c7659f179013e5582c5
Last active August 29, 2015 14:24
Speed test Laravel 5.1 vs Lumen for PHP League OAuth2.0
Enviornment : Homestead with 2 gigs of RAM
Model Name:	MacBook Pro
Model Identifier:	MacBookPro9,2
Processor Name:	Intel Core i5
Processor Speed:	2.5 GHz
Number of Processors:	1
Total Number of Cores:	2
L2 Cache (per Core):	256 KB
L3 Cache:	3 MB
@moradgholi
moradgholi / gist:b7398063a791657df3e4
Created February 15, 2015 08:26
Google Direction API in PHP
function getGoogleDirection($origin, $destination, $addDecodedPolyline = false){
$googleRoutingURL = "http://maps.googleapis.com/maps/api/directions/json?";
$data = [
'origin' => $origin,
'destination' => $destination,
'language' => 'fa',
'alternatives' => 'true'
];
@moradgholi
moradgholi / IntegerTextviewAnimator.java
Last active April 7, 2016 16:43
Animates an Integer in a Textview incrementally or decreamentaly using ObjectAnimator class.
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Property;
import android.widget.TextView;
/**