git fetch origin
git reset --hard origin/master
git clean -f -d
# last commit
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
| 'use strict'; | |
| /** | |
| * Add before safe hook and validation to all custom models with an userId property to prevent changing userId | |
| * properties by non-admin users. | |
| */ | |
| const USER_ID_PROPERTY = 'userId'; | |
| const INVALID_USER_ID = -1; |
| // started from https://github.com/strongloop/loopback/issues/651 | |
| 'use strict'; | |
| let _ = require('lodash'); | |
| module.exports = function (Model, options) { | |
| if(Model && Model.sharedClass) { | |
| let enableFromACLs = options.enableFromACLs === false? false: true; |
| // based on https://github.com/strongloop/loopback/issues/651#issuecomment-259540469 | |
| 'use strict'; | |
| module.exports = function (Model, options) { | |
| if(Model && Model.sharedClass) { | |
| var methodsToExpose = options.expose || []; | |
| var methodsToHide = options.hide || []; |