Skip to content

Instantly share code, notes, and snippets.

@sicruse
sicruse / messages.hooks.js
Created May 15, 2017 22:41
Example use of feathers-sequelize object hydration
const hydrate = require('feathers-sequelize/hooks/hydrate');
function includePoster() {
return function (hook) {
const model = hook.app.service('users').Model;
const association = { include: [{ model: model, as: 'poster', attributes: ['userId', 'displayName', 'avatar'] }] };
switch (hook.type) {
case 'before':
hook.params.sequelize = Object.assign(association, { raw: false });
#!/bin/bash
############ Set up ############
sudo -v # ask for sudo upfront
############ Install XCode command line tools ############
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
PROD=$(softwareupdate -l |
grep "\*.*Command Line" |
head -n 1 | awk -F"*" '{print $2}' |
Font=Iconsolota for Powerline
FontHeight=14
ForegroundColour=131,148,150
BackgroundColour=0,43,54
CursorColour=220,50,47
Black=7,54,66
BoldBlack=0,43,54
Red=220,50,47
BoldRed=203,75,22
Green=133,153,0