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 / 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 / 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 / testing_in_node.md
Last active December 15, 2021 21:45
[Node] Testing

Testing with Jest

npm i --save-dev jest

package.json

{
@ivankisyov
ivankisyov / regex.md
Created December 9, 2018 12:18
Regular Expressions
@ivankisyov
ivankisyov / tips-building-apis.md
Created December 9, 2018 12:32
Tips for building APIs
@ivankisyov
ivankisyov / functional_programming.md
Last active December 30, 2018 22:17
Functional Programming

Functional Programming

Pure Functions

  • a fn which uses only its arguments and/or local variables to compute its result
  • a fn which does not cause side effects

Todo: Function Composition

Higher Order Function

@ivankisyov
ivankisyov / typescript.md
Last active December 26, 2018 12:39
Typescript

Typescript

Installation

Global installation

npm i -g typescript
@ivankisyov
ivankisyov / constructor-functions-js.md
Last active December 25, 2018 16:06
Constructor Functions in JS

Constructor Functions in JS

If you have several objects that share the same implementation, you can use a constructor function to create them.

Any function can be a constructor function as long as it is invoked using the new keyword

function createSillyExample() {}

const objectCreatedFromSillyExample = new createSillyExample();
@ivankisyov
ivankisyov / autoboxing-js.md
Last active December 24, 2018 09:43
Autoboxing in JS

Autoboxing in JS

// calling String function like this
// will try to create a primitive value of type string from the argument which 
// is passed to the String function
String("chair") // the result is "chair"