// User.js
module.exports = {
connection: 'ourMySQL',
attributes: {
email: 'string',
wishlist: {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"generators": { | |
"modules": { | |
"gruntfile": "sails-generate-gruntfile-federated", | |
"frontend": "sails-generate-frontend-angular" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# So there's stuff on the `v0.10` branch you want to show up on `master`. | |
# First, get everything up to date locally: | |
git checkout master | |
git pull origin master | |
git checkout v0.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#so if you publish to the beta tag and it sets it as the latest you can do: | |
npm tag waterline@0.9.11 latest | |
#and it fixes it I just found out |
so you'd do something like:
var isAllowedTo = require('../api/policies/isAllowedTo');
module.exports = {
UserController: {
create: isAllowedTo('createUser')
}
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exciting globals!!! | |
var getIsACommandKeyDown = function () { | |
return IS_RIGHT_COMMAND_KEY_PRESSED || IS_LEFT_COMMAND_KEY_PRESSED; | |
}; | |
var IS_LEFT_COMMAND_KEY_PRESSED; | |
var IS_RIGHT_COMMAND_KEY_PRESSED; | |
$(window).keydown(function (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Count all records | |
(function (){async.each(Object.keys(sails.models), function(mi, n) { var m = sails.models[mi]; m.count({}).exec(function(err, c) { if (err) return n(err); console.log('there are ' + c + ' ' + m.identity + ' records.'); }) }, console.log)})() | |
// Expanded version, for reference | |
//async.each(Object.keys(sails.models), function(mi, n) { | |
// var m = sails.models[mi]; | |
// m.count({}).exec(function(err, c) { | |
// if (err) return n(err); | |
// console.log('there are ' + c + ' ' + m.identity + ' records.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for posterity | |
==> Pouring mysql-5.6.17_1.mavericks.bottle.tar.gz | |
==> Caveats | |
A "/etc/my.cnf" from another install may interfere with a Homebrew-built | |
server starting up correctly. | |
To connect: | |
mysql -uroot |
OlderNewer