春有百花秋有月

春有百花秋有月

夏有凉风冬有雪

share music - Una Mattina

share mu

sic - Una Mattina

阅读剩余部分 →

docker & docker-compose install

how to install and use docker
how to install and use docker compose

    sudo apt update
    curl -fsSL https://get.docker.com/ | sh
    sudo systemctl start docker
    sudo systemctl status docker
    sudo systemctl enable docker

docker-compose:

Check the Releases and if necessary, update it in the command below:

      sudo curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

或者

阅读剩余部分 →

linux vim command

k 上 h l 左 右 j 下

x 删除当前光标下的字符
dw 删除光标之后的单词剩余部分。
d$ 删除光标之后的该行剩余部分。
D 从当前位置删除到行尾 (“d$” 的缩写)
dd 删除当前行。
db 从当前位置删除到前一个单词的开头
dw 从当前位置删除到下一个单词开头

c 功能和d相同,区别在于完成删除操作后进入INSERT MODE
cc 也是删除当前行,然后进入INSERT MODE

u 撤销最后执行的命令
U 修正之前对该行的操作
Ctrl+R Redo
选块 先用v,C-v,V选择一块,然后用y复制,再用p粘贴。
yy 复制当前整行
nyy 复制当前行开始的n行内容

通过vi的命令模式输入:set nu,这时候在文件中就会显示行数。(不显示行号用 :set nonu )

阅读剩余部分 →

Linux Server init

绑定原IP或者使用新的IP,如绑定原IP需要先将原IP在原实例中解绑,然后在HOME-Networking中将原IP绑定到新的实例中。

    sudo su

4.修改管理员和新建用户

    passwd root
    useradd appadmin
    passwd appadmin

5.SSH配置:

    vim /etc/ssh/sshd_config
        - PermitRootLogin ~~yes~~                    //不允许root登录      
        - PasswordAuthentication yes                 //设置是否使用口令验证
    service sshd reload

6.升级软件和系统内核(Centos或Debian):

    yum -y update 
    apt -y update
    apt -y upgrade

7.常用工具安装:

    apt -y install lrzsz
    apt install net-tools
    apt install lsof
    vi /root/.bashrc
     . /root/.bashrc

8.安装docker|nginx

docker:

    curl -fsSL https://get.docker.com/ | sh
    sudo systemctl start docker
    sudo systemctl status docker
    sudo systemctl enable docker

docker-compose:
Check the Releases and if necessary, update it in the command below:

阅读剩余部分 →

update hosts for github

在本机hosts文件中配置以下内容,可手动访问结尾处地址进行更新:

Update url:

Star me:

GitHub520 Host Start

140.82.114.26                 alive.github.com
140.82.113.5                  api.github.com
185.199.110.153               assets-cdn.github.com
185.199.108.133               avatars.githubusercontent.com
185.199.108.133               avatars0.githubusercontent.com
185.199.108.133               avatars1.githubusercontent.com
185.199.108.133               avatars2.githubusercontent.com
185.199.108.133               avatars3.githubusercontent.com
185.199.108.133               avatars4.githubusercontent.com
185.199.108.133               avatars5.githubusercontent.com
185.199.108.133               camo.githubusercontent.com
140.82.113.22                 central.github.com
185.199.108.133               cloud.githubusercontent.com
140.82.113.9                  codeload.github.com
140.82.113.21                 collector.github.com
185.199.108.133               desktop.githubusercontent.com
185.199.108.133               favicons.githubusercontent.com
140.82.113.4                  gist.github.com
54.231.236.113                github-cloud.s3.amazonaws.com
54.231.202.153                github-com.s3.amazonaws.com
52.216.44.33                  github-production-release-asset-2e65be.s3.amazonaws.com
54.231.161.177                github-production-repository-file-5c1aeb.s3.amazonaws.com
54.231.130.81                 github-production-user-asset-6210df.s3.amazonaws.com
192.0.66.2                    github.blog
140.82.112.3                  github.com
140.82.113.18                 github.community
185.199.109.154               github.githubassets.com
151.101.65.194                github.global.ssl.fastly.net
185.199.110.153               github.io
185.199.108.133               github.map.fastly.net
185.199.110.153               githubstatus.com
140.82.113.26                 live.github.com
185.199.108.133               media.githubusercontent.com
185.199.108.133               objects.githubusercontent.com
13.107.42.16                  pipelines.actions.githubusercontent.com
185.199.108.133               raw.githubusercontent.com
185.199.108.133               user-images.githubusercontent.com
13.107.226.40                 vscode.dev
140.82.113.21                 education.github.com
阅读剩余部分 →

数据库错误socketTimeout&Can 't connect to X11&connection reset

2023-01-08
多表联接复杂SQL在集群环境查询效率很低,接口会超时的问题。

解决:2023-01-12号左右,人大金仓负责更新相关索引解决了。

2023-01-09
改数据库连接配置

    jdbc.url=jdbc:kingbase8://x.x.xx.x:54321/xxdb?currentSchema=public&ConfigurePath=/coredata/promo_config/myconfig/jdbc.conf

2023-01-10
新门户首页,登录成功之后访问业务动态--更多时,页面偶尔出现卡住,空白页

面,无响应结果,等待时间过长之后报错:socketTimeout

Ps:此问题持续时间较长,后续是修改索引或者修改防火墙配置好的未知。

2023-01-10
附件预览出错,提示:X11
(ERROE] java.awt.AWTError: Can 't connect to X11' window server using localhost:10.0 ' as ...
 
解决:
/bin/catalina.sh 中所有的(请注意,是所有)-Dcatalina.home="$CATALINA_HOME" /
下面都加上了-Djava.awt.headless=true

2023-01-13
更新人大金仓数据库驱动至:kingbase8-8.6.0.jar

阅读剩余部分 →

ffmpeg commond

视频文件简单转换成另一个格式的视频文件, 会默认使用H264编码格式输出视频文件.

ffmpeg -i input.avi output.mkv
  • 把一个视频文件my.avi和一个声音文件my.mp3合并成一个音视频文件my.mkv

    ffmpeg –i my.avi –i my.mp3 –vcodec copy –acodec copy my.mkv
  • 把音视频文件my.mkv里的声音数据去掉生成只有图像的my.avi文件, 并使用h264编码

    ffmpeg -i my.mk
    <!--more-->
    v -vcodec h264 -an my.avi
  • 把音视频文件my.mkv里的图像数据去掉生成只有声音的my.aac文件, 并使用aac编码

    ffmpeg -i my.mkv -acodec aac -vn my.aac
  • 把多个图像文件使用h264编码封装成avi文件,如有my0.jpg, my1.jpg ... my99.jpg

    
    ffmpeg -i my%d.jpg  -vcodec h264 my.avi
    ```xshell
  • 指定音视频文件把1分30秒到5分20秒的内容输出到另一个文件

    ffmpeg -ss 00:01:30 -i my.avi -to 00:05:20 -vcodec copy -acodec copy my.mkv
  • 把视频文件里内容输出成多张图像

    ffmpeg -i my2.avi -r 1 -f image2  my%d.jpg

    只输出一张图像

    阅读剩余部分 →
  • update win bgcolor for eyes

    将以下内容拷到记事本,存为bat格式,以管理员身份运行即可。

    阅读剩余部分 →