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
| # Buffer is a default Nodejs global object | |
| const initialString = 'michelepatrassi'; | |
| const token = Buffer.from(initialString).toString('base64'); | |
| # want to get it back? | |
| const welcomeBack = Buffer.from(token, 'base64').toString('ascii'); | |
| if (initialString === welcomeBack) { | |
| console.log('all good!'); |
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
| Component code | |
| .... | |
| ngAfterViewInit() { | |
| const config = { attributes: false, childList: true, subtree: true }; | |
| this.messageTreeObserver = new MutationObserver((mutationList, observer) => { | |
| for (const mutation of mutationList) { | |
| if (mutation.type === 'childList') { | |
| // Do action here! | |
| } | |
| } |
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
| getPathAndFileName(fileUri: string): { path: string; name: string } => { | |
| const splittedUri = fileUri.split('/').filter(x => x); | |
| const path = `${splittedUri.slice(0, -1).join('/')}/`; | |
| const name = splittedUri.slice(-1).join(); | |
| return { path, name }; | |
| } |
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 { RESPONSE, REQUEST } from '@nguniversal/express-engine/tokens'; | |
| import { renderModuleFactory } from '@angular/platform-server'; | |
| // These are important and needed before anything else | |
| import 'zone.js/dist/zone-node'; | |
| import 'reflect-metadata'; | |
| import { enableProdMode, ValueProvider, FactoryProvider } from '@angular/core'; | |
| // Import module map for lazy loading | |
| import {provideModuleMap} from '@nguniversal/module-map-ngfactory-loader'; | |
| import { registerLocaleData } from '@angular/common'; |
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
| 1/04/2020 | |
| 8:30 - study nestJS | |
| 9:30 - team call | |
| -> remember wrap to wrap up project task | |
| 10 - break | |
| 10:15 - deploy with cloud66 using docker compose, find out how to connect frontend with backend | |
| -> deployment went fine, had to define custom file! |
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 tags = { | |
| Advertising: "Advertising", | |
| Architecture: "Architecture", | |
| Aviation: "Aviation", | |
| Banking: "Banking", | |
| Business: "Business", | |
| Construction: "Construction", | |
| Design: "Design", | |
| Economics: "Economics", | |
| Engineering: "Engineering", |
OlderNewer