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
language: python | |
python: "3.8" | |
env: | |
global: | |
# GITHUB_TOKEN to open PR | |
- secure: "XXX" | |
# AWS ACCESS KEY | |
- secure: "XXX" | |
# AWS SECRET KEY |
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
function open_pull_requests() { | |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | |
STAGES=( dev pre pro ) | |
for STAGE in "${STAGES[@]}"; do | |
# Run CDK diff | |
cdk diff -c stage=${STAGE} | tee cdk_diff_${STAGE}.txt | |
# Prepare PR message | |
read -r -d '' MESSAGE <<-EOM | |
> :warning: **Please review this changes before merging.** |
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
language: python | |
python: "3.8" | |
stages: | |
- test | |
before_install: | |
- npm i -g aws-cdk@1.76.0 # Install CDK | |
- pip install -r requirements.txt --use-feature=2020-resolver # Download CDK python depedencies | |
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
{ | |
"trigger_url": "https://api.runscope.com/radar/e9283ad0-af77-45b4-81ee-0e59bd5ff932/trigger", | |
"name": "SCIM 2.0 SPEC Test", | |
"version": "1.0", | |
"steps": [ | |
{ | |
"url": "{{SCIMBaseURL}}/Users?count=1&startIndex=1", | |
"variables": [ | |
{ | |
"source": "response_json", |
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
api-scenario run \ | |
--scenario=scim-scenario.json \ | |
--variable="auth:token" \ | |
--variable="SCIMBaseURL:http://localhost:3000"\ | |
--variable="InvalidUserEmail:invalid@invalid.com" \ | |
--variable="UserIdThatDoesNotExist:id_invalid" \ | |
--variable="randomEmail:random@valid.com" \ | |
--variable="randomUsername:randomUsername" \ | |
--variable="randomGivenName:randomGivenName" \ | |
--variable="randomFamilyName:randomFamilyName" \ |
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
package com.tpoi.monitoring.service; | |
import java.time.Instant; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
/** | |
* HitCounter count the number of request in a specific range of time. | |
*/ |
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
{ "schemas": | |
["urn:ietf:params:scim:api:messages:2.0:PatchOp"], | |
"Operations":[ | |
{ | |
"op":"add", | |
"path":"members", | |
"value":[ | |
{ | |
"display": "Babs Jensen", | |
"$ref": |
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
const {compileSorter} = require('scim-query-filter-parser'); | |
const {performance} = require('perf_hooks'); | |
const request = require('request'); | |
const scimUsersFile = 'https://gist.githubusercontent.com/thomaspoignant/471a159501bd4eb7b3499d38f81f927d/raw/bac8e75141e24adf4a372c56ebf0adc78578058f/scimUsers.json'; | |
request.get(scimUsersFile, function (error, response, body) { | |
if (!error && response.statusCode === 200) { | |
const scimUsers = JSON.parse(body); |
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
[ | |
{ | |
"schemas": [ | |
"urn:ietf:params:scim:schemas:core:2.0:User" | |
], | |
"id": "id_1", | |
"userName": "thomas", | |
"name": { | |
"familyName": "Poignant", | |
"givenName": "Thomas" |
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
#!/bin/bash | |
BITBUCKET_BASE_URL=https://bitbucket.xxxx.fr | |
CURL_RESULT=$(curl -u $USER:$PASSWORD $BITBUCKET_BASE_URL/rest/api/1.0/projects\?limit\=100 | jq -c .values) | |
FOLDERS=$(echo $CURL_RESULT | jq -r '.[]' | jq -r .key) | |
for KEY in $FOLDERS | |
do | |
mkdir $KEY | |
cd $KEY | |
REPO_IN_FOLDER=$(curl -u $USER:$PASSWORD $BITBUCKET_BASE_URL/rest/api/1.0/projects/$KEY/repos\?limit\=100 | jq -r .values[] | jq .links | jq -c '.clone[]' | jq -r .href | grep https) |