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
<h1>feed</h1> | |
<p> | |
Publishing to the stream is easy, as all the fields are optional. Just specify | |
what you need, and leave the rest out. | |
</p> | |
<script> | |
var publish = { | |
method: 'send', | |
to: [120803038, 100002268364410], // comma separated friend ids |
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 | |
// GENERATE TABLE FROM FIRST LINE OF CSV FILE | |
$inputFile = 'csv/sample.csv'; // path to CSV file | |
$tableName = 'csv'; // table name | |
$fh = fopen($inputFile, 'r'); | |
$contents = fread($fh, 5120); // 5KB | |
fclose($fh); |
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 | |
send_push($_REQUEST['alert'], $_REQUEST['appkey'], $_REQUEST['appmaster']); | |
function send_push($alert, $appkey, $appmaster) { | |
$badge = 1; // default is 1 | |
$auth = $appkey . ":" . $appmaster; | |
$url = "https://go.urbanairship.com/api/push/broadcast/"; |
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
class Controller_Home extends Controller { | |
protected $args; // store GET/POST variables | |
public function before() { | |
parent::before(); | |
// if a GET request | |
if( $this->request->method() == "GET" ) { | |
$this->args = $this->request->query(); |
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
args.batch.push({ | |
method : "GET", | |
name : "get-users", | |
relative_url : "/"+app.id+"/accounts/test-users", | |
omit_response_on_success : false | |
}); | |
args.batch.push({ | |
method : "GET", | |
relative_url : "?ids={result=get-users:$.data.*.id}" |
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
#!/usr/bin/env python | |
''' | |
Change Facebook test users password | |
''' | |
import urllib, urllib2, json | |
# makes a batch call to facebook | |
# access_token : facebook access token |
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
public function before(){ | |
parent::before(); | |
// this block provides header information for facebook send message popup | |
if( preg_match('/facebook/', $_SERVER['HTTP_USER_AGENT'])) { | |
$facebook_config = kohana::$config->load('facebook'); | |
$share = $facebook_config['share'][$this->lang]; | |
$item_id = $this->request->query('id'); | |
$media = ORM::factory('Media', $item_id)->as_array(); |
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 | |
ini_set('precision', 20); | |
?> | |
<!-- Decreased Latency --> | |
<!-- Increased parallelism --> | |
<!-- Better caching --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> | |
<script src="js/mustache.js" type="text/javascript"></script><!-- --> | |
<script> |
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
/** | |
* API prototype class. Uses strict ECMA convention. | |
* This class requires jQuery. | |
* | |
* @category Prototype | |
* @author Muntasir Mohiuddin | |
*/ | |
var API; |