Skip to content

Instantly share code, notes, and snippets.

View iqbalmalik89's full-sized avatar

Muhammad Iqbal iqbalmalik89

  • Karachi, Pakistan
View GitHub Profile
Route::get('/', function()
{
Event::listen('test', function($user)
{
$date = '2014-07-09 15:58:17';
$user = new User();
$user->username = 'admin';
$user->password = 'password';
<?php
function convertTime($date, $convert_from, $convert_to)
{
$current_time_zone = $date;
if(!empty($date))
{
if(!empty($convert_to))
{
$dt_obj = new \DateTime($date." ".$convert_from);
class A
{
function __construct(B $b)
{
}
}
class B
<?php
require 'vendor/autoload.php';
$app = new \Slim\Slim(array(
'debug' => true
));
$app->add(new Category());
// Add Category
test
s
s
sd
s
d
s
{
"Response": {
"MetaInfo": {
"Timestamp": "2015-04-27T18:05:45.856Z",
"AdditionalData": [
{
"value": "2015-04-27T18:05:00.040+0000",
"key": "CurrentTrafficLastUpdate"
},
{
@iqbalmalik89
iqbalmalik89 / navizon.php
Last active September 15, 2015 16:28
Navizon Floor POST
I am using guzzle package to send api requests. I am passing kml and image and http urls hosted on s3.
public function postFloor($siteId, $levelId, $name, $desc, $kml, $image)
{
$result = $this->request('http://its.navizon.com/api/v1/sites/'.$siteId.'/floorplans/', 'POST',
array(
'levelId' => $levelId,
'name' => $name,
'desc' => $desc,
'kml' => $kml,
{
current_server_time: 1443289612,
device_status: {
battery: -23,
device_events: {
moving: 1443279100
},
fw_version: "0.1",
received_at: 1443289375,
type_of_device: "wifi,gsm,gps"
<VirtualHost tauriel.local:80>
ServerName tauriel.local
DocumentRoot "/Applications/xampp/htdocs/tauriel/public"
<Directory "/Applications/xampp/htdocs/tauriel/public">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
APP_ENV=local
APP_DEBUG=true
APP_KEY=aXe6eF4kJy4reKVB9c6dRu2MVJM9kTeN
DB_HOST=localhost
DB_DATABASE=carpool
DB_USERNAME=root
DB_PASSWORD=
CACHE_DRIVER=file