Skip to content

Instantly share code, notes, and snippets.


  • FL
Block or report user

Report or block calmdev

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
calmdev / headless-cms-archive.json
Created Sep 3, 2018
View headless-cms-archive.json
View pedantically_commented_playbook.yml
# ^^^ YAML documents must begin with the document separator "---"
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.

#Node - Running in Production This gist is based on the excellent post by @hacksparrow which is found at The main principle is that you want the application to detect that it is running on a production server and to use the production configuration. The way to do this is to set the NODE_ENV=production. To do this you need to do the following:

$ export NODE_ENV=production

But we have a little problem here. The NODE_ENV environment variable will be lost if the server restarts, so it is safer to put it in the .bash_profile file. That way the variable will set again every time the system reboots. You will find the file in your home directory. It's a hidden file, so you can't see it unless you do a ls -la. We will append the export command to the .bash_profile file.

View validation.js
// This validation check works:
user.validate().success(function() {{
}).error(function(errors) {
// Still trying to get this isUnique validation method working on my model:
View user.js
sequelize.define('User', {
id: DataTypes.INTEGER,
email: {
type: DataTypes.STRING,
validate: {
isEmail: {
msg: 'Invalid email address.'
You can’t perform that action at this time.