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 / s3_upload_signed_url.js
Created June 25, 2019 16:02
Upload file to Amazon S3 using signed URL in Node.js
var AWS = require('aws-sdk');
var fs = require('fs');
var http = require('https');
var url = require('url');
var request = require('request');
var s3 = new AWS.S3({
accessKeyId: 'KEY',
secretAccessKey: 'SECRET',
region: 'eu-west-1'
@nishant8BITS
nishant8BITS / web-performance.md
Created April 2, 2019 11:24 — forked from stevekinney/web-performance.md
Web Performance Workshop

Web Performance

Requirements

Repositories

@nishant8BITS
nishant8BITS / MySQL_macOS_Sierra.md
Created November 30, 2018 20:30 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@nishant8BITS
nishant8BITS / install virtualenv ubuntu 16.04.md
Created November 24, 2018 16:21 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@nishant8BITS
nishant8BITS / LateBinding.js
Created October 9, 2018 11:08 — forked from abhiomkar/LateBinding.js
Early Binding & Late Binding in JavaScript
// Early Binding vs Late Binding
// Early Binding
var sum = function(a, b) {
return a + b;
};
var x = 5, y = 6;
var sum5n6 = sum.bind(null, x, y);
@nishant8BITS
nishant8BITS / node-folder-structure-options.md
Created June 29, 2018 18:59 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
function translateError(msg) {
var newErr = new Error(msg); // placed here to get correct stack
return e => {
newErr.originalError = e;
throw newErr;
}
}
async function asyncTask() {
const user = await UserModel.findById(1).catch(translateError('No user found'))
@nishant8BITS
nishant8BITS / cover-letter.md
Created January 28, 2018 11:07 — forked from ivoputzer/cover-letter.md
cover letter

Cover Letter

My name is Ivo and I am an Italian agile software developer who loves coding and solving problems in a simple yet creative fashion. During my years of web development I have grown a strong passion for fronted development which led me to a good understanding of its underlaying technologies. I love hacking the hell out of web apps and getting a grasp of cutting edge technologies in order to keep up with time and deliver the best user experience possible.

While user experience still plays a big role in what I enjoy doing, I've learnt how important it is to write stable yet maintainable and scalable backend solutions. Even though I started out with PHP, I soon naturally came closer to the NodeJS environment while still embracing more "elegant" technologies such as Ruby or Java either adopting frameworks or by implementing architectures from scratch.

I discovered the Agile Manifesto and eXtreme Programming back while joining XPeppers in 2013 and I’ve tried my best to apply either values and prin

@nishant8BITS
nishant8BITS / gist:db713bf49d4efdf259e09b5379e45fa0
Created October 28, 2017 14:12 — forked from belsrc/gist:672b75d1f89a9a5c192c
Simple Vue.js filters that I usually need
/**
* Changes value to past tense.
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc.
* http://jsfiddle.net/bryan_k/0xczme2r/
*
* @param {String} value The value string.
*/
Vue.filter('past-tense', function(value) {
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing
var vowels = ['a', 'e', 'i', 'o', 'u'];
@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.