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
| version: '3.9' | |
| services: | |
| postgres: | |
| image: postgres:15.3 | |
| container_name: company-database | |
| restart: always | |
| ports: | |
| - 5432:5432 | |
| volumes: |
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
| version: '3.1' | |
| services: | |
| db: | |
| image: mysql:5.7 | |
| restart: always | |
| environment: | |
| MYSQL_DATABASE: 'db' | |
| # So you don't have to use root, but you can if you like |
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
| ## Stage 1 (production base) | |
| # This gets our prod dependencies installed and out of the way | |
| FROM node:8-slim as base | |
| # set this with shell variables at build-time. | |
| # If they aren't set, then not-set will be default. | |
| ARG CREATED_DATE=not-set | |
| ARG SOURCE_COMMIT=not-set | |
| # labels from https://github.com/opencontainers/image-spec/blob/master/annotations.md | |
| LABEL org.opencontainers.image.authors=jose4125@gmail.com |
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
| version: "2.4" | |
| services: | |
| proxy: | |
| image: traefik:1.7-alpine | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| ports: | |
| - 8080:80 | |
| commands: |
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 names:Array<string> = []; | |
| const promise: Promise<string> = new Promise((resolve) => { | |
| setTimeout(() => { | |
| resolve('this is done'); | |
| },2000) | |
| }) | |
| promise.then(data => { | |
| data.split(''); |
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
| // INTERSECTION TYPES | |
| interface Admin { | |
| name: string; | |
| privileges: string[]; | |
| } | |
| interface Employee { | |
| name: string; | |
| startDate: Date; |
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 App(title, type) { | |
| this.title = title; | |
| this.body = document.querySelector('body'); | |
| } | |
| App.prototype.contTemplate = function() { | |
| this.contTmpl = document.createElement('div'); | |
| this.contTmpl.classList.add('tasks-cont'); | |
| }; |
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
| console.log('========================== OTHER PROTOTYPAL ================================') | |
| var Proto2Task = { | |
| title: 'title', | |
| isComplete: false | |
| } | |
| Object.defineProperties(Proto2Task, { | |
| complete: { |
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
| console.log('========================== PROTOTYPAL ================================') | |
| var ProtoTask = { | |
| constructor: function(title, complete) { | |
| this.title = title; | |
| this.isComplete = complete || false; | |
| }, | |
| complete: function() { | |
| return this.isComplete; |
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
| console.log('========================== CLASSICAL ================================') | |
| function ClassicalTask(title, complete) { | |
| this.title = title; | |
| this.isComplete = complete || false; | |
| } | |
| ClassicalTask.prototype.complete = function() { | |
| return this.isComplete; |