This file contains hidden or 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 { isPlainObject, findIndex, keyBy, keys, mapValues} from 'lodash'; | |
| /** | |
| * Recursively traverse json tree and builds $lookup and $project stage for pipeline | |
| * Needs heavy refacotoring :D | |
| * @param {object} schema | |
| * @returns {$lookup object} | |
| */ | |
| const recursiveLookup = (pipeline = [], schema) => { | |
| const collection = keys(schema).pop(); | |
| const parent = schema[collection].parent; |
This file contains hidden or 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
| // analyzer ==> character_filter --> tokenizer -> token_filter | |
| export default { | |
| index: { | |
| analysis: { | |
| filter: { | |
| internal_code_filter: { | |
| type: 'pattern_capture', | |
| patterns: ['(U-(([A-Z]{3})([0-9]{3})))'] | |
| } | |
| }, |
This file contains hidden or 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
| const router = require('express').Router(); | |
| const passport = require('passport'); | |
| const UserModel = require('../models/user'); | |
| const auth = require('../../config/auth'); | |
| const logger = require('../../config/logger') | |
| const { USER, deleteItem } = require('../../config/delete'); | |
| const { User, LoginLog, ProfilePicture } = require('../../config/database'); | |
| require('../passport'); |
This file contains hidden or 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
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export TERM="xterm-256color" | |
| export ZSH="/Users/dev/.oh-my-zsh" | |
| export DEFAULT_USER=$USER | |
| ZSH_DISABLE_COMPFIX=true | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME |
This file contains hidden or 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
| module.exports = async function login(done) { | |
| try { | |
| await this.browser | |
| .setUserAgent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36') | |
| .goto('https://admin.booking.com/hotel/hoteladmin/extranet_ng/manage/calendar_sup.html') | |
| .wait(10000) | |
| .evaluate(() => window.location.href); | |
| const loggedUrl = await this.browser | |
| .clearInput('#loginname') |
This file contains hidden or 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
| /** | |
| * Chart Service for drawing different svgs using chartisjs library | |
| * line for date-rane and pie/bar for single/total date Type | |
| */ | |
| 'use strict'; | |
| angular.module('AdminApp') | |
| .service('chartService', function chartService() { | |
| var self = this; |
This file contains hidden or 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
| [][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+ |
This file contains hidden or 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
| /** | |
| * Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
| * https://gist.github.com/faisalman | |
| * | |
| * Copyright 2012-2015, Faisalman <fyzlman@gmail.com> | |
| * Licensed under The MIT License | |
| * http://www.opensource.org/licenses/mit-license | |
| */ | |
| (function(){ |
This file contains hidden or 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 flatten(arr) { | |
| var result = []; | |
| for(var i = 0; i < arr.length; i++) { | |
| if(Array.isArray(arr[i])) { | |
| result = result.concat(flatten(arr[i])); | |
| } else { | |
| result.push(arr[i]); | |
| } | |
| } | |
| return result; |
This file contains hidden or 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() { | |
| "use strict"; | |
| angular.module('app.directives', []) | |
| .directive('barRatings', [function() { | |
| return { | |
| restrict: 'E', | |
| replace: true, | |
| scope: { | |
| appData: '=' |