Skip to content

Instantly share code, notes, and snippets.

@jose4125
jose4125 / postgres docker-compose.yml
Last active December 21, 2024 15:23
postgres docker-compose
version: '3.9'
services:
postgres:
image: postgres:15.3
container_name: company-database
restart: always
ports:
- 5432:5432
volumes:
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
@jose4125
jose4125 / Dockerfile
Created March 18, 2020 16:26
Dockerfile multiple stage (dev, test, prod)
## 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
version: "2.4"
services:
proxy:
image: traefik:1.7-alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 8080:80
commands:
const names:Array<string> = [];
const promise: Promise<string> = new Promise((resolve) => {
setTimeout(() => {
resolve('this is done');
},2000)
})
promise.then(data => {
data.split('');
// INTERSECTION TYPES
interface Admin {
name: string;
privileges: string[];
}
interface Employee {
name: string;
startDate: Date;
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');
};
console.log('========================== OTHER PROTOTYPAL ================================')
var Proto2Task = {
title: 'title',
isComplete: false
}
Object.defineProperties(Proto2Task, {
complete: {
console.log('========================== PROTOTYPAL ================================')
var ProtoTask = {
constructor: function(title, complete) {
this.title = title;
this.isComplete = complete || false;
},
complete: function() {
return this.isComplete;
console.log('========================== CLASSICAL ================================')
function ClassicalTask(title, complete) {
this.title = title;
this.isComplete = complete || false;
}
ClassicalTask.prototype.complete = function() {
return this.isComplete;