Skip to content

Instantly share code, notes, and snippets.

View freddyb2's full-sized avatar

Frédéric Boisguérin freddyb2

View GitHub Profile
@freddyb2
freddyb2 / stootie_repo_clones.rb
Last active February 18, 2020 15:25
Stootie repo URLS
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}"
@freddyb2
freddyb2 / poc_kyc_stripe.rb
Last active December 22, 2019 17:17
Transfert des pièces d'identité des stooters de Ubble vers Stripe
###########################################################################################
# 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)
@freddyb2
freddyb2 / redis_and_resque.mkd
Created August 5, 2021 18:33 — forked from Diasporism/redis_and_resque.mkd
How to configure Redis and Resque for your Rails app.

Redis and Resque

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.