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 | |
// Get a permanent access token from the developers website https://developers.geoloqi.com/getting-started | |
$permanentToken = ''; | |
$timestamp = time(); | |
$latitude = 45.524; | |
$longitude = -122.6843; | |
$speed = 0; | |
$altitude = 0; |
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
require 'rbconfig' | |
module Engine | |
WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)! | |
class << self | |
def ruby? | |
!mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx") | |
end | |
def ruby_18? |
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('GoogleVoice.php'); | |
$gv = new GoogleVoice('your.username', 'yourpassword'); | |
try | |
{ | |
$gv->sendSMS('9995551212', 'This is your message'); | |
} | |
catch(Exception $e) |
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 | |
/** | |
* Convert minutes into a human-readable format. | |
* i.e. 60 minutes = 1 hour, 10080 minutes = 1 week | |
* | |
* Examples: | |
* 1530 minutes is 1 day, 1 hour, 30 minutes | |
* minutesToText(1530, array('rounded'=>0)) = 1 day | |
* minutesToText(1530, array('rounded'=>1)) = 1.1 days | |
* minutesToText(1530, array('units'=>1)) = 1 day |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var last = {lat: 45.5, lng: -122.6}; |