Skip to content

Instantly share code, notes, and snippets.

vijay pawar pawarvijay

  • Mumbai , India
View GitHub Profile
@pawarvijay
pawarvijay / .dockerignore
Created Mar 8, 2020 — forked from ksmithut/.dockerignore
Node Docker Compose nodemon
View gist:ca25a483277302bab3b8543e9351d9ba
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
View FULL CONFIGURATION
mailer.js
-------------------------------------------------------------
const nodemailer = require('nodemailer');
const {EMAIL_ID, EMAIL_PASSOWRD} = require('../constant');
let transporter;
const initTransporter = () => {
transporter = nodemailer.createTransport({
service: 'gmail',
host: 'smtp.gmail.com',
@pawarvijay
pawarvijay / aggregation_lookup.md
Created Jul 17, 2018 — forked from bertrandmartel/aggregation_lookup.md
MongoDB $lookup aggregation example
View aggregation_lookup.md

MongoDB $lookup aggregation

SO link

db.votes.aggregate([{
    $lookup: {
        from: "users",
        localField: "createdBy",
        foreignField: "_id",
@pawarvijay
pawarvijay / .babelrc
Last active Sep 6, 2017
My working Gists package.json & babelrc
View .babelrc
{
"presets": [
"react",
[
"env",
{
"targets": {
"browsers": ["last 1 versions"]
},
"debug": true,
View testReducer.js
import update from 'immutability-helper';
const testReducer = (state = {}, action) => {
switch (action.type) {
case 'COMPUTE_AMOUNT':
action.paylod.amount = action.paylod.rate * action.paylod.quantity
return { ...state, ...action.paylod }
View testComponent.js
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux';
class testComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
name: 'shirt',
View Merge sort in javascript
function mergeSort(arr)
{
if (arr.length < 2){
return arr;
}
var middle = parseInt(arr.length / 2);
var left = arr.slice(0, middle);
var right = arr.slice(middle, arr.length);
@pawarvijay
pawarvijay / simple swap
Created Apr 25, 2017
simple swap in javascript
View simple swap
function reverse(str)
{
console.log('INPUT ARRAY ' + str.join(''))
var r = str.length - 1, l = 0;
while (l < r)
{
swap(l, r);
l++;
r--;
@pawarvijay
pawarvijay / Reverse an array without affecting special characters
Created Apr 25, 2017
Reverse an array without affecting special characters from geeksforgeeks.com
View Reverse an array without affecting special characters
function isAlphabet(x)
{
return ( (x >= 'A' && x <= 'Z') ||
(x >= 'a' && x <= 'z') );
}
function reverse(str)
{
console.log('INPUT ARRAY ' + str.join(''))
You can’t perform that action at this time.