Skip to content

Instantly share code, notes, and snippets.

@feedhenry-gists
feedhenry-gists / gist:1015222
Created June 8, 2011 19:51
Orientation Call
$fh.ori( {},
function(res){
alert( 'current roation=' + res);
},
function(code,errorprops,params) {...} );
@feedhenry-gists
feedhenry-gists / gist:1015214
Created June 8, 2011 19:49
Notification Call
$fh.notify();
$fh.send( {to:'[email protected]',subject:'Hi There',body:'The message.'} );
$fh.geo({interval: 0}, function(res){
$fh.map({target: '#map_div', lat:res.lat, lon:res.lon, zoom:9}, function(map){
console.log(map.map);
}, function(msg){
console.log(msg);
});
})
$fh.log( {message:'your log message'} );
@feedhenry-gists
feedhenry-gists / gist:1015194
Created June 8, 2011 19:41
Local Storage Call
$fh.data( {act:'save', key:'foo', val:'bar'} );
$fh.data( {key:'foo'}, function(res) {
alert( res.key+'='+res.val );
}
@feedhenry-gists
feedhenry-gists / gist:1015187
Created June 8, 2011 19:39
Geolocation Call
$fh.geo( {interval:5000}, function(res){
alert( 'lon='+res.lon+', lat='+res.lat+', alt='+res.alt+', at='+res.when);
} );
@feedhenry-gists
feedhenry-gists / gist:1015184
Created June 8, 2011 19:39
Geolocation Call
$fh.geo( {interval:5000}, function(res){
alert( 'lon='+res.lon+', lat='+res.lat+', alt='+res.alt+', at='+res.when);
} );
$fh.geoip( function(res) { alert(JSON.stringify(res.geoip)); });
@feedhenry-gists
feedhenry-gists / gist:1015172
Created June 8, 2011 19:34
Hashing Response
{
hashvalue:"<The hash value of the input text>"
}