Skip to content

Instantly share code, notes, and snippets.

View ClementRoyer's full-sized avatar
🚀

Clément Royer ClementRoyer

🚀
View GitHub Profile
@ClementRoyer
ClementRoyer / poc-mpg-auth.js
Created October 9, 2025 20:51
POC MPG sign-in with Ligue1 OAuth
const axios = require('axios');
const crypto = require('crypto');
async function authenticateMPG(email, password) {
const amplitudeId = crypto.randomUUID();
const validate = (status) => status < 400;
// Step 1: Initiate auth with MPG
const formData = new URLSearchParams({ email, password });
const auth = await axios.post(
@ClementRoyer
ClementRoyer / icontabbarheaderselectiononscroll.md
Created November 5, 2024 14:04
Update IconTabBarHeader selection on scroll

Update IconTabBarHeader selection on scroll

VIEW

                    <VBox class="topSection"
                      width="100%"
                      height="100%">
                        <IconTabHeader id="projectInfoIconTabBar"
@ClementRoyer
ClementRoyer / Chat.fragment.xml
Last active July 14, 2025 22:15
Sample of WebSocket connexion from FIORI (sapui5) to SAP using Abap Push Channel and Abap Messaging Channel (APC/AMC)
<core:FragmentDefinition
xmlns:core="sap.ui.core"
xmlns="sap.m">
<VBox width="100%" height="100%"
renderType="Bare">
<!-- Toolbar spacer -->
@ClementRoyer
ClementRoyer / sapui5-snippets.code-snippets
Created May 9, 2024 18:26
Snippets for SAPUI5 (Fiori)
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
"UI5: Function": {
"scope": "javascript,typescript",
CLASS zcl_zc_ext_purrequisit_mpc_ext DEFINITION
PUBLIC
INHERITING FROM zcl_zc_ext_purrequisit_mpc
CREATE PUBLIC .
PUBLIC SECTION.
METHODS define
REDEFINITION.
PROTECTED SECTION.
PRIVATE SECTION.
@ClementRoyer
ClementRoyer / it_column_exist_in_table.abap
Created May 4, 2022 13:55
Check if value inside a column of an internal table exist in a sap table (ex: check vendors from an excel file)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"" check it column value exist in sap
TYPES: BEGIN OF s_struct,
vendor TYPE lifnr,
END OF s_struct.
DATA: sap_data TYPE HASHED TABLE OF s_struct WITH UNIQUE KEY vendor.
DATA: data_to_verify TYPE TABLE OF s_struct.
@ClementRoyer
ClementRoyer / amazon-lp-from-leetcode.txt
Created October 22, 2020 17:44 — forked from by12380/amazon-lp-from-leetcode.txt
Amazon LP Questions from LeetCode Interview Experiences
1.https://interviewgenie.com/blog-1/category/Amazon+interviews
2.https://www.youtube.com/channel/UCw0uQHve23oMWgQcTTpgQsQ/playlists
3.https://medium.com/@scarletinked/are-you-the-leader-were-looking-for-interviewing-at-amazon-8301d787815d
Tell me about a situation where you had a conflict with someone on your team. What was it about? What did you do? How did they react? What was the outcome?
Give an example of when you saw a peer struggling and decided to step in and help. What was the situation and what actions did you take? What was the outcome?
Tell me about a time you committed a mistake?
Tell me about a time when your earned your teammate's trust?