Skip to content

Instantly share code, notes, and snippets.

@KellyRice
KellyRice / BostonStartupMap.html
Created March 6, 2013 19:02
Boston Startup Map
<div style="width:600px;background-color:#fff;padding:10px 20px 20px;font:14px/21px HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, sans-serif;">
<h3 style="color:#da5024;clear:both;">See the complete Boston Startup Map</h3>
<a href="http://www.kinvey.com/blog/2455/the-boston-startup-map-visualizing-the-citys-tech-scene"><img alt="Kinvey Backend as a Service" src="http://www.kinvey.com/blog/images/2013/03/bostonstartupmap.png?w=600" width="600" /></a>
<div style="width:100%;text-align:center;margin-top:5px;">From: <a style="text-decoration:none;color:#da5024;" href="http://www.kinvey.com/blog/2455/the-boston-startup-map-visualizing-the-citys-tech-scene">Kinvey Backend as a Service</a>;</div>
</div>
@KellyRice
KellyRice / iOS Embed Code.html
Last active December 14, 2015 07:29
iOS Embed
<div style="width:600px;background-color:#fff;padding:10px 20px 20px;font:14px/21px HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, sans-serif;">
<h3 style="color:#da5024;clear:both;">See the complete iOS Version History</h3>
<a href="http://www.kinvey.com/blog/2429/ios-version-history-a-visual-timeline"><img alt="Kinvey Backend as a Service" src="http://www.kinvey.com//blog/images/2013/02/ios-version-history-a-visual-timeline.jpg?w=600" width="600" /></a>
<div style="width:100%;text-align:center;margin-top:5px;">From: <a style="text-decoration:none;color:#da5024;" href="http://www.kinvey.com/blog/2429/ios-version-history-a-visual-timeline">Kinvey Backend as a Service</a></div>
</div>
@KellyRice
KellyRice / Kinvey-rest-relations
Created September 14, 2012 15:03
Kinvey REST Relations
GET /appdata/:appKey/:collectionName/:id?resolve_depth=2&retainReferences=false HTTP/1.1
Host: baas.kinvey.com
Authorization: [user credentials]
HTTP/1.1 200 OK
Content-Type: application/json
{
"_id": "HPBook6",
"title": "Harry Potter and the Half-Blood Prince",
@KellyRice
KellyRice / Kinvey-load-author-entity
Created September 14, 2012 15:00
Kinvey Load Related Entities
var book = new Kinvey.Entity({}, 'books');
book.load('my-book-id', {
resolve: ['author'],
success: function(book) {
// book is the book entity instance.
// book.get('author') is the author entity instance.
},
error: function() {
// An error occurred.
}
@KellyRice
KellyRice / Kinvey-Save-Entity
Created September 14, 2012 14:58
Kinvey Save Related Entities
// Create an author and book entity.
var author = new Kinvey.Entity({ name: 'Joanne Rowling' }, 'authors');
var book = new Kinvey.Entity({ title: 'Harry Potter and the half-blood Prince', author: author }, 'books');
// Save both.
book.save({
success: function(book) {
// book is the book entity instance.
// book.get('author') is the author entity instance.
},
@KellyRice
KellyRice / kinvey_login_with_facebook
Created August 30, 2012 19:22
kinvey_login_with_facebook
NSString* accessToken = [FBSession activeSession].accessToken;
[KCSUser loginWithFacebookAccessToken:accessToken withCompletionBlock:^(KCSUser *user, NSError *errorOrNil, KCSUserActionResult result) {
if (errorOrNil) {
//handle error
}
}];
class Todos extends KinveyCollection
url: ->
url = "http://test.kinvey.com/appdata/#{kinvey_app_key}/todos"
// if there is a filter string
if @filterString
// build the regex query - queries are JSON objects
query = JSON.stringify( content: { $regex: @filterString } )
// make sure we URI encode the query!
url += "?query=#{encodeURIComponent( query )}"
// Return the final result
class TodoList extends KinveyCollection
url: "http://test.kinvey.com/appdata/#{kinvey_app_key}/todos"
class Todo extends Backbone.Model
class TodoList extends Backbone.Collection
url: "http://test.kinvey.com/appdata/APPKEY/todos"