Skip to content

Instantly share code, notes, and snippets.

View nivesh2's full-sized avatar
🎯
Focusing

Nivesh Singh nivesh2

🎯
Focusing
View GitHub Profile
@nivesh2
nivesh2 / ultimate-ut-cheat-sheet.md
Created June 29, 2018 08:53 — 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


@nivesh2
nivesh2 / data.csv
Created January 25, 2017 19:32 — forked from llSourcell/data.csv
index area bathrooms price sq_price
0 2104.0 3.0 399900.0 190.066539924
1 1600.0 3.0 329900.0 206.1875
2 2400.0 3.0 369000.0 153.75
3 1416.0 2.0 232000.0 163.84180791
4 3000.0 4.0 539900.0 179.966666667
5 1985.0 4.0 299900.0 151.083123426
6 1534.0 3.0 314900.0 205.280312907
7 1427.0 3.0 198999.0 139.452697968
8 1380.0 3.0 212000.0 153.623188406
@nivesh2
nivesh2 / better-nodejs-require-paths.md
Created April 7, 2016 05:24 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@nivesh2
nivesh2 / ElasticSearch.sh
Created March 1, 2016 08:42 — forked from ricardo-rossi/ElasticSearch.sh
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch