Project at https://github.com/fertapric/files
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
#!/bin/bash | |
function setup { | |
[ -z "$FILES_HOST"] && FILES_HOST=localhost | |
} | |
function teardown { | |
echo "REMOVE ALL THE FILES FROM BUCKET" | |
} |
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
#!/bin/sh | |
print_help() { | |
echo "Extract environment variables from an ECS service." | |
echo | |
echo "Usage: $0 [OPTIONS] SERVICE" | |
echo | |
echo "Options:" | |
echo " -h, --help Print usage" | |
} |
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
$ ecs-run | |
Run a Docker container with the same configuration as an ECS service. | |
It uses the same image and environment variables of the ECS task definition. | |
Supported AWS CLI environment variables: | |
- AWS_ACCESS_KEY_ID: AWS access key. | |
- AWS_SECRET_ACCESS_KEY: AWS secret key. | |
- AWS_SESSION_TOKEN: session token. | |
- AWS_DEFAULT_REGION: AWS region. |
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
defmodule MyAwesomeProject.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :my_awesome_project, | |
version: "0.1.0", | |
elixir: "~> 1.3", | |
escript: escript(), | |
deps: deps(), | |
aliases: aliases()] |
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
env_colors = %{"prod" => ANSI.red(), "dev" => ANSI.green(), "test" => ANSI.green()} | |
env = System.get_env("MIX_ENV") || "dev" | |
colored_env = Map.get(env_colors, env, ANSI.yellow()) <> env <> ANSI.reset() | |
IEx.configure( | |
default_prompt: "%prefix(#{colored_env},%counter)>", | |
alive_prompt: "%prefix(#{colored_env},%node,%counter)>" | |
) |
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
defmodule Core.Repo.Migration do | |
@moduledoc """ | |
Migrations are used to modify your database schema over time. | |
This module provides many helpers for migrating the database, along with the ones provided | |
by `Ecto.Migration`. | |
""" | |
defmacro __using__(_) do | |
quote do |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
defmodule Params do | |
@moduledoc """ | |
A set of functions for working with parameters. | |
Parameters are maps that impose restrictions on the key type: | |
* all the keys must be atoms or strings. | |
* all the keys must be of the same type. | |
Otherwise, all the functions of this module will raise `Params.MixedKeysError`. |