/images/avatar.jpeg

Go 学习笔记

学习资源 代理加速 Goproxy 中国 中国最可靠的 Go 模块代理。 可完美解决由于连接超时无法安装依赖库,工具库的问题。 1 2 $ go env -w GO111MODULE=on $ go env -w GOPROXY=https://goproxy.cn,direct 国外代理 1 2 go env -w

Mysql 常用命令

安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 # 启动mysql sudo systemctl start mysql # 查看mysql 状态 sudo systemctl status mysql # 查看mysql 配置 vim /etc/mysql/mariadb.conf.d/50-server.cnf # 查看系统中的mysql进程 ps -aux

Redis实战读书笔记

配置开机启动 转载: redis设置开机自启 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 sudo vim /etc/systemd/system/redis.service sudo chmod 777 redis.service

P1001 A+B Problem

题目描述 输入两个整数 a,b输出它们的和。 输入格式 两个整数以空格分开。 输出格式 一个整数。 输入输出样例 输入 #1 20 30 输出 #1 50 1 2 # 80ms / 3.16MB / 45B Python 3 print(sum([int(x) for

Vim配置

介绍 安装Vundle插件管理器 1 2 3 git clone --depth=1 https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim git clone --depth=1 https://github.com/preservim/nerdtree.git ~/.vim/bundle/nerdtree git clone --depth=1 https://github.com/Xuyuanp/nerdtree-git-plugin.git ~/.vim/bundle/nerdtree-git-plugin 更新配置文件 vim ~/.vimrc 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

为debian10添加软件源

Debian 10添加163软件源: 1 2 3 4 5 vi /etc/apt/source.list deb http://mirrors.163.com/debian/ buster main contrib non-free deb http://mirrors.163.com/debian/ buster-updates main contrib non-free deb http://mirrors.163.com/debian-security/ buster/updates main contrib non-free :wq 其它debian发行版本同理,更改代号即可,历史代号可到官网查看

Python时间处理

datetime 库 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 from datetime import datetime, timedelta # 字符串 转 datetime类型 another_day_str = '2020-07-18 21:00:00' another_day_datetime = datetime.strptime(another_day_str, '%Y-%m-%d%H:%M:%S') # 时间加减运算, 增加1小时3

Python使用os模块

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 import os old_path = 'data/20200222' new_path =