经过验证目前mysql-5.6.51是比较容易编译的,但由于数据库是5.7以上,故若想编译5.7,在window中,难道相对有点大,建议直接下载预编译库包,其预编译库是静态方式编译,故比较容易被不同版本的VC链接。
腾迅Docker加速
因为docker版本比较旧,故需要加入新的源:
第一步:yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
第二步:yum install docker-ce -y
[root@VM-24-8-centos ~]# cat /etc/docker/daemon.json
{
"registry-mirrors": [
"https://mirror.ccs.tencentyun.com"
]
}
CMake的64脚本编译
call “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat” amd64
call “E:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin\qtenv2.bat”
set path_script=%~dp0
cd /D %path_script%
rd /s/q “%path_script%\build”
rd /s/q “%path_script%\winx”
md “%path_script%\build”
cd /D “%path_script%\build”
cmake -G “Visual Studio 15 2017″ -A x64 -DCMAKE_DEBUG_POSTFIX=”d” -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=%path_script%/winx ../qmqtt-1.0.2
cmake –build . –config Debug && cmake –build ./ –config Debug –target install
cmake –build . –config Release && cmake –build ./ –config Release –target install
单片机的支持包
https://www.keil.com/product/
https://www.keil.arm.com/devices/
真彩色测试
awk 'BEGIN{ s="/\\/\\/\\/\\/\\"; s=s s s s s s s s; for (colnum = 0; colnum<77; colnum++) { r = 255-(colnum*255/76); g = (colnum*510/76); b = (colnum*255/76); if (g>255) g = 510-g; printf "\033[48;2;%d;%d;%dm", r,g,b; printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; printf "%s\033[0m", substr(s,colnum+1,1); } printf "\n"; }' ========================== #!/bin/bash # Based on: https://gist.github.com/XVilka/8346728 and https://unix.stackexchange.com/a/404415/395213 awk -v term_cols="${width:-$(tput cols || echo 80)}" -v term_lines="${height:-1}" 'BEGIN{ s="/\\"; total_cols=term_cols*term_lines; for (colnum = 0; colnum<total_cols; colnum++) { r = 255-(colnum*255/total_cols); g = (colnum*510/total_cols); b = (colnum*255/total_cols); if (g>255) g = 510-g; printf "\033[48;2;%d;%d;%dm", r,g,b; printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; printf "%s\033[0m", substr(s,colnum%2+1,1); if (colnum%term_cols==term_cols) printf "\n"; } printf "\n"; }'
设置cmake的find_package到指定路径找包
https://blog.csdn.net/weixin_43742643/article/details/113858915
有3种方法:
1.设置库的DIR,如果find_package(Abc),则如下设置:
set(Abc_DIR ~/abc-cpp-path)
find_package(Abc REQUIRED)
2.设置PATHS
set(Abc required PATHS ~/abc-cpp-path)
3.指定CMAKE_PREFIX_PATH
cmake -DCMAKE_PREFIX_PATH="~/abc-cpp-path"
Crashpad的错误跟踪开发包
Crashpad
OpenCPN海图分析
工具栏类:MUIBar
地图右键菜单:CanvasPopupMenu(int x, int y, int seltype)
地图缩放函数:ZoomCanvasSimple
键盘交互方式优化
键盘与密码是几乎重复的,可按以下方式开启键盘交互。
修改sshd_config配置文件,sudo vim /etc/ssh/sshd_config。
PasswordAuthentication no
SSHD的二次验证
仅Ubuntu 20.04的版本,测试通过。https://zhuanlan.zhihu.com/p/440818672?utm_id=0
第一步:配置PublicKey方式,并验证通过。
第二步:按照上述URL配置,在启用以下指令时,确保时间已经同步。
ntpdate pool.ntp.org #确保时间同步
sudo apt install -y libpam-google-authenticator
google-authenticator -t -f -d -w 3 -e 10 -r 3 -R 30
# 启用两步验证
$ sudo vim /etc/pam.d/sshd
# @include common-auth # 将禁用密码身份验证
auth required pam_google_authenticator.so # 禁用密码验证
# 修改SSH配置文件
$ sudo vim /etc/ssh/sshd_config
Port 1090
ChallengeResponseAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
AuthenticationMethods publickey,keyboard-interactive
# 重启SSH服务
$ sudo systemctl restart ssh.service
键盘交互 http://www.kxtry.com/archives/3980
SSH服务端检查服务支持的验证方式如下:
执行命令:sudo sshd -T
port 22
addressfamily any
listenaddress [::]:22
listenaddress 0.0.0.0:22
usepam yes
logingracetime 120
x11displayoffset 10
maxauthtries 6
maxsessions 10
clientaliveinterval 0
clientalivecountmax 3
streamlocalbindmask 0177
permitrootlogin without-password
ignorerhosts yes
ignoreuserknownhosts no
hostbasedauthentication no
hostbasedusesnamefrompacketonly no
pubkeyauthentication yes
kerberosauthentication no
kerberosorlocalpasswd yes
kerberosticketcleanup yes
gssapiauthentication no
gssapicleanupcredentials yes
gssapikeyexchange no
gssapistrictacceptorcheck yes
gssapistorecredentialsonrekey no
gssapikexalgorithms gss-gex-sha1-,gss-group14-sha1-
passwordauthentication yes
kbdinteractiveauthentication no
challengeresponseauthentication no
printmotd no
printlastlog yes
x11forwarding yes
x11uselocalhost yes
permittty yes
permituserrc yes
strictmodes yes
tcpkeepalive yes
permitemptypasswords no
compression yes
gatewayports no
usedns no
allowtcpforwarding yes
allowagentforwarding yes
disableforwarding no
allowstreamlocalforwarding yes
streamlocalbindunlink no
fingerprinthash SHA256
exposeauthinfo no
pidfile /run/sshd.pid
xauthlocation /usr/bin/xauth
ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
banner none
forcecommand none
chrootdirectory none
trustedusercakeys none
revokedkeys none
securitykeyprovider internal
authorizedprincipalsfile none
versionaddendum none
authorizedkeyscommand none
authorizedkeyscommanduser none
authorizedprincipalscommand none
authorizedprincipalscommanduser none
hostkeyagent none
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
casignaturealgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256
hostbasedacceptedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
hostkeyalgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
pubkeyacceptedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
rdomain none
loglevel INFO
syslogfacility AUTH
authorizedkeysfile .ssh/authorized_keys .ssh/authorized_keys2
hostkey /etc/ssh/ssh_host_rsa_key
hostkey /etc/ssh/ssh_host_ecdsa_key
hostkey /etc/ssh/ssh_host_ed25519_key
acceptenv LANG
acceptenv LC_*
authenticationmethods any
subsystem sftp /usr/lib/openssh/sftp-server
maxstartups 10:30:100
permittunnel no
ipqos lowdelay throughput
rekeylimit 0 0
permitopen any
permitlisten any
permituserenvironment no
pubkeyauthoptions none