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 | |
tar zxvf mysql-5.7.7-labs-json-linux-el6-x86_64.tar.gz | |
path=`pwd` | |
root_path=$path/mysql-5.7.7-labs-json-linux-el6-x86_64 | |
mkdir /opt/mysql | |
mkdir /opt/mysql/mysql | |
mkdir /opt/mysql/mysql/data | |
useradd mysql |
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 | |
ps -A | grep MPlayerX | grep Application | awk {'print $1'} | xargs kill | |
if [ "$1" == "" ]; then | |
echo "Positional parameter 1 is empty" | |
exit 0 | |
fi | |
if [[ $1 != /* ]];then | |
path=`pwd` |
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 | |
#for loop in one line | |
for i in {1..10};do `nohup echo $i 0<&- &>>~/out.txt &` ;done |
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
<?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> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
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> |
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
—– 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 |
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
获取任意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 "" |
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
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)}' |
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
%s/\(addTenant(.*,\d*,\d*,\)\(\d*,\)\(\d*,\d*\)/\1\3/g |
OlderNewer