Bin e padrões para validação de cartão de crédito.
| Bandeira | Começa com | Máximo de número | Máximo de número cvc |
|---|---|---|---|
| Visa | 4 | 13,16 | 3 |
| Mastercard | 5 | 16 | 3 |
| logger.warn "*** BEGIN RAW REQUEST HEADERS ***" | |
| self.request.env.each do |header| | |
| logger.warn "HEADER KEY: #{header[0]}" | |
| logger.warn "HEADER VAL: #{header[1]}" | |
| end | |
| logger.warn "*** END RAW REQUEST HEADERS ***" |
| # create the template | |
| template = PageOfflineTemplate.new | |
| template.quote = quote | |
| template.pages = quote.build_pages | |
| # Here I render a template with layout to a string then a PDF | |
| pdf = PDFKit.new template.render_to_string(:template=>"quotes/review.html.haml") | |
| module Sunspot | |
| module Search | |
| class AbstractSearch | |
| private | |
| def maybe_will_paginate(collection) | |
| collection.instance_eval <<-RUBY, __FILE__, __LINE__ + 1 | |
| def current_page | |
| #{@query.page} |
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
If you have multiple applications on Heroku and would like to use a single Logentries account for all of them, this is how you do it. Basically, do not use add-ons, and send all drains to your account.
Add LogManualaccess.lognew set named myapp-{environment}, for instance myapp-staging (at least, this is how I like to name my entries)Plain TCP, UDP - logs are sent via syslog optionCreate Log Token| # This is a sample build configuration for Ruby. | |
| # Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples. | |
| # Only use spaces to indent your .yml configuration. | |
| # ----- | |
| # You can specify a custom docker image from Docker Hub as your build environment. | |
| image: ruby:2.2.4 | |
| clone: | |
| depth: 3 |
| require 'sidekiq/api' | |
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear |