Skip to content

Instantly share code, notes, and snippets.

View hok's full-sized avatar

Marko Honkanen hok

View GitHub Profile
version: 2
jobs:
build:
parallelism: 1
docker:
- image: circleci/elixir:1.8.1-node-browsers
environment:
MIX_ENV: test
POSTGRES_USER: postgres
POSTGRES_DB: app_test
config :data, Data.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("POSTGRES_USER") || "platform_test",
password: System.get_env("POSTGRES_PASSWORD") || "platform_test",
database: System.get_env("POSTGRES_DB") || "platform_test",
hostname: System.get_env("POSTGRES_HOST") || "localhost",
pool: Ecto.Adapters.SQL.Sandbox
docker:
- image: circleci/elixir:1.8.1-node-browsers
environment:
MIX_ENV: test
POSTGRES_USER: postgres
POSTGRES_DB: app_test
POSTGRES_PASSWORD:
- image: circleci/postgres:10-alpine
environment:
POSTGRES_USER: postgres
config :ex_aws,
region: "eu-west-2",
access_key_id: [{:system, "AWS_ACCESS_KEY_ID"}, :instance_role],
secret_access_key: [{:system, "AWS_SECRET_ACCESS_KEY"}, :instance_role]
defmodule Feed.S3.Sync.Post do
defstruct title: "",
summary: "",
content: "",
filename: "",
author: "",
cover_image: "",
tags: [],
published_at: "",
published: false
---
title: Building the Blog
date: 2019-02-23 09:30:00
summary: I set out to modernise this site and wanted to do use this opportunity to learn something new and try to create as good and convenient platform that I could
published: true
author: Marko Honkanen
image:
tags:
- elixir
- phoenix
@hok
hok / request.ex
Last active March 14, 2019 22:47
defmodule Feed.S3.Request do
alias ExAws.S3
@bucket "<BUCKET NAME>"
@post_regex ~r/posts\/.*.md/
@tip_regex ~r/tips\/.*.md/
def get_posts do
@post_regex
|> list_posts()
@hok
hok / config.yml
Created March 7, 2019 14:38
CircleCI 2 config (.circleci/config.yml)
version: 2
jobs:
build:
parallelism: 1
docker:
- image: circleci/elixir:1.8.1-node-browsers
environment:
MIX_ENV: test
POSTGRES_USER: postgres
POSTGRES_DB: app_test
@hok
hok / gist:9810197
Created March 27, 2014 15:30
sin waves
We couldn’t find that file to show.