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
| 'use strict' | |
| var AWS = require('aws-sdk'); | |
| var S3 = new AWS.S3(); | |
| var SES = new AWS.SES({region: 'us-east-1'}); | |
| var nodemailer = require('nodemailer'); | |
| var excel = require('excel4node'); | |
| var workbook = new excel.Workbook(); | |
| var worksheet = workbook.addWorksheet('Sheet 1'); | |
| exports.handler = (event, context, callback) => { |
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
| 'use strict' | |
| var AWS = require('aws-sdk'); | |
| var S3 = new AWS.S3(); | |
| var excel = require('excel4node'); | |
| var workbook = new excel.Workbook(); | |
| var worksheet = workbook.addWorksheet('Sheet 1'); | |
| exports.handler = (event, context, callback) => { | |
| var docClient = new AWS.DynamoDB.DocumentClient({ region: 'us-east-2' }); | |
| var params = { TableName: 'Users' }; |
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
| { | |
| "type": "service_account", | |
| "project_id": "project_id", | |
| "private_key_id": "private_key_id", | |
| "private_key": "private_key", | |
| "client_email": "client_email", | |
| "client_id": "client_id", | |
| "auth_uri": "https://accounts.google.com/o/oauth2/auth", | |
| "token_uri": "https://oauth2.googleapis.com/token", | |
| "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", |
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 admin = require('firebase-admin'); | |
| const faker = require('faker'); | |
| const serviceAccount = require('../tmp/serviceAccountKey.json'); | |
| admin.initializeApp({ | |
| credential: admin.credential.cert(serviceAccount) | |
| }); | |
| const db = admin.firestore(); |
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 * as functions from 'firebase-functions'; | |
| import * as firebase from 'firebase-admin'; | |
| firebase.initializeApp(); | |
| const env = functions.config(); | |
| const auth = { | |
| username: env.elasticsearch.username, | |
| password: env.elasticsearch.password, | |
| }; |
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
| .searchbox { | |
| position: relative; | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| max-width: 480px; | |
| margin: 0 auto; | |
| padding: 15px; | |
| input { |
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
| <div class="searchbox"> | |
| <input | |
| #searchInput | |
| type="text" | |
| placeholder="Find a Person or Contact" | |
| (keyup)="updateSearch.next($event)" | |
| (focus)="showResults()"> | |
| <i | |
| class="search-icon fa fa-search" | |
| (click)="focusInput()" |
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 { Component, OnDestroy, ViewChild, ElementRef } from '@angular/core'; | |
| import { Subscription, Subject, of } from 'rxjs'; | |
| import { debounceTime, delay, distinctUntilChanged, flatMap, map, tap } from 'rxjs/operators'; | |
| import { SearchService } from '../../services/search.service'; | |
| @Component({ | |
| selector: 'app-searchbox', | |
| templateUrl: './searchbox.component.html', | |
| styleUrls: ['./searchbox.component.scss'] |
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
| export class SearchService { | |
| data: any; | |
| results: IContact[]; | |
| isFetching = false; | |
| constructor(private functions: AngularFireFunctions) { } | |
| public getResults(query: string) { | |
| const call = this.functions.httpsCallable('searchContacts'); | |
| this.isFetching = true; |
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
| ⚡ nr build:ssr | |
| > [email protected] build:ssr /app | |
| > npm run build:bundles && npm run compile:server | |
| > [email protected] build:bundles /app | |
| > ng build --prod && ng run ng-fire-universal:server:production --bundleDependencies all |
NewerOlder