Skip to content

Instantly share code, notes, and snippets.

View NicolasGeraud's full-sized avatar

Nicolas Géraud NicolasGeraud

View GitHub Profile
@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 });
}
@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 / 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 / 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}
# 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.
node("Agent001") {
def server
def buildInfo
stage ('Checkout') {
checkout scm
}
stage ('Artifactory configuration') {
server = Artifactory.server "sprint0-artifactory"