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
#!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
<?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
[ | |
{ | |
"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
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
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
for f in *;do if [[ -d $f ]]; then pushd $f 2>&1 1>/dev/null; echo "\n====== $f" && gfa && gco master && gm; popd 2>&1 1>/dev/null; fi; done; | |
for f in *;do if [[ -d $f ]]; then pushd $f 2>&1 1>/dev/null; if [[ -e "pom.xml" ]]; then echo "\n====== $f" && mvnci; fi; popd 2>&1 1>/dev/null; fi; done; |
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
git filter-branch -f --env-filter ' | |
LANG=en_US.utf8 | |
original_git_date="$GIT_COMMITTER_DATE" | |
cutDate=$(echo $original_git_date | rev | cut -d" " -f2 |rev) | |
hour=$(date --date "$cutDate" +%H) | |
day=$(date --date "$cutDate" +%u) | |
new_git_date=$(date --date "$cutDate" +"%a %b %d %T %Y") | |
if [ "$hour" -gt "9" ] && [ "$hour" -lt "19" ] && [ "$day" -lt "6" ] | |
then | |
new_git_date=$(date --date "$new_git_date 9 hours" +"%a %b %d %T %Y %z") |
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
for (item in Jenkins.instance.items) { | |
if ( ! item.disabled ) { | |
for( trigger in item.triggers) { | |
if(trigger.value.spec != "") { | |
println "${item.name} ${trigger.value.spec}" | |
} | |
} | |
} | |
} |
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 subprocess | |
import requests | |
import os | |
import sys | |
if len(sys.argv) < 2: | |
print("") | |
print("Usage: sync_gravitee.py [https | ssh]") | |
print(" clone mode : https or ssh") | |
sys.exit(1) |