Skip to content

Instantly share code, notes, and snippets.

@danischroeter
danischroeter / SystemTimeAOPTest.scala
Last active September 6, 2019 09:22
bytebuddy instrumentation of method caller
object EvilCode {
def time = System.currentTimeMillis()
}
object Thrower {
def throwException(): Long = {
throw new IllegalArgumentException("illegal access to system time")
}
}
@danischroeter
danischroeter / etc_sysconfig_tca
Created November 18, 2016 13:01
Teamcity Server / Agent with SystemD in CentOs
JAVA_HOME=/usr/java/default
JAVA_OPTS="-server -Dfile.encoding=utf-8 -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -Djava.awt.headless=true"
TEAMCITY_AGENT_MEM_OPTS="-Xmx3072m"
TEAMCITY_AGENT_OPTS=""
# TEAMCITY_LAUNCHER_OPTS Set agent launcher JVM options
# TEAMCITY_AGENT_PREPARE_SCRIPT name of a script to execute before start/stop