Skip to content

Instantly share code, notes, and snippets.

View nishant8BITS's full-sized avatar
🎯
Focusing

Nishant Kumar nishant8BITS

🎯
Focusing
View GitHub Profile
@nishant8BITS
nishant8BITS / frontendDevlopmentBookmarks.md
Created September 21, 2017 10:04 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@nishant8BITS
nishant8BITS / kebabCase.js
Created August 29, 2017 06:27 — forked from tdukart/kebabCase.js
JavaScript Kebab Case function
function kebabCase(string) {
var result = string;
// Convert camelCase capitals to kebab-case.
result = result.replace(/([a-z][A-Z])/g, function(match) {
return match.substr(0, 1) + '-' + match.substr(1, 1).toLowerCase();
});
// Convert non-camelCase capitals to lowercase.
result = result.toLowerCase();
1. This is my Stream One assessment Project
Should be: Stream 1 Project
Synopsis of your project –
200-300 words a brief description about your project. More in the form of Story which highlight About project idea, set of features.
-> What Functionality it has as of now (Please mentioned that in bullet points)
@nishant8BITS
nishant8BITS / rabbitmq.txt
Created August 11, 2017 03:21 — forked from sdieunidou/rabbitmq.txt
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
"/etc" is used for configurations (.conf files etc). here you find all the configs and settings for your system.
"/usr" is used for "user programs". Usually your package manager installs all the binaries, shared files etc. from all programs here (except config files, which go to /etc). You can check /usr/bin for binaries, /usr/share for shared files (media, etc), /usr/share/doc for documentation,...
There is also an "/opt" folder, where there are "other" programs usually put (mostly binary programs, or programs installed from other sources (not the default package manager). Some programs like that (usually compiled) also go to "/usr/local"
"/var" is usually used for log files, 'temporary' files (like mail spool, printer spool, etc), databases, and all other data not tied to a specific user. Logs are usually in "/var/log", databases in "/var/lib" (mysql - "/var/lib/mysql"), etc.
/*
Tips 1 - Revert/Reset Specific File into git
*/
git checkout HEAD filepath/filename
/*
Tips -2 - Reset all your changes to your last commit locally
*/
git reset --hard HEAD

Broken Promises

Technical Decision

Eliminate all promises from application.

TL;DR

The Promise API is the source of many confusing errors in our application, using node style callbacks eliminates the issue without reducing code quality.

@nishant8BITS
nishant8BITS / promises-faq.md
Created May 28, 2017 04:16 — forked from vasanthk/promises-faq.md
The Promises FAQ - addressing the most common questions and misconceptions about Promises.
@nishant8BITS
nishant8BITS / Nishant_Kumar_Resume.js
Last active May 5, 2017 05:07
Nishant Kumar Resume
/**
* The Curriculum vitae of Nishant Kumar
*
* Hi there, I am Nishant. I am Software Architect @GetMyParking,
* Mozila Tech Contributor, Teacher at CodeInstitute (Dublin), CodeMentor Front-end Expert,
* 101 JavaScript Interview Question Author.
*
* I love to pair program and ship quality code that's solidly tested.
* Skills that I'm proficient in and continue to learn with: Object Oriented JavaScript,
* JavaScript Design Pattern, MVC, Client Side Performance Optimization, Node.js, Angular.js,
"err": {
"message": "Authorization Required",
"name": "Error",
"stack": "Error: Authorization Required\n at /home/ubuntu/gmp-consumer-backend/node_modules/loopback/lib/application.js:399:21\n at /home/ubuntu/gmp-consumer-backend/node_modules/loopback/lib/model.js:322:7\n at /home/ubuntu/gmp-consumer-backend/node_modules/loopback/common/models/acl.js:472:23\n at /home/ubuntu/gmp-consumer-backend/node_modules/loopback/node_modules/async/dist/async.js:3694:9\n at /home/ubuntu/gmp-consumer-backend/node_modules/loopback/node_modules/async/dist/async.js:356:16\n at iteratorCallback (/home/ubuntu/gmp-consumer-backend/node_modules/loopback/node_modules/async/dist/async.js:936:13)\n at /home/ubuntu/gmp-consumer-backend/node_modules/loopback/node_modules/async/dist/async.js:840:16\n at /home/ubuntu/gmp-consumer-backend/node_modules/loopback/node_modules/async/dist/async.js:3691:13\n at apply (/home/ubuntu/gmp-consumer-backend/node_modules/loopback/node_modules/async/dist/async.js:21:25