Aqui estão exemplos de como utilizar a API de tokenização e geração de fingerprint do Rakuten Pay.
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
#!/usr/bin/env bash | |
# | |
# Originally from https://gist.github.com/IanVaughan/2902499 | |
# | |
# authors: Ian Vaughan | |
# Jacob Zimmerman | |
# | |
# usage: uninstall_gems [<version> ...] | |
# | |
# examples: |
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 Mix.Tasks.AuditLogPurgeTest do | |
use RkOneApi.DataCase | |
import Ecto.Query | |
import Ecto.Changeset | |
alias MyApp.AuditLog | |
alias Mix.Tasks.AuditLogPurge | |
defp build_fake_backup_cmd(_, _, _), do: "cat" |
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 Mix.Tasks.AuditLogPurge do | |
use Mix.Task | |
alias MyApp.Repo | |
alias MyApp.AuditLog | |
def run(argv, backup_cmd \\ &build_backup_cmd/3) do | |
Mix.EctoSQL.ensure_started(Repo, []) | |
{options, _argv} = | |
OptionParser.parse!( | |
argv, | |
strict: [ |
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
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
Palestras e Vídeos produzidos pela comunidade Elixir Brasil.
- https://www.youtube.com/watch?v=pjCpbGu3UPs&feature=youtu.be
- https://youtu.be/aA-XHI-EYcM
- https://youtu.be/j_QWqs5gL3E
- https://youtu.be/GdDMgzf4nxI
- https://www.youtube.com/playlist?list=PLaY7qWIrmqtFoZLvOvYRZG5hl367UybRp
- https://www.youtube.com/playlist?list=PLaY7qWIrmqtE0jLlSySWWeG3rqcPLZXXr
- https://youtu.be/njAMVB02Ag0
- https://youtu.be/blGJ_p4plbc
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
# Remove zero-width spaces | |
:%s/\%u200b//g |
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
# Remove zero-width spaces | |
:%s/\%u200b//g |
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
-module(second). | |
-export([hypotenuse/2, perimeter/2]). | |
hypotenuse(A, B) -> | |
AA = first:square(A), | |
BB = first:square(B), | |
math:sqrt(AA + BB). | |
perimeter(A, B) -> | |
C = hypotenuse(A, B), |
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 Config do | |
@moduledoc """ | |
This module handles fetching values from the config with some additional niceties | |
""" | |
@doc """ | |
Fetches a value from the config, or from the environment if {:system, "VAR"} | |
is provided. | |
An optional default value can be provided if desired. |