Skip to content

Instantly share code, notes, and snippets.

View pmndifon's full-sized avatar
🎯
Focused on building great products.

Patrick M. Ndifon pmndifon

🎯
Focused on building great products.
View GitHub Profile
@pmndifon
pmndifon / nodejs-directory-structure.md
Created November 26, 2017 23:12 — forked from miguelmota/nodejs-directory-structure.md
Node.js MVC directory structure example.
Node.js MVC directory structure example.
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ controllers
β”‚   β”‚   β”œβ”€β”€ admin
β”‚   β”‚   β”‚   β”œβ”€β”€ posts.js
β”‚   β”‚   β”‚   └── users.js
β”‚   β”‚   β”œβ”€β”€ posts.js
β”‚ β”‚ β”œβ”€β”€ session.js
@pmndifon
pmndifon / http-status-codes.md
Created November 25, 2017 07:12 — forked from subfuzion/http-status-codes.md
General REST API HTTP Status Codes

Reference: RFC 2616 - HTTP Status Code Definitions

General

  • 400 BAD REQUEST: The request was invalid or cannot be otherwise served. An accompanying error message will explain further. For security reasons, requests without authentication are considered invalid and will yield this response.
  • 401 UNAUTHORIZED: The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource.
  • 403 FORBIDDEN: The request has been refused. See the accompanying message for the specific reason (most likely for exceeding rate limit).
  • 404 NOT FOUND: The URI requested is invalid or the resource requested does not exists.
  • 406 NOT ACCEPTABLE: The request specified an invalid format.
@pmndifon
pmndifon / mocha-guide-to-testing.js
Created November 21, 2017 06:39 — forked from samwize/mocha-guide-to-testing.js
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@pmndifon
pmndifon / README-Template.md
Last active November 16, 2017 05:40 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites