db.votes.aggregate([{
$lookup: {
from: "users",
localField: "createdBy",
foreignField: "_id",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: Flash | |
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc= | |
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676 | |
Thank you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
"react", | |
[ | |
"env", | |
{ | |
"targets": { | |
"browsers": ["last 1 versions"] | |
}, | |
"debug": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reverse(str) | |
{ | |
console.log('INPUT ARRAY ' + str.join('')) | |
var r = str.length - 1, l = 0; | |
while (l < r) | |
{ | |
swap(l, r); | |
l++; | |
r--; |
NewerOlder