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 | |
docker exec $1 ps -deaf | |
echo -n "PID for Java: " | |
read pid | |
docker exec $1 jcmd $pid GC.heap_dump /tmp/docker.hprof | |
docker cp $1:/tmp/docker.hprof . | |
docker exec $1 rm /tmp/docker.hprof |
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 | |
# these action should be run with sudo level | |
# activate management plugin first | |
rabbitmq-plugins enable rabbitmq_management | |
# restart the rabbitmq-server | |
service rabbitmq-server restart | |
# download the rabbitmqadmin script locally |
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
Session session = getSession(); | |
//update | |
Statement exampleQuery = QueryBuilder.update("keyspace","table").with(QueryBuilder.set("height", 180)) | |
.and(QueryBuilder.set("width", 300)).where(QueryBuilder.eq("id", 5145924587302797538L)); | |
session.execute(exampleQuery); | |
//insert | |
exampleQuery= QueryBuilder.insertInto("keyspace","table").value("id",12245L) | |
.value("data",ByteBuffer.wrap(new byte[]{0x11})).ifNotExists(); |
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
/** | |
* Unescapes a string that contains standard Java escape sequences. | |
* <ul> | |
* <li><strong>\b \f \n \r \t \" \'</strong> : | |
* BS, FF, NL, CR, TAB, double and single quote.</li> | |
* <li><strong>\X \XX \XXX</strong> : Octal character | |
* specification (0 - 377, 0x00 - 0xFF).</li> | |
* <li><strong>\uXXXX</strong> : Hexadecimal based Unicode character.</li> | |
* </ul> |