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
http://cronus.allowed.org works for me, 2018.1.6 |
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
#!/bin/bash | |
# Usage: ./hgupdate.sh /path/to/repositories | |
# Trap Ctrl + C command and exit the script. | |
trap 'exit 1' 2 | |
# Strip trailing slashes from argument and test it's a directory. | |
TARGET=${1%/} | |
if [[ ! -d $TARGET ]]; then | |
echo "Please pass in a directory path." |
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
#!/bin/bash | |
# General settings | |
username="bitbucket username" | |
password="bitbucket password" | |
tmp_local_repo_path=/tmp/bb_migration | |
# Define repository mappings: repos["hg_repo_name"]="new_git_repo_name" | |
declare -A repos | |
#repos["hg_repo_1"]="new_git_repo_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
void cleanThreadLocalsOfCurrentThread() { | |
try { | |
// Get a reference to the thread locals table of the current thread | |
Thread thread = Thread.currentThread(); | |
Field threadLocalsField = Thread.class.getDeclaredField("threadLocals"); | |
threadLocalsField.setAccessible(true); | |
Object threadLocalTable = threadLocalsField.get(thread); | |
// Get a reference to the array holding the thread local variables inside the | |
// ThreadLocalMap of the current thread |
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
private void cleanUpJythonMess() { | |
try { | |
//Jython stores a reference to the system state on a thread local, when the system state is closed | |
//Jython does not remove the TL so... hey presto a leak | |
//The only way we can remove it is to use reflection to manually remove the tl entry | |
//Nice huh!? | |
//See https://github.com/vert-x/vert.x/issues/417 for more info | |
//Also http://bugs.jython.org/issue1327 |
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
#!/bin/python2.6 | |
import os | |
import sys | |
import shutil | |
import subprocess | |
import time | |
from optparse import OptionParser | |
JAVA_HOME="/usr/lib/jvm/java-1.6.0-openjdk/" |
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
### java -jar | |
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar | |
### Maven | |
Debug Spring Boot app with Maven: | |
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001" |
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
input { | |
file { | |
path => /tmp/application.log | |
codec => multiline { | |
pattern => "^(%{TIMESTAMP_ISO8601})" | |
negate => true | |
what => "previous" | |
} | |
} | |
} |
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
input { | |
file { | |
type => "java" | |
tags => [ "fornax-data-share-eureka" ] | |
# Logstash insists on absolute paths... | |
path => "D:/fornax-data-share-runtime/eureka/fornax-data-share-eureka.log" | |
codec => multiline { | |
pattern => "^%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME}.*" | |
negate => "true" | |
what => "previous" |
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
package demo; | |
import java.io.Serializable; | |
import java.security.Principal; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.UUID; |