I hereby claim:
- I am colinhoernig on github.
- I am colinhoernig (https://keybase.io/colinhoernig) on keybase.
- I have a public key ASD9ybTaUsj5yS_BY7x2HGdBHX4oLhILuWwRyZ4y_7SvZgo
To claim this, I am signing this object:
| // the main app file | |
| import express from "express"; | |
| import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
| import authenticate from "./authentication"; // middleware for doing authentication | |
| import permit from "./permission"; // middleware for checking if user's role is permitted to make request | |
| const app = express(), | |
| api = express.Router(); | |
| // first middleware will setup db connection |
I hereby claim:
To claim this, I am signing this object:
| # stop all graylog2 services | |
| service graylog2-web stop; service graylog2 stop; service elasticsearch stop; service mongod stop; | |
| # start all graylog2 services again | |
| service elasticsearch start; service mongod start; sleep 5; service graylog2 start; service graylog2-web start; |
| import Ember from 'ember'; | |
| import Session from 'simple-auth/session'; | |
| var sessionWithUser = Session.extend({ | |
| user: function() { | |
| var userId = this.get('user_id'); | |
| if (!Ember.isEmpty(userId)) { | |
| return this.container.lookup('store:main').find('user', userId); | |
| } | |
| }.property('user_id') |
| <?php | |
| namespace MusicDealers\Serializers; | |
| use League\Fractal\Serializer\JsonApiSerializer; | |
| class EmberSerializer extends JsonApiSerializer { | |
| /** | |
| * Serialize an item resource | |
| * |
| #!/bin/bash | |
| git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short) %(committerdate) %(authorname)' |
| #!/bin/sh | |
| # Source http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac | |
| # Worth looking at for dotfile stuff: http://dotfiles.github.io/ | |
| # Check for Homebrew, | |
| # Install if we don't have it | |
| if test ! $(which brew); then | |
| echo "Installing homebrew..." | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| fi |
| import Ember from 'ember'; | |
| import Session from 'simple-auth/session'; | |
| var SessionWithUser = Session.extend({ | |
| user: function () { | |
| var userId = this.get('user_id'); | |
| if (!Ember.isEmpty(userId)) { | |
| return this.container.lookup('store:main').find('user', userId); | |
| } | |
| }.property('user_id') |