This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$home_base_array = array(); | |
$home_base_array[''] = '--select--'; | |
$home_base_array[$this->config->item('site_name')] = $this->config->item('site_name')); | |
foreach($this->config->item('social_connections') as $connection) | |
$home_base_array[$connection] = $connection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Common minimal format for sending just lat/long data | |
[ | |
{ | |
uuid: "550e8400-e29b-41d4-a716-446655440000", | |
date: "2010-04-30T16:50:00Z", | |
location: { | |
position: { | |
latitude: 45.5118, | |
longitude: -122.6433 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
uuid: "550e8400-e29b-41d4-a716-446655440000", | |
date: "2010-04-30T16:50:00Z", | |
location: { | |
position: { | |
geojson: { | |
type: "Point", | |
coordinates: [-122.643, 45.512] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT `id`, `description`, `radius`, | |
( 3959 * ACOS( COS( RADIANS(?) ) * COS( RADIANS( `lat` ) ) * COS( RADIANS( `lng` ) - RADIANS(?) ) + SIN( RADIANS(?) ) * SIN( RADIANS( `lat` ) ) ) ) AS `distance` | |
FROM `gps_places` | |
WHERE `startDate` <= NOW() AND `endDate` >= NOW() | |
HAVING `distance` <= `radius` | |
ORDER BY `distance` | |
LIMIT 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
highlight_file(__FILE__); | |
echo '<hr />'; | |
class A | |
{ | |
protected $_x = 100; | |
public static function getX() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client = array('client_id' => 'geoloqi_web', 'client_secret' => '1234'); | |
$post = array( | |
'grant_type' => 'password', | |
'username' => 'aaronpk', | |
'password' => '1234' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
echo "\n\n\n============\n" . date('Y-m-d H:i:s') . ' ' . $_SERVER['REMOTE_ADDR'] . "\n"; | |
print_r($_GET); | |
print_r($_POST); | |
print_r($_SESSION); | |
print_r(apache_request_headers()); | |
$input = json_decode(file_get_contents("php://input")); | |
print_r($input); | |
echo "\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('include.php'); | |
session_start(); | |
$voice = 'allison'; | |
$jsonInput = file_get_contents("php://input"); | |
$input = json_decode($jsonInput); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('autoloader.php'); | |
include('OAuth.php'); | |
$googleOAuthConsumerKey = 'aaron.pk'; | |
$googleOAuthConsumerSecret = 'XXXXXXXXXXXXXXXXXXXX'; | |
$oAuthAccessTokenSecret = 'XXXXXXXXXXXXXXXXXXXXXXX'; | |
$oAuthAccessToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from icalendar import Calendar, Event | |
import simplejson as json | |
import re | |
import web | |
from mimerender import mimerender | |
import sys | |
event = {} | |
urls = ( | |
'https://api.geoloqi.com/1/place/create', 'place' |
OlderNewer