Skip to content

Instantly share code, notes, and snippets.

View inadarei's full-sized avatar

Irakli Nadareishvili inadarei

View GitHub Profile
@inadarei
inadarei / ultimate-ut-cheat-sheet.md
Created November 30, 2017 15:33 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@inadarei
inadarei / ipaddressclasses.md
Last active December 28, 2020 17:43
IP Address Classes, CIDRs and Network Masks

Network Classes

IP Addresses identify both a network as well as host on a network. Depending on the class of a network, certain amount of bits in the IP (32 bits overall) are allocated for network adressing and the rest is for: adressing the host on the network.

  1. Class A: first octet is network, last three: host
  2. Class B: first two octets are for network, last two: host
  3. Class C: first three octets are for network, only last octet is for host.

Furthermore, looking at the IP itself, you can tell which class of IP it is, using the following rules:

@mstade
mstade / view.md
Last active January 4, 2016 23:12
Some thoughts on application/view

Application views using HTTP trickery

If the client makes a request, let's say this is an initial request to a resource that the client knows nothing about. It goes along and does a little something like this:

GET /foo HTTP/1.1
Accept: text/html
@tj
tj / config.js
Last active December 27, 2015 14:49
/**
* Module dependencies.
*/
var pkg = require('../package');
var env = process.env.NODE_ENV || 'development';
/**
* Return setting `name`.
*