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
presigned_json = {:fields=>{:AWSAccessKeyId=>nil, :key=>"1530784425_light", :policy=>"eyJleHBpcmF0aW9uIjoiMjAxOC0wNy0wNVQxMDoxODo0NVoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJhM2JjdXNlcnMifSx7ImtleSI6IjE1MzA3ODQ0MjVfbGlnaHQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCJpbWFnZS8iXSxbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwxLDEwMjQwMDAwMF0seyJ4LWFtei1jcmVkZW50aWFsIjoiYTNiY2FjY2Vzcy8yMDE4MDcwNS9ldS13ZXN0LTMvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1kYXRlIjoiMjAxODA3MDVUMDk1MzQ1WiJ9XX0=", "x-amz-signature"=>"8e8d3987682ef7793cf0aca381fe7174155ebfa131cf509b94bffd29da2fb1cb", "x-amz-credential"=>"a3bcaccess/20180705/eu-west-3/s3/aws4_request", "x-amz-date"=>"20180705T095345Z", "x-amz-algorithm"=>"AWS4-HMAC-SHA256", :acl=>"public-read"}, :upload_url=>"http://minio:9000/a3bcusers", :download_url=>"http://minio:9000/a3bcusers/1530784425_light"} | |
json = presigned_json[:fields] | |
out = [] | |
out << '<html> | |
<head> | |
<meta http-equiv="Content-Type" content="t |
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
# why : i'm watching a serie on youtube with some episodes blocked in certain country (each time differents ones) | |
# i don't want to switch my VPN server after each episode and try all servers to find a country allowed | |
# the script gives me the country less blocked in the entire playlist | |
# what it does : | |
# given a playlist url | |
# parses the playlist without using the google API (scrapping) | |
# for each video found it calls unblockvideos API | |
# returns a hash with the number of times a country is blocked |
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
gem 'rails', '~> 6.0.0' | |
gem 'devise' | |
gem 'omniauth' | |
gem 'omniauth-google-oauth2' | |
gem 'google-api-client' |
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
cap staging deploy:check | |
cap staging deploy |
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
require 'google/apis/oauth2_v2' | |
shared_context 'stub_google_token_validation' do | |
before do | |
allow_any_instance_of(Google::Apis::Oauth2V2::Oauth2Service).to receive(:tokeninfo).and_return( | |
Google::Apis::Oauth2V2::Tokeninfo.new email: '[email protected]', | |
issued_to: Rails.application.secrets[:google_client_id], | |
audience: Rails.application.secrets[:google_client_id] | |
) | |
end |
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
stages: | |
- test | |
- documentation | |
- deploy | |
rspec: | |
stage: test | |
# Cache gems in between builds | |
cache: | |
paths: |
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
{ | |
"meta": {"theme": "kendall"}, | |
"basics": { | |
"name": "Alexis Delahaye", | |
"label": "Ingénieur Backend Ruby", | |
"picture": "", | |
"email": "[email protected]", | |
"phone": "", | |
"profiles": [ | |
{ |