Aqui estão exemplos de como utilizar a API de tokenização e geração de fingerprint do Rakuten Pay.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
| (defn explain-schema [] | |
| (p/let [editor-data (editor/get-var)] | |
| (when editor-data | |
| (-> editor-data | |
| (update :text #(str "(if (satisfies? schema.core/Schema " % ") " | |
| "(schema.core/explain " % ")" | |
| "(or #?(:cljs nil :default (:schema (meta (ns-resolve *ns* '" % "))))" | |
| "\"Is not a schema\"))")) | |
| (editor/eval-and-render))))) |
This file contains hidden or 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
| .vimrc | |
| " Map leader to comma | |
| let maplocalleader="," | |
| " Toggle this for vim-sexp to not go into insert mode after wrapping something | |
| let g:sexp_insert_after_wrap = 0 | |
| " Toggle this to disable automatically creating closing brackets and quotes | |
| let g:sexp_enable_insert_mode_mappings = 1 | |
| Vocab |
This file contains hidden or 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
| [io.confluent.parallelconsumer/parallel-consumer-core "0.3.0.2"] | |
| [fundingcircle/jackdaw "0.8.0"] |
This file contains hidden or 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 Flatten do | |
| def flatten(list, holding_list \\ [], flattened \\ []) | |
| def flatten([[h | t] | rest], holding_list, flattened) do | |
| flatten(h, [t, rest | holding_list], flattened) | |
| end | |
| def flatten([h | t], holding_list, flattened) do | |
| flatten(t, holding_list, [h | flattened]) | |
| end |
This file contains hidden or 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
| Code.compiler_options(ignore_module_conflict: true) | |
| Code.compile_file("~/.iex/iex_watch_tests.exs", File.cwd!()) | |
| unless GenServer.whereis(IExWatchTests) do | |
| {:ok, pid} = IExWatchTests.start_link() | |
| # Process will not exit when the iex goes out | |
| Process.unlink(pid) | |
| end |
This file contains hidden or 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 hexpm/elixir:1.13.4-erlang-24.3.4.2-debian-stretch-20210902 | |
| RUN apt-get update && \ | |
| apt-get install -y postgresql-client && \ | |
| mix local.hex --force && \ | |
| mix local.rebar --force | |
| ENV APP_HOME /app | |
| RUN mkdir $APP_HOME | |
| WORKDIR $APP_HOME |