- Utiliser les streams pour filtrer et transformer des collections.
- Manipuler des
Optional
pour gérer les champs facultatifs. - Pratiquer des chaînes d’opérations fonctionnelles claires et robustes.
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
key = ['f', 'c', 's', 'c'] | |
message = "Gqfltwj emgj clgfv ! Aqltj rjqhjsksg ekxuaqs, ua xtwk n'feuguvwb gkwp xwj, ujts f'npxkqvjgw nw tjuwcz ugwygjtfkf qz uw efezg sqk gspwonu. Jgsfwb-aqmu f Pspygk nj 29 cntnn hqzt dg igtwy fw xtvjg rkkunqf.".downcase.chars | |
alphabetic_chars = ('a'..'z').to_a | |
index = 0 | |
clear_message = "" | |
message.each do |char| | |
if alphabetic_chars.include?(char) | |
key_index = index % key.count |
What this guide will cover: the code you will need in order to include Redis and Resque in your Rails app, and the process of creating a background job with Resque.
What this guide will not cover: installing Ruby, Rails, or Redis.
Note: As of this writing I am still using Ruby 1.9.3p374, Rails 3.2.13, Redis 2.6.11, and Resque 1.24.1. I use SQLite in development and Postgres in production.
Background jobs are frustrating if you've never dealt with them before. Over the past few weeks I've had to incorporate Redis and Resque into my projects in various ways and every bit of progress I made was very painful. There are many 'gotchas' when it comes to background workers, and documentation tends to be outdated or scattered at best.
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
########################################################################################### | |
# POC KYC Ubble -> Stripe | |
# Principe : un message SNS part du service identity-check vers le service payment | |
# lorsque la vérification d'identité a fonctionné. | |
########################################################################################### | |
### SERVICE IDENTITY-CHECK | |
def documents_attributes(ubble_ident_id) |
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
require 'rest-client' | |
require 'json' | |
########## EDIT HERE ########## | |
GITHUB_ORGANISATION = 'stootie' | |
PAGE_NUMBER = 1 | |
GITHUB_TOKEN = 'TODO' | |
############################### | |
GITHUB_API_REPOS = "https://api.github.com/orgs/#{GITHUB_ORGANISATION}/repos?page=#{PAGE_NUMBER}" |