git checkout --orphan newbranch
git rm -rf .
touch .gitignore
git commit -m "create an empty newbranch"
git push -u origin newbranch
This file contains 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
最近从生产库dump一个几十万的表,import到本地库时,排序查询会报以下错误: | |
A temporary table could not be created because there is no available system temporary table space that has a compatible page size.. SQLCODE=-1585, SQLSTATE=54048, DRIVER=3.63.123 | |
解决办法: | |
db2 "create bufferpool ibmdefault8k IMMEDIATE SIZE 5000 PAGESIZE 16K" | |
db2 "CREATE TEMPORARY TABLESPACE mytmptbs PAGESIZE 16K MANAGED BY SYSTEM USING ('/home/db2inst1/tmp_tbs1') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT16K OVERHEAD 24.10 TRANSFERRATE 0.90 DROPPED TABLE RECOVERY OFF" |
This file contains 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
1. root登录mysql出错 | |
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) | |
由于需要注意5.7.* 之后的版本,需要找到初始密码,登录后修改密码: | |
``` | |
$ sudo grep 'temporary password' /var/log/mysqld.log | |
$ mysql -uroot -p |
This file contains 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
openssl req -x509 -newkey rsa:1024 -keyout logstash.key -out logstash.crt -days 365 -nodes |
This file contains 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
Creating an SSL Certificate and Certificate Key | |
``` | |
bash$ openssl req -x509 -new -out $HOST.crt -keyout $HOST.key -days 365 | |
``` | |
Creating an SSL Certificate Signing Request | |
``` | |
bash$ openssl req -new -key $HOST.key -out $HOST.csr | |
``` |
This file contains 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
1. download eclipse IDE for scala from http://scala-ide.org/ | |
2. install sbt from http://www.scala-sbt.org to build scala |
This file contains 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
GRANT DBADM WITH DATAACCESS WITH ACCESSCTRL ON DATABASE TO USER new_user; |
This file contains 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
1. Issue "db2move <dbname> export". This will create several files, including a db2move.lst file, in your current directory. | |
2. Change the existing schema name with new schema name with ":1,$ s/<SEARCH>/<REPLACE>/g" in db2move.lst. | |
3. Issue "db2move <dbname> import" (to import the data into the tables.) |
=== remove single line comment
eg: <!-- -->
sed -i '/<!--.*-->/ d' file
===
NewerOlder