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
var now = new Date(); | |
db.users.find().forEach( | |
function(user) { | |
if (user._id === "admin") { | |
print("admin found") | |
var exists = db.memberships.find({_id: { userId : "admin", referenceId : "DEFAULT", referenceType : "MANAGEMENT"}}).count() > 0; | |
print("Does admin already has new memberships? " + exists) | |
if (!exists) { | |
db.memberships.insert([ | |
{ |
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
docker run -p 9300:9300 \ | |
-p 9200:9200 \ | |
-e "http.host=0.0.0.0" \ | |
-e "transport.host=0.0.0.0" \ | |
-e 'xpack.security.enabled=false' \ | |
-e 'xpack.monitoring.enabled=false' \ | |
-e 'cluster.name=elasticsearch' \ | |
-d \ | |
--name es5 \ | |
docker.elastic.co/elasticsearch/elasticsearch:5.4.1 |
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
[ | |
{ | |
"operation": "shift", | |
"spec": { | |
"components": { | |
"*": { | |
"name": "[&1].key", | |
"version": "[&1].value" | |
} | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>io.gravitee</groupId> | |
<artifactId>download</artifactId> | |
<version>1.0-SNAPSHOT</version> |
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
#!python3 | |
# -*- coding:utf-8 -*- | |
import getopt | |
import sys | |
import glob | |
import os.path | |
import hashlib | |
workdir = None |
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
#!python2 | |
# -*- coding:utf-8 -*- | |
import getopt | |
import sys | |
import glob | |
import os | |
import os.path | |
import hashlib | |
workdir = None |
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
""" | |
mode debug des logs : $.proxy.loggingMode=CLIENT_PROXY | |
health present : $.services.health-check | |
presence de policy : $.paths.*[*].transform-headers | |
presence du failover : $.proxy.failover | |
""" | |
import sys | |
import requests | |
from jsonpath_rw import parse | |
import getopt |
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
{ | |
"baseURL": "{{getv "/baseUrl" "http://localhost:8083/management/"}}", | |
"company": { | |
"name": "{{getv "/company/name" "Gravitee.io"}}" | |
}, | |
"portalTitle": "{{getv "/portalTitle" "Gravitee.io Portal"}}", | |
"managementTitle": "{{getv "/managementTitle" "Gravitee.io Management"}}", | |
"devMode": {{getv "/devMode" "false"}}, |
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
[template] | |
prefix = "/graviteeio/apim/webui" | |
src = "constants.json.tmpl" | |
dest = "/var/www/html/constants.json" | |
keys = [ | |
"/baseUrl", | |
"/company/name", | |
"/portalTitle", | |
"/managementTitle", | |
"/devMode", |
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
import sys | |
import requests | |
import getopt | |
baseURL = "" | |
headers = { | |
"Content-Type": "application/json", | |
"Authorization": "", | |
} |