Looking a post from serokell about elixir's library called ecto.
In the post he presents an migration:
defmodule Blog.Repo.Migrations.Initial do
use Ecto.Migration
def change do
create table ("users") doLooking a post from serokell about elixir's library called ecto.
In the post he presents an migration:
defmodule Blog.Repo.Migrations.Initial do
use Ecto.Migration
def change do
create table ("users") do| #!/bin/bash | |
| # Set CNTX=users and NAME=yourusername, to download all your repositories. | |
| # Set CNTX=orgs and NAME=yourorgname, to download all repositories of your organization. | |
| CNTX={users|orgs} NAME={username|orgname} PAGE=1 \ | |
| curl -s "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | | |
| jq -r '.[]|.ssh_url' | | |
| xargs -L1 -n1 -t git clone |
| #!/bin/bash | |
| docker volume create portainer_data | |
| docker run -d -p 9100:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer |
| version: "2" | |
| services: | |
| app: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile.dev | |
| volumes: | |
| - ./src:/app | |
| ports: |
| function changed_files { | |
| local BASE_BRANCH=$* | |
| git diff --name-only ${BASE_BRANCH:="origin/staging"} | grep -v Gemfile | grep -v .codeclimate | grep -v db/schema.rb | tr "\n" " " | |
| } | |
| function canalyze { | |
| codeclimate analyze $(changed_files) $* | |
| } |
| #!/usr/bin/env ruby | |
| ### Put this file in any $PATH of your system aka /usr/local/bin and run as follow | |
| ### $ git pivotal_checkout 139473593 | |
| ### + git checkout -b bug/139473593-nome-da-task-do-pivotal | |
| ENV['PIVOTAL_TOKEN'] = 'XXXXXXXXXXXX' | |
| ENV['PROJECT_ID'] = 'XXXXXXXXX' | |
| ##### /PivotalApiLib |
| # Watch some path and run rspec with defined arguments | |
| # | |
| # usage: | |
| # watch_rspec watch_path1 watch_path2 -- rspec_arguments | |
| # | |
| function watch_rspec | |
| { | |
| local WATCH_FILES | |
| local ARGUMENTS |
| # load Gemfile.local if it exists | |
| local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") | |
| eval_gemfile local_gemfile if File.exists?(local_gemfile) | |
| # Load plugins' Gemfiles | |
| Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file| | |
| eval_gemfile file | |
| end |
| require 'json' | |
| package = JSON.parse(File.read 'package.json') | |
| version = `stepup version --next-release`.strip | |
| package['version'] = version | |
| puts JSON.generate package, indent: " ", space: " ", object_nl: "\n", array_nl: "\n", max_nesting: false |