Skip to content

Instantly share code, notes, and snippets.

View NicolasGeraud's full-sized avatar

Nicolas Géraud NicolasGeraud

View GitHub Profile
node("Agent001") {
def server
def buildInfo
stage ('Checkout') {
checkout scm
}
stage ('Artifactory configuration') {
server = Artifactory.server "sprint0-artifactory"
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
@NicolasGeraud
NicolasGeraud / gravitee.yml
Created October 25, 2018 12:01
gateway hybrid server
http:
port: 28082
management:
type: mongodb
mongodb:
dbname: ${ds.mongodb.dbname}
host: ${ds.mongodb.host}
port: ${ds.mongodb.port}
@NicolasGeraud
NicolasGeraud / gravitee.yml
Created October 25, 2018 11:59
gateway hybrid client
# Gateway HTTP server
http:
port: 38082
management:
type: http
http:
url: http://localhost:28292/
keepAlive: true
idleTimeout: 30000
@NicolasGeraud
NicolasGeraud / user.email.unanon.js
Created October 11, 2018 08:33
unanonymize user emails
db.users.find().forEach(
function(user) {
if (user.email && user.email.endsWith(".anon")) {
var newEmail = user.email.slice(0, user.email.length - 5)
print(user.email + " => " + newEmail);
db.users.updateOne(
{ _id: user._id },
{ $set:{ 'email': newEmail } },
{ upsert: false });
}
@NicolasGeraud
NicolasGeraud / user.email.anon.js
Last active October 11, 2018 08:33
anonymize user emails
db.users.find().forEach(
function(user) {
if (user.email) {
var newEmail = user.email + '.anon'
print(user.email + " => " + newEmail);
db.users.updateOne(
{ _id: user._id },
{ $set:{ 'email': newEmail } },
{ upsert: false });
}
import sys
import requests
import getopt
baseURL = ""
headers = {
"Content-Type": "application/json",
"Authorization": "",
}
[template]
prefix = "/graviteeio/apim/webui"
src = "constants.json.tmpl"
dest = "/var/www/html/constants.json"
keys = [
"/baseUrl",
"/company/name",
"/portalTitle",
"/managementTitle",
"/devMode",
@NicolasGeraud
NicolasGeraud / constants.json.tmpl
Last active May 14, 2018 08:30
constants.json for confd
{
"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"}},
@NicolasGeraud
NicolasGeraud / graviteeio-search.py
Last active June 22, 2018 09:46
[Gravitee.io - APIM] find apis
"""
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