Skip to content

Instantly share code, notes, and snippets.

View fakhrizaki's full-sized avatar

Fakhruddin Zakiuddin fakhrizaki

View GitHub Profile

CLI - Command line interface:

A utility in your computer that you use to type commands rather than using your mouse. That's what it all means. Examples are Terminal on Mac, Command Prompt on Windows etc.

This is the way things used to be in old school days.

Working with NodeJS will require CLI's usage mostly.

Arguments

@fakhrizaki
fakhrizaki / ngUnderstand.md
Last active December 20, 2015 01:10
Understanding Angular JS 1

Dependency injection:

In simple words, it is passing objects to functions

Angular annotates (converts them to a string) all the arguments passed to the controller function and check if it contains any of the default services (e.g. $scope, $http). It then parses those services returns them as an object in place of that argument to the calling function. The order of the parameters doesn't matter in this case as Angular inserts the service object in its right place.

$scope:

It is the service that is being passed to the controller function. It is a bond between the DOM and the JS.

@fakhrizaki
fakhrizaki / strict-comparison.js
Last active August 29, 2015 14:17
Strict Comparison in JS (== vs ===)
0 == false // true
0 === false // false, because they are of a different type
1 == "1" // true, auto type coercion
1 === "1" // false, because they are of a different type
null == undefined // true
null === undefined // false
'0' == false // true
'0' === false // false
@fakhrizaki
fakhrizaki / gulpfile.js
Last active August 29, 2015 14:16
Gulpfile.js for standard use
var gulp = require('gulp'),
watch = require('gulp-watch'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
jshint = require('gulp-jshint'),
concat = require('gulp-concat'),
minifyCSS = require('gulp-minify-css'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename');