Skip to content

Instantly share code, notes, and snippets.

View ivankisyov's full-sized avatar
🤓
Console Logger, Level 4

Ivanman ivankisyov

🤓
Console Logger, Level 4
View GitHub Profile
@ivankisyov
ivankisyov / usefulSnippets.md
Last active December 1, 2018 10:55
[JS] Useful Snippets

[JS] Useful functons and snippets

Find average product price

const products = [
  {
    id: "id1",
    year: 2017
 },
@ivankisyov
ivankisyov / mongo.md
Last active October 14, 2018 16:48
MongoDB with Mongoose

MongoDB with Mongoose

Local setup

Windows < 10

  1. Copy the path of: {...Program Files\MongoDB\Server\3.6\bin}
  2. Advanced System settings
  3. Environment variables
@ivankisyov
ivankisyov / git.md
Last active October 17, 2018 07:32
Git

Git

Configuration

.gitconfig

[alias]

st = status
lg = log --oneline --all --decorate --graph
@ivankisyov
ivankisyov / npm.md
Last active February 3, 2019 10:56
NPM

NPM

Commands

List all globally installed packages

npm list -g --depth 0

List all outdated globally installed packages

@ivankisyov
ivankisyov / node.md
Last active December 8, 2018 12:52
Node.js
@ivankisyov
ivankisyov / express.md
Last active October 12, 2018 06:51
Express

Express [Node.js]

Handling errors

// 404
app.use((req, res, next) => {
  let error = new Error("Route not found!");
  error.status = 404;
  next(error);