自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

power_to_go

hello world

  • 博客(235)
  • 资源 (1)
  • 收藏
  • 关注

原创 logback 问题 ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred

【代码】logback 问题 ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred。

2023-10-12 17:06:12 600

原创 顺序建立链表后,反转链表

【代码】顺序建立链表后,反转链表。

2023-08-21 17:56:51 119

原创 java数组对象初始化分析

【代码】java数组对象初始化分析。

2023-07-28 08:27:00 176

原创 macos gz 方式安装 mysql8.1.0

mysql 非 dmg 方式安装

2023-07-23 21:10:16 705

原创 easy-excel 根据模板生成 excel 报表

【代码】easy-excel 根据模板生成 excel 报表。

2023-01-29 17:43:10 1532

原创 /var/lib/docker/containers 日志清理

清理 /var/lib/docker/containers 日志注意 /var/lib/docker/ 为默认的 Docker RootDir#!/usr/bin/env bashsearch_dir=/var/lib/docker/containersfor entry in "$search_dir"/*do #echo $entry/$(basename $entry)-json.log > $entry/$(basename $entry)-json.logdone

2022-05-22 23:13:01 487

原创 docker build cache 清理

docker system df 查看root@ip-172-30-69-134 ~]# docker system dfTYPE TOTAL ACTIVE SIZE RECLAIMABLEImages 41 1 10.66GB 10.63GB (99%)Containers 1 1 0B 0BLocal Volumes 13

2022-04-15 21:06:06 2946

原创 gitlab 配置企业微信邮箱发送邮件

官网 dochttps://docs.gitlab.com/omnibus/settings/smtp.html#qq-exmail配置gitlab_rails['smtp_enable'] = truegitlab_rails['smtp_address'] = "smtp.exmail.qq.com"gitlab_rails['smtp_port'] = 465gitlab_rails['smtp_user_name'] = "[email protected]"gitlab_rails['sm

2022-03-15 14:17:43 1268

原创 bash: ./admin-domain: No such file or directory

问题背景docker中构建出来的 golang 二进制可执行文件,无法运行的问题。最后一个构建阶段用的是 FROM debian:stable-slim。问题root@26f0f39f2cf1:/app# lsadmin-domainroot@26f0f39f2cf1:/app# ./admin-domain bash: ./admin-domain: No such file or directoryroot@26f0f39f2cf1:/app# ldd admin-domain

2022-02-08 11:58:39 530

原创 aws-cli major version 判断

使用了两个版本的 cli 需要特别处理AWS_CLI_MAJOR_VERSION=$(aws --version 2>&1 | cut -d " " -f1 | cut -d "/" -f2 | cut -d "." -f1)if [ "$AWS_CLI_MAJOR_VERSION" = "1" ]; then echo "aws-cli verion is 1" $(aws ecr get-login --no-include-email --region cn-nor

2022-01-28 14:07:44 422

原创 macOS terminal 配置重置

backup~/Library/Preferences/com.apple.Terminal.plistremove com.apple.Terminal.plistReferenceshttps://superuser.com/questions/427154/reset-mac-os-x-terminal-to-default/448679

2022-01-05 10:29:10 1299 1

原创 docker-compose volumes Mounts 类型

"Mounts": [ { "Type": "bind", "Source": "/Users/x/GolandProjects/oss-investigation/seaweedfs/seaweedfs/docker/config.json", "Destination": "/etc/seaweedfs/s3.json", "Mode...

2021-12-01 16:24:14 1434

原创 mint20 终端安装 vscode

APT 相关APT RepoAn APT repository is a network server or a local directory containing deb packages and metadata files that are readable by the APT tools.一个存放 deb package 和 metadata 的地方。APT sources/etc/apt/sources.list file#deb cdrom:[Linux Mint 20 _U

2021-10-31 12:58:46 308

原创 bash string 转数字

使用 bc 命令bashv1=1.2.3v2='"1.2.3"' # v1 和 v2 是不相等的echo v1 is $v1echo v2 is $v2v3=$(echo $v2 | bc) # v2 转为数字echo v3 is $v3if [ $v1 == $v3 ]; then echo "equal"fi

2021-10-29 17:39:02 292

原创 Linux default/global/root namespace

root/default/global namespace

2021-10-24 16:58:05 141

原创 docker mongodb backup and restore

container name: mongobackup# 使用 mongodump 备份sudo docker exec -i mongo /usr/bin/mongodump --db db_name --out /dump# 复制出来sudo docker cp mongo:/dump /mongo/dumprestore# 复制到容器中sudo docker cp /mongo/dump mongo:/dump# 使用 mongorestore 恢复sudo docker e.

2021-10-20 13:44:06 149

转载 How to fix docker: Got permission denied while trying to connect to the Docker daemon socket

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied解决方法chmod 666 /var/run/docke

2021-09-17 14:44:44 93

原创 self-hosted github-runner ssh 登录其他主机

应用场景:自己搭建的 github runner,要使用这个 runner 去控制另一台机器,去做事情。准备把部署 github runner 的这台机器的 ssh public key 复制到要 ssh 登录到的目标机器部署 github runner 的这台机器的 ssh private key 添加到 github 的 secerts 里,在 actions 里要使用这个 private keyjobs: # This workflow contains a single job.

2021-09-01 19:55:57 312

转载 docker stop all containers

docker kill $(docker ps -q)停止所有 容器docker ps(list containers)[root@ip-172-30-69-214 test]# docker ps --helpUsage: docker ps [OPTIONS]List containersOptions: -a, --all Show all containers (default shows just running) # 不论状态,默认只是运行中的

2021-08-18 15:04:35 1626

原创 github Support for password authentication was removed on August 13, 2021.

问题描述remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.不再支持

2021-08-16 13:23:45 436

原创 slice 是啥?

slice 和 array摘自 golang programming language

2021-08-08 16:21:40 61

转载 U盘安装WIN10时显示 windows无法安装到这个磁盘 选中的磁盘采用GPT分区形式

安装时把 MBR 分区转为 GPT 分区参考链接:U盘安装WIN10时显示 windows无法安装到这个磁盘 选中的磁盘采用GPT分区形式

2021-08-07 10:51:22 2523

原创 gitlab + sonarqube OAuth2 流程梳理

References1. https://docs.sonarqube.org/latest/analysis/gitlab-integration/

2021-08-02 13:48:25 717

原创 innodb_表空间

mysql5.7 innodb_table_space

2021-07-29 16:07:24 46

原创 mysql-innodb-index-page 图解

ReferencesMySQL 是怎样运行的:从根儿上理解 MySQL InnoDB数据页结构

2021-07-16 16:52:04 240

原创 CPU 占用过高,如何排查?

测试代码死循环,一直打印数字package com.example.demo;public class CPUHigh { public static void main(String[] args) { long count = 0; while (true){ System.out.println(count++); } }}排查步骤top 查看,哪一个进程 CPU 使用高%Cpu(s): 1

2021-06-25 09:38:30 273

原创 java.lang.OutOfMemoryError 类型

java.lang.OutOfMemoryError: java heap spaceheap 空间不足,对象分配在 heap 上。话说,为啥对象要分配在 heap 上,因为对象的大小在 compile-time 是无法确定的。不像基本的数据类型,如 int 是 4Bytes,这些在 compile-time 就可以确定要多少空间,分配在 stack 上。大对象分配vm options: -Xms8m -Xmx8mpackage com.example.demo;public cla

2021-06-24 11:16:59 104

原创 java-String 为什么设计成不可变?

Referencehttps://www.baeldung.com/java-immutable-objecthttps://www.baeldung.com/java-string-immutablehttps://www.artima.com/articles/james-gosling-on-java-may-2001#part13https://www.baeldung.com/java-string-pool

2021-06-15 13:55:21 1044 1

原创 JSON 是啥?

json 一种数据格式、协议

2021-06-15 13:44:46 46

原创 sql-date_sub() 查询近三个月的数据

好记性不如烂笔头DATE_SUB(date, INTERVAL value interval) 函数select * from t_user where time > DATE_SUB(CURDATE(), INTERVAL 3 MONTH) --三月date = curdate()interval value = 3interval = month. 时间段Referencesdate_sub 函数...

2021-06-07 20:42:33 2821

原创 Flexible Array Members in a structure in C

Flexible Array Member(FAM)Flexible Array Member(FAM) is a feature introduced in the C99 standard of the C programming language.For the structures in C programming language from C99 standard onwards, we can declare an array without a dimension and whose

2021-05-31 16:10:50 174

原创 ip addr 结果表示啥?

ip addr[root@s101 net]# ip addr1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferr

2021-05-31 14:21:35 175

原创 VLAN 分割广播域(分组思想)

VLAN 是干啥的?Virtual Local Area Networks, or VLANs, segregate traffic within a network. VLANs keep traffic from different networks separated when traversing shared links and devices within a topology. This process, also known as VLAN tagging, is invaluable

2021-05-27 20:39:31 476

原创 使用条件运算符优化代码

分析环境x86-64 gcc 5.4条件运算符之前一直认为 条件运算符(?) 属于语法糖。其实并不是。代码分析c 语言int max(int x, int y){ return x > y ? x : y;}int max2(int x, int y){ if(x > y) return x; else return y;}C 和汇编代码对照由上图可见:max 中 ? 条件运算符编译后是顺

2021-05-17 17:03:31 72

原创 python 提取 B 站视频中的音频

需要工具you-getmoviepy代码实现#-*- coding: utf-8 -*-import subprocessimport osimport moviepy.editor as mpvideo_link = input('请输入一个视频链接: ')print(video_link)p = subprocess.run(["you-get", video_link], capture_output=True, encoding="utf-8")res = p.s

2021-05-02 12:42:41 577

原创 windows10 连接 vmware 虚拟机问题

前置虚拟机采用的是 NAT 模式虚拟机 ip 信息[root@s101 gitrepo]# ifconfigens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.126.133 netmask 255.255.255.0 broadcast 192.168.126.255 inet6 fe80::20c:29ff:fe54:8697 prefixlen 64

2021-04-30 14:09:32 358

原创 mysql 字符集全流程分析(一)

MySQL 字符集讨论环境从客户端出发欢迎使用Markdown编辑器References讨论环境windows10mysql5.7从客户端出发欢迎使用Markdown编辑器Referenceswindows-code-page

2021-03-11 13:12:57 174

原创 java Managed Bean

实践平台jdk1.8.0_191windows10JMXJava Management ExtensionsJMX 三层架构简介Instrumentation layerJMX agent layerRemote management layer实例MBean InterfaceMBean 实现类测试Jconsole 查看 MBean在 HikariDataSource 中的使用ReferencesJava Management Extensions最基本的功能就是为了管理 java 程序。

2021-03-01 22:29:32 286 2

原创 计算机怎么知道指针指向的具体类型?

分析环境编译器 x86-64 gcc 10.2汇编风格 AT&T 风格概述汇编代码基于 x86-64 ,由于 x86 系列的 CPU 向后兼容,在指令上,兼容就是 intel8086 这个 16bit 的处理器的指令,在 intel80386 这个32bit 的处理器上也能使用。以此类推。先来了解下寄存器的变化。详细的可以查看 x86 寄存器历史。以 ax 为例16bit32bit64bitaxeaxrax可以了解 eax 是 32bits,rax

2021-02-15 17:59:57 784

原创 springboot logback-spring.xml 配置, 使用不同配置文件中的配置

application.ymlspring: profiles: active: prod # active 哪一个配置文件application-dev.ymllogging: file: path: d:/var/logapplication-prod.ymllogging: file: path: /var/log/questionlogback-spring.xml<?xml version="1.0" encoding="UTF-8

2021-02-07 13:55:53 310

the rotation of AVL tree

avl tree 中的各种旋转

2016-08-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除