Skip to content

Instantly share code, notes, and snippets.

View blaine's full-sized avatar

Blaine Cook blaine

View GitHub Profile
$args = array();
$select = "SELECT i.* , f.* ";
$from = "FROM $FOF_FEED_TABLE f, $FOF_ITEM_TABLE i, $FOF_SUBSCRIPTION_TABLE s ";
$where = sprintf("WHERE s.user_id = %d AND s.feed_id = f.feed_id AND f.feed_id = i.feed_id ", $user_id);
if(!is_null($feed) && $feed != "")
{
$where .= sprintf("AND f.feed_id = %d ", $feed);
}
// Returns a single promise that emits success or error when the given promises
// are complete.
//
// var promises = require('promise-group')
// promises.group(promise1, promise2).addCallback(...)
//
exports.group = function() {
return new PromiseGroup(Array.prototype.slice.call(arguments)).promise;
}
<?xml version=’1.0′ encoding=’UTF-8′?>
<XRD xmlns=’http://docs.oasis-open.org/ns/xri/xrd-1.0′>
<Host xmlns=’http://host-meta.net/xrd/1.0′>hosted-by-google.com</Host>
<Link>
<Title>Resource Descriptor</Title>
<Rel>host-meta</Rel>
<URITemplate>http://xrd.google.com/{%uri}</URITemplate>
</Link>
</XRD>
<?xml version=’1.0′ encoding=’UTF-8′?>
<XRD xmlns=’http://docs.oasis-open.org/ns/xri/xrd-1.0′>
<Host xmlns=’http://host-meta.net/xrd/1.0′>example.com</Host>
<Link>
<Title>Resource Descriptor</Title>
<Rel>describedby</Rel>
<URITemplate>http://example.com/api?uri={%uri}</URITemplate>
</Link>
<Link>
<Title>Resource Descriptor</Title>
<?xml version=’1.0′ encoding=’UTF-8′?>
<XRD xmlns=’http://docs.oasis-open.org/ns/xri/xrd-1.0′>
<Subject>acct:joe@example.com</Subject>
<Alias>http://example.com/profiles/joe</Alias>
<Link>
<Rel>http://portablecontacts.net/spec/1.0</Rel>
<Rel>describedby</Rel>
<URI>http://example.com/api/people/</URI>
</Link>
<Link>