This file contains 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
bold=$(tput bold) | |
normal=$(tput sgr0) | |
read -p "New solution name: " slnname | |
# Create directory | |
mkdir $slnname | |
cd $slnname | |
# Create solution and directories |
This file contains 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 requests | |
import pandas as pd | |
import time | |
from datetime import datetime | |
from datetime import timedelta | |
import sys | |
from fhub import Session | |
import os | |
import finnhub |
This file contains 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 Config | |
config :logger, level: :info | |
secret_key_base = System.fetch_env!("SECRET_BASE_KEY") | |
db_user = System.fetch_env!("DB_USERNAME") | |
db_pwd = System.fetch_env!("DB_PASSWORD") | |
db_name = System.fetch_env!("DB_NAME") | |
db_host = System.fetch_env!("DB_HOST") |
This file contains 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
FROM elixir:1.9.4-alpine as mixer | |
ENV LANG=C.UTF-8 | |
ENV MIX_ENV=prod | |
# Install needed packages | |
RUN apk update && apk add nodejs npm | |
RUN mkdir /app | |
WORKDIR /app |
This file contains 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
FROM elixir:1.9.2 | |
RUN mkdir /app | |
WORKDIR /app | |
ENV MIX_ENV=dev | |
# Install needed packages | |
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - | |
RUN apt-get update && apt-get -y install curl inotify-tools nodejs |
This file contains 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
docker pull postgres | |
docker run -d --rm -p 5432:5432 --name postgres_hello_world_ci -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=hello_world_ci_dev postgres | |
echo no | mix phx.new hello_world_ci | |
cd hello_world_ci | |
mix deps.get | |
mix do compile | |
mix ecto.setup | |
cd assets && npm install && cd .. | |
mix phx.server |
This file contains 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
RED='\033[0;31m' | |
BLUE='\033[1;34m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
R="${BLUE}Running ${NC}" | |
D="${GREEN}Done! ${NC}" | |
clear | |
sleep 1 | |
echo "${BLUE}Create a Postgres server by docker ${NC}" | |
echo "${R} docker pull postgres" |
This file contains 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' | |
services: | |
database: | |
image: "postgres" | |
environment: | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "postgres" | |
POSTGRES_DB: "hello_world_test" |
This file contains 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
FROM elixir:1.9.2 as mixer | |
ENV MIX_ENV=test | |
ENV PORT=4000 | |
# COPY . /app | |
RUN mkdir /app | |
WORKDIR /app | |
RUN mix local.hex --force |
This file contains 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
########################################################################### | |
# Based on https://gist.github.com/teamon/27ed7e551d188930c9fa0b5e19bd76b7# | |
########################################################################### | |
FROM node:latest as build-node | |
# prepare build dir | |
RUN mkdir -p /app/assets | |
WORKDIR /app | |
# set build ENV |
NewerOlder