Using Mongoose pre middleware to systematically hash a User's password
const myuser = new User({
email: '[email protected]',
password: 'blacky123'
})
myuser.save()
.then(jdoe => {| .alert.lecture:before {content:"hello ";} |
| /* BonBon Buttons 1.1 by simurai.com | |
| 1.1 Added unprefixed attributes, :focus style, <button> support | |
| 1.0 Released | |
| Usage: | |
| Default button: <a href="" class="button">Label</a> |
Using Mongoose pre middleware to systematically hash a User's password
const myuser = new User({
email: '[email protected]',
password: 'blacky123'
})
myuser.save()
.then(jdoe => {| HTTP Verb | Path | Controller#Action | Used for |
|---|---|---|---|
GET |
/photos |
photos#index |
display a list of all photos |
PUT |
/photos/:id/valid OR /photos/valid |
photos#validate |
tell whether the passed data are valid (204 or 422) |
HEAD |
/photos/:id OR /photos?people=Sam |
photos#exist |
tell whether that photo exists (204 or 404) |
GET |
/photos/new |
photos#new |
return an HTML form for creating a new photo |
POST |
/photos |
photos#create |
create a new photo |
| struct A { | |
| a : i32, | |
| } | |
| impl A { | |
| fn bind_lifetime_mut(&mut self) -> &i32 { | |
| return &self.a; | |
| } | |
| fn legal(&mut self) -> &i32 { |
abernier :git checkout -b abernier --track origin/develop
git pull origin abernier.env a partir du template .env-distcp .env-dist .envpaste the following command ☝️😲WITHOUT EXECUTING IT:pbpaste | npx https://gist.github.com/abernier/00ac26ff978aebdfa6f3f65019fe2bf0 10 | pbcopy
10 being the number of combinations wantedcopy rows of names:
ENTER to execute the pasted command at step 0.:
Paste the result into spreadsheet
| const express = require('express') | |
| const app = express() | |
| const port = 3000 | |
| app.get('/', (req, res) => res.send('Hello World!')) | |
| app.get('/login', (req, res) => res.send('Merci de te logguer')) | |
| app.get('/signup', (req, res) => res.send('Merci de créer ton compte')) | |
| app.listen(port, () => console.log(`Example app listening on port ${port}!`)) |