Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
| # Taken from https://forums.aws.amazon.com/thread.jspa?messageID=332091 | |
| sudo su - | |
| cd /usr/local/bin | |
| mkdir ffmpeg | |
| cd ffmpeg | |
| wget http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz | |
| tar -xzf ffmpeg.static.64bit.latest.tar.gz |
| #!/bin/bash | |
| # Author : Hemanth.HM | |
| # Email : hemanth[dot]hm[at]gmail[dot]com | |
| # License : GNU GPLv3 | |
| # | |
| function useage() | |
| { | |
| cat << EOU | |
| Useage: bash $0 <path to the binary> <path to copy the dependencies> |
| %s/\(addTenant(.*,\d*,\d*,\)\(\d*,\)\(\d*,\d*\)/\1\3/g |
| git log --numstat --pretty="%H" 881579dd2569369f92104737d913629d4d6a6db5..branch_3.0.1 | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d,-%d\n",plus,minus)}' | |
| git log --numstat --pretty="%H" 434868bb^..HEAD | grep bks | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' |
| 获取任意https的证书并加入java keystore | |
| openssl s_client -connect 192.168.1.1:443 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > xxx.cert | |
| keytool -import -v -trustcacerts -file /home/xxx/xxx.cert -keystore "$JAVA_HOME/jre/lib/security/cacerts" -keypass "" |
| —– BEGIN LICENSE —– | |
| TwitterInc | |
| 200 User License | |
| EA7E-890007 | |
| 1D77F72E 390CDD93 4DCBA022 FAF60790 | |
| 61AA12C0 A37081C5 D0316412 4584D136 | |
| 94D7F7D4 95BC8C1C 527DA828 560BB037 | |
| D1EDDD8C AE7B379F 50C9D69D B35179EF | |
| 2FE898C4 8E4277A8 555CE714 E1FB0E43 |
| import java.util.zip.Checksum; | |
| /** | |
| * A pure-java implementation of the CRC32 checksum that uses | |
| * the same polynomial as the built-in native CRC32. | |
| * <p> | |
| * This is to avoid the JNI overhead for certain uses of Checksumming | |
| * where many small pieces of data are checksummed in succession. | |
| * <p> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| <?xml version="1.0"?> | |
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
| <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
| <appender name="PHYSICAL_SLOW" | |
| class="org.apache.log4j.FileAppender"> | |
| <param name="File" value="/home/fooling/slow_slow.log"/> | |
| <param name="Threshold" value="info"/> | |
| <layout class="org.apache.log4j.PatternLayout"> | |
| <param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n"/> | |
| </layout> |