flowchart TB
"Failed Payment delivery"-->Policies
subgraph Retry System
Policies-->Retrier
end
Retrier-->"Selected Action"
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
# frozen_string_literal: true | |
class TaxidValidator < ActiveModel::EachValidator | |
VALID_FORMATS = { | |
nif: /^(\d{8})([A-Z])$/, | |
nie: /^[XYZ]\d{7,8}[A-Z]$/, | |
}.freeze | |
CONTROL_DIGIT_TABLE = %w[T R W A G M Y F P D X B N J Z S Q V H L C K E].freeze | |
CONTROL_DIGIT_NIE_MAPPING = { |
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
# Trigger a travis build | |
post "/push-webhook" do | |
uri = URI.parse("https://api.travis-ci.org/repo/your-org/your-repo/requests") | |
request = Net::HTTP::Get.new(uri.request_uri) | |
request["Content-Type"] = "application/json" | |
request["Accept"] = "application/json" | |
request["Travis-API-Version"] = "3" | |
request["Authorization"] = "token your-token" |
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
private Environment(String ip, String mac, String iccid, String imei, | |
String carrier, String device, String os, String androidId, | |
String localization) { | |
this.ip = ip; | |
this.mac = mac; | |
this.iccid = iccid; | |
this.imei = imei; | |
this.carrier = carrier; | |
this.device = device; | |
this.os = os; |
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 | |
set -ex | |
# Pass in Heroku API token | |
token=$1 | |
# We run this script in a stateless Docker image, so to make the script a bit | |
# cleaner, we just write out the credentials to a file that the Heroku Toolbelt | |
# knows to read. |
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
> pip2.7 install otpsecure | |
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. | |
Collecting otpsecure | |
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python2.7/site-packages (from otpsecure) (4.8.0) | |
Requirement already satisfied: pycrypto>=2.6.1 in /usr/local/lib/python2.7/site-packages (from otpsecure) (2.6.1) | |
Requirement already satisfied: requests>=2.4.1 in /usr/local/lib/python2.7/site-packages (from otpsecure) (2.22.0) | |
Requirement already satisfied: soupsieve>=1.2 in /usr/local/lib/python2.7/site-packages (from beautifulsoup4->otpsecure) (1.9.2) | |
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python2.7/sit |
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
describe AuthenticateManagerService do | |
subject(:context) { described_class.call(username, password) } | |
describe '.call' do | |
context 'when the context is successful' do | |
let(:username) { 'correct_user' } | |
let(:password) { 'magic' } | |
it 'succeeds' do | |
expect(context).to be_success |
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
POWERLEVEL9K_ELIXIR_ICON=$'\ue62d' | |
prompt_asdf_elixir() { | |
if [ $commands[asdf] ]; then | |
ELIXIR_ICON=$'\ue62d' | |
local asdf_global_conf="$HOME/.tool-versions" | |
local version_regex="s/^\([.0-9]*\).*/\1/p" | |
local config_regex="s/.*(set by \(.*\))/\1/p" | |
local elixir_current="$(asdf current elixir)" | |
local elixir_current_version="$(echo $elixir_current | sed -n $version_regex)" |
NewerOlder