(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |
/** | |
Problem: | |
You have a javascript array that likely has some duplicate values and you would like a count of those values. | |
Solution: | |
Try this schnippet out. | |
*/ | |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
var animal = { | |
name: 'Karl', | |
type: 'cat', | |
color: 'black', | |
age: 7 | |
}; | |
//convert JSON animal into a string | |
var dehydratedAnimal = JSON.stringify(animal); |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
# fork from AVIT ZSH Theme | |
PROMPT=' | |
$(_user_host)${_current_dir}$(git_prompt_info) | |
$ ' | |
PROMPT2='%{$fg[grey]%}◀%{$reset_color%} ' | |
#RPROMPT='$(_vi_status)%{$(echotc UP 1)%}$(git_prompt_short_sha) $(_git_time_since_commit) ${_return_status} %T% %{$(echotc DO 1)%}' | |
RPROMPT='$(_vi_status)%{$(echotc UP 1)%}$(git_prompt_short_sha) ${_return_status} %T% %{$(echotc DO 1)%}' |
// | |
// Implementation using express-jwt middle | |
// | |
var express = require('express'), | |
ejwt = require('express-jwt'), | |
jwt = require('jsonwebtoken'), | |
passport = require('passport'), | |
bodyParser = require('body-parser'), | |
LocalStrategy = require('passport-local').Strategy, | |
BearerStrategy = require('passport-http-bearer').Strategy; |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {