Skip to content

Instantly share code, notes, and snippets.

@mdsaleemj
mdsaleemj / .vimrc
Last active Aug 14, 2020
My .vimrc file
View .vimrc
let mapleader=","
set number " show line numbers
"spaces to tab
set tabstop=2
set expandtab
set shiftwidth=2
" list invisible chars
@mdsaleemj
mdsaleemj / app.js
Created Mar 12, 2017 — forked from kadishmal/app.js
Simple Node.js server which responds in chunked transfer encoding
View app.js
var http = require('http');
http.createServer(function (request, response) {
response.setHeader('Content-Type', 'text/html; charset=UTF-8');
response.setHeader('Transfer-Encoding', 'chunked');
var html =
'<!DOCTYPE html>' +
'<html lang="en">' +
'<head>' +
View sorting-algorithms.md
SELECTION SORT - BASIC SORTING (WITHOUT OPTIMIZATION)

for(i=0;i<array.length;i++) {
    //assume i to be  index value of smallest value
    var minIndex = i;
    //loop through the rest of element and find the index of smallest element
    for(j=i+1;j<array.length;j++){
      if(array[j] < array[minIndex]){
          minIndex = j;
View Running-node-program-with-babel-for-ES6-ES7-features.md

##Running ES6 javascript code in NodeJS envrionment.

  1. Try to install babel-cli

npm install --save-dev babel-cli npm install --save-dev babel-preset-es2015

@mdsaleemj
mdsaleemj / Software-Development-Principles.md
Last active Feb 25, 2017
Software Development Priniciples
View Software-Development-Principles.md

The purpose of this gist is to know more about the software developing principles in general. This intention is to explore and know more about software development from industry leaders like Martin Flowers, Robrt Martin(aka UncleBob ) and many .

In addition to that , learning and practising programming and desing skill with emphasis on necessary programming styles like OOP and FP needs to be encouraged.
This guide is started as rough draft and will serve to contain information about resources , leaders to follow, topics under software development.

##Software Development

View Tools-for-Enterprise-Applications.md

#####Messaging System or Queues#####

This concept is especially useful in web applications where it's impossible to handle a complex task during a short HTTP request window. Reference about different queueing tools : http://queues.io/


#####Key Value Database####


@mdsaleemj
mdsaleemj / openssl-extract-private-key-from-pfx.md
Last active Apr 4, 2018
openssl-extract-private-key-from-pfx
View openssl-extract-private-key-from-pfx.md

Customers sometimes have a need to export a certificate and private key from a Windows computer to separate certificate and key files for use elsewhere. Windows doesn't provide the means to complete this process.

Exporting Certificates from the Windows Certificate Store describes how to export a certificate and private key into a single .pfx file. Follow the procedure below to extract separate certificate and private key files from the .pfx file.

Procedure:

Take the file you exported (e.g. certname.pfx) and copy it to a system where you have OpenSSL installed. Note: the *.pfx file is in PKCS#12 format and includes both the certificate and the private key.

Run the following command to export the private key: openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes

@mdsaleemj
mdsaleemj / front-end-development.md
Last active Oct 26, 2017
Front End development
View front-end-development.md

Hi, This is my place to gather any ideas/concepts/resources related to frontend development. Right now , front dev is vast and there lot of things for different types of front end projects .

BEST Resources is : FrontEnd Master - gitbook (also pdf available in drive). This book gives nice overview of overall front-end Engineering and describes lot of different disciplines with in front end dev.

#####NOTE##### This guide needs to constantly maintained and refined and grouped in different sections for better understanding. Also, refer to git where lot of resources available for front dev and related curricula.

@mdsaleemj
mdsaleemj / storing and downloading binary data in mongodb
Last active Nov 21, 2018
storing and downloading binary data in mongodb without grid-fs
View storing and downloading binary data in mongodb
//The below model is used to book a travel ride.
//The uploaded file is parsed in the formidable multipart body parser and stored in req.files.fileField.
//File is read from , in my code, req.files.file
var rideModel = function(){
var rideSchema = new Schema({
email : String,
corp_id : String,
name : String,
manager: String,
@mdsaleemj
mdsaleemj / 01-intro.md
Created Nov 4, 2015 — forked from dwayne/01-intro.md
My notes from the book "ng-book: The Complete Book on AngularJS by Ari Lerner".
View 01-intro.md

Introduction

Author: Ari Lerner.

AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:

  • Module support
  • DOM manipulation
  • Animations
  • Templating