Skip to content

Instantly share code, notes, and snippets.

Emad Ibrahim eibrahim

Block or report user

Report or block eibrahim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eibrahim
eibrahim / service.js
Created Oct 18, 2016
emberfire auth service
View service.js
import Ember from 'ember';
export
default Ember.Service.extend({
session: Ember.inject.service(),
store: Ember.inject.service(),
firebase: Ember.inject.service(),
firebaseApp: Ember.inject.service(),
View controllers.application.js
import Ember from 'ember';
var Person = Ember.Object.extend({
init() {
},
});
export default Ember.Controller.extend({
appName: 'Add Observer To Object',
init: function(){
console.log('init');
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
userProps: Ember.computed.collect('first', 'last', 'age'),
first: 'bart',
last: 'simpson',
age: 55
});
@eibrahim
eibrahim / router.js
Created Sep 13, 2016
router for taskorami
View router.js
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.resource('master', {path: '/'}, function() {
this.resource('projects', function() {
@eibrahim
eibrahim / bower.json
Created Sep 13, 2016
bower.json for taskorami
View bower.json
{
"name": "taskorami",
"dependencies": {
"ember": "1.11.1",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.0.0-beta.16.1",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
"ember-qunit": "0.3.1",
"ember-qunit-notifications": "0.0.7",
@eibrahim
eibrahim / package.json
Created Sep 13, 2016
package.json for taskorami
View package.json
{
"name": "taskorami",
"version": "0.0.0",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
@eibrahim
eibrahim / jobs-approve.js
Created Aug 17, 2016
Notify zapier with firebase changes
View jobs-approve.js
var firebase = require("firebase");
var request = require("request");
var db = require('./database');
var notifyZapierOfJobPost = function(snapshot){
var job = snapshot.val();
var key = snapshot.key;
var email = job.email;
@eibrahim
eibrahim / mailchimp-firebase.js
Created Jul 22, 2016
A node worker for firebase to add a user to mailchimp
View mailchimp-firebase.js
var mcapi = require('./node_modules/mailchimp-api/mailchimp');
var usersRef = db.ref('users');
var mc = new mcapi.Mailchimp('xxxxxxxxxx-api-key-us4');
usersRef.orderByChild('added_to_mailchimp').equalTo(null).on('child_added',function(snapshot){
var user = snapshot.val();
var key = snapshot.key;
if(user && user.email){
var listId = 'xxxx-list-id-xxxx';
var name = user.displayName || '';
@eibrahim
eibrahim / mailMananger.js
Created Jul 22, 2016
A node worker for firebase to send emails using mandrill
View mailMananger.js
var mandrill = require('mandrill-api/mandrill');
var mandrill_client = new mandrill.Mandrill('YOUR MANDARILL KEY');
var FROM_EMAIL = 'info@ourstandup.com';
var FROM_NAME = 'Our Standup';
var db = require('./database');
var invitationsRef = db.ref("invitations");
var teamsRef = db.ref("teams");
var usersRef = db.ref("users");
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
names: [{name:'joe'},{name:'emily'},{name:'david'},{name:'daniel'},{name:'mike'}],
sortBy: ['name'],
sortByDesc: ['name:desc'],
sortedNames: Ember.computed.sort('names','sortBy'),
sortedNamesDesc: Ember.computed.sort('names','sortByDesc')
});
You can’t perform that action at this time.