Skip to content

Instantly share code, notes, and snippets.

View dsmiley's full-sized avatar

David Smiley dsmiley

View GitHub Profile
@dsmiley
dsmiley / gist:4c5d316707cf05e2cb82
Last active August 29, 2015 14:05 — forked from michalbcz/gist:3916997
Embedding groovy Console
def c = new groovy.ui.Console(getClass().classLoader, new Binding(project:project))
c.run()
def doneLatch = new java.util.concurrent.CountDownLatch(1)
c.frame.windowClosed = {doneLatch.countDown()}
doneLatch.await()
@dsmiley
dsmiley / gist:2583730
Created May 3, 2012 06:20 — forked from philk/gist:1238525
jconsole via socks proxy
function jc_remote {
jmx_host=$1
jmx_port=${2:-5000}
proxy_port=${3:-8123}
echo "Connecting jconsole to $jmx_host:$jmx_port via SOCKS proxy using local port $proxy_port"
ssh -ND $proxy_port $jmx_host &
jconsole -J-DsocksProxyHost=localhost -J-DsocksProxyPort=${proxy_port} \
service:jmx:rmi:///jndi/rmi://localhost:${jmx_port}/jmxrmi
kill %1