Skip to content

Instantly share code, notes, and snippets.

View narainsagar's full-sized avatar
👋
email me for projects or relocation roles!!

Narain M. narainsagar

👋
email me for projects or relocation roles!!
View GitHub Profile
@narainsagar
narainsagar / techkaro-session-beginning-of-new-chapter.md
Last active April 23, 2020 22:48
Reference Materials resources for the TechKaro-meetup session titled "Beginning of new chapter? What’s next?" held on December 22, 2018 @ Usman Institute of Technology, Karachi Pakistan

NOTE: Updated version of this document is been posted over my medium blog. Here's a link to the blog post: https://medium.com/@narainsagar/newbies-guide-to-build-technical-social-web-presence-portfolios-and-starting-freelance-work-2f8b11813787


Reference Materials for the TechKaro meetup session titled "Beginning of new chapter? What’s next?" held on December 22, 2018 @ Usman Institute of Technology, Karachi Pakistan

Here's the link to session slides: https://docs.google.com/presentation/d/1eEsu029ri0X59L9r0rM8clvaJ19aQBVLVnwXG85nxoY

Following are the recommended readings for Creating your own version of CV / Resume and few interviews advice/tips by Syed Musa Ali:

@narainsagar
narainsagar / php_export_html_to_excel_via_phpexcel
Last active May 8, 2019 07:52
Export Html contents to Excel file using PHPExcel
<?php
/*
// save this file to: ExcelService.class.php
Create new folder 'libs' under your project dir, and download PHPExcel-1.8 library .zip from here..
use this clone url: git@github.com:PHPOffice/PHPExcel.git
OR https://github.com/PHPOffice/PHPExcel.
*/
define('TMP_FILES', "../temp/"); // temp folder where it stores the files into.
@narainsagar
narainsagar / dynamodb.md
Created April 26, 2019 23:26 — forked from jlafon/dynamodb.md
An Introduction to Amazon's DynamoDB

An introduction to DynamoDB

DynamoDB is a powerful, fully managed, low latency, NoSQL database service provided by Amazon. DynamoDB allows you to pay for dedicated throughput, with predictable performance for "any level of request traffic". Scalability is handled for you, and data is replicated across multiple availability zones automatically. Amazon handles all of the pain points associated with managing a distributed datastore for you, including replication, load balancing, provisioning, and backups. All that is left is for you to take your data, and its access patterns, and make it work in the denormalized world of NoSQL.

Modeling your data

The single most important part of using DynamoDB begins before you ever put data into it: designing the table(s) and keys. Keys (Amazon calls them primary keys) can be composed of one attribute, called a hash key, or a compound key called the hash and range key. The key is used to uniquely identify an item in a table. The choice of the primary key is particularl

@narainsagar
narainsagar / machine_setup_win.md
Last active January 7, 2019 17:12
This file contains the commands to setup your new Windows development environment @ RootedGlobal. Please read carefully and follow the instructions. :)

SETTING UP YOUR MACHINE

When you join Rooted Global you will be need to configure/setup the machine (if not already done so) using the tools and instructions mentioned below.

Installing apps

Please make sure you have basic familiarity with your machine OS environment and how it works?

We want you to download and install atleast the following recommended tools on your system for now, rest of the tools you might be need in the future (i.e., make sure to check the system configuration before proceed further):

@narainsagar
narainsagar / angular-cli install & upgrade instructions
Last active January 7, 2019 13:12
Install or Upgrade [angular-cli](https://github.com/angular/angular-cli) module on your machine instructions / commands.
[angular-cli](https://github.com/angular/angular-cli) installation & upgrade instructions (commands):
# Install (i.e., as a first time?)
```
$ npm install -g @angular/cli@latest
```
# Upgrade to Latest Release
```
$ npm uninstall -g angular-cli @angular/cli
@narainsagar
narainsagar / ca.md
Created July 9, 2018 21:04 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@narainsagar
narainsagar / angular4-advanced-routing-notes.md
Last active June 1, 2018 23:30
Code snippets for talk on Angular4 Advanced Routing, slides are here: https://goo.gl/N8DneM

Basic Routing

import { ChildRoutes } from './child.routes';

const APP_ROUTES: Routes = [
    { path: '', redirectTo: 'login', pathMatch: 'full' },
    { path: 'login', component: LoginComponent },
    { path: 'register', component: RegisterComponent },
    { path: 'dashboard', component: DashboardComponent },
@narainsagar
narainsagar / .bash_profile
Created February 22, 2018 18:49 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@narainsagar
narainsagar / onpubcom_array_date_sort.js
Created November 9, 2017 11:44 — forked from onpubcom/onpubcom_array_date_sort.js
How to Sort an Array of Dates with JavaScript
<script type="text/javascript">
// First let's create an array of JavaScript Date
// objects.
// More info about the Date class:
// http://w3schools.com/js/js_obj_date.asp
var dates = [
new Date(2010, 4, 10, 10, 07, 16),
new Date(2010, 4, 8, 9, 16, 09),
new Date(2010, 3, 30, 0, 15, 49),
@narainsagar
narainsagar / http-status-codes.md
Created November 7, 2017 15:53 — forked from subfuzion/http-status-codes.md
General REST API HTTP Status Codes

Reference: RFC 2616 - HTTP Status Code Definitions

General

  • 400 BAD REQUEST: The request was invalid or cannot be otherwise served. An accompanying error message will explain further. For security reasons, requests without authentication are considered invalid and will yield this response.
  • 401 UNAUTHORIZED: The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource.
  • 403 FORBIDDEN: The request has been refused. See the accompanying message for the specific reason (most likely for exceeding rate limit).
  • 404 NOT FOUND: The URI requested is invalid or the resource requested does not exists.
  • 406 NOT ACCEPTABLE: The request specified an invalid format.