Skip to content

Instantly share code, notes, and snippets.

View sararob's full-sized avatar

Sara Robinson sararob

  • Firebase
  • San Francisco, CA
View GitHub Profile
@sararob
sararob / hn-api-examples.md
Last active August 29, 2015 14:07
Apps & integrations built with the official HN API

Integrations

Apps

Angular

@sararob
sararob / app.js
Created September 28, 2014 21:07
Example of implementing a hasMany / belongsTo relationship in EmberFire
var App = Ember.Application.create({});
var Promise = Ember.RSVP.Promise;
// ADAPTER
App.ApplicationAdapter = DS.FirebaseAdapter.extend({
firebase: new Firebase("https://<your-firebase-name>.firebaseio.com/")
});
@sararob
sararob / data-structure.js
Last active April 26, 2022 22:21
Role-based security in Firebase
/*
This example shows how you can use your data structure as a basis for
your Firebase security rules to implement role-based security. We store
each user by their Twitter uid, and use the following simplistic approach
for user roles:
0 - GUEST
10 - USER
20 - MODERATOR