This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @title: `setting up BaseCtrl` in AngularJS 1.3.x | |
* @author: Shahzad Nawaz | |
* @dated: 2/28/2015. | |
*/ | |
(function () { | |
'use strict'; | |
/*Base Controller starts*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @title: Random-alphanumeric-strings | |
* @author: Shahzad Nawaz | |
* @dated: 7/16/2015. | |
*/ | |
//e.g #1 | |
var sixLenstrings = getRandomStrings(6, 2); | |
console.log(sixLenstrings); | |
// output: ["UlTl14", "JZRbSS"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Date: Jan 19 2017 | |
title: NodeJS enhanced CJS module pattern | |
author: Shahzad Nawaz | |
email: [email protected] | |
Description: | |
This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/express modules. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created on: Oct 14 2017 | |
* Created by: Shahzad Nawaz | |
* Derived from different sources, Stakoverflow, Blogs, experience. | |
* For more advanced handling - checkout https://github.com/adnan-kamili/rest-api-response-format | |
*/ | |
// success response example - http status code - always 200 | |
var res = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created on: Dec 22 2017 | |
* Created by: Shahzad Nawaz | |
* Derived from different sources, Stakoverflow, Blogs, experience. | |
*/ | |
console.clear(); //--snippets - clear prev run log | |
/* rocking Scope class for $watch only */ | |
function Scope() { |