-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
367 lines (316 loc) · 53.2 KB
/
index.html
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>柳门竹巷</title><meta name="author" content="PigwantAcat"><meta name="copyright" content="PigwantAcat"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="我的个人博客"><link rel="shortcut icon" href="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/favicon.png"><link rel="canonical" href="https://www.zhbblog.top/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容:${query}","hits_stats":"共找到 ${hits} 篇文章"}},
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
dateSuffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: {"limitCount":50,"languages":{"author":"作者: PigwantAcat","link":"链接: ","source":"来源: 柳门竹巷","info":"著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。"}},
lightbox: 'fancybox',
Snackbar: undefined,
infinitegrid: {
js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid/dist/infinitegrid.min.js',
buttonText: '加载更多'
},
isPhotoFigcaption: false,
islazyload: false,
isAnchor: false,
percent: {
toc: true,
rightside: false,
},
autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '柳门竹巷',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2024-07-21 21:58:00'
}</script><script>(win=>{
win.saveToLocal = {
set: (key, value, ttl) => {
if (ttl === 0) return
const now = Date.now()
const expiry = now + ttl * 86400000
const item = {
value,
expiry
}
localStorage.setItem(key, JSON.stringify(item))
},
get: key => {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = Date.now()
if (now > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
Object.keys(attr).forEach(key => {
script.setAttribute(key, attr[key])
})
document.head.appendChild(script)
})
win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = url
if (id) link.id = id
link.onerror = reject
link.onload = link.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
link.onload = link.onreadystatechange = null
resolve()
}
document.head.appendChild(link)
})
win.activateDarkMode = () => {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = () => {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/runtime.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="/css/swiper.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="/css/swiperstyle.css" media="print" onload="this.media='all'"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/qq_Avatar.jpg" onerror="onerror=null;src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">72</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">38</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/messageboard/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-list"></i><span> 菜单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://butterfly.js.org/"><i class="fa-fw fa fa-heart"></i><span> butterfly主题</span></a></li></ul></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://zhb-imgs.oss-cn-beijing.aliyuncs.com/45.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="柳门竹巷"><span class="site-name">柳门竹巷</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/messageboard/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-list"></i><span> 菜单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://butterfly.js.org/"><i class="fa-fw fa fa-heart"></i><span> butterfly主题</span></a></li></ul></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">柳门竹巷</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/pigwantacat" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="http://wpa.qq.com/msgrd?v=3&uin=1548963912&site=qq&menu=yes" target="_blank" title="QQ"><i class="fab fa-qq"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2024/07/21/go%E5%8F%91%E9%80%81http%E8%AF%B7%E6%B1%82/" title="go发送http请求"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/39.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go发送http请求"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/07/21/go%E5%8F%91%E9%80%81http%E8%AF%B7%E6%B1%82/" title="go发送http请求">go发送http请求</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-07-21T13:54:36.000Z" title="发表于 2024-07-21 21:54:36">2024-07-21</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/go/">go</a></span></div><div class="content">go发送http请求Get发送get请求
不带参数12345678// 转发地址Url := "在此填入你的url"resp, err := http.Get(url)// 解析响应数据defer resp.Body.Close()body, err := ioutil.ReadAll(resp.Body)var resMap map[string]interface{}err = json.Unmarshal(body, &resMap)
带参数1234567891011121314// 转发地址Url := "在此填入你的url"req, err := http.NewRequest("GET", url, nil)if err != nil { log.Println(err) return}req.AddCookie(cookie)resp, err := client.Do(req)// 解析响应数据defer resp.Body.Close()body, ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/03/01/go%E7%94%9F%E6%88%90%E9%9A%8F%E6%9C%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="go生成随机字符串"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/121.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go生成随机字符串"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/03/01/go%E7%94%9F%E6%88%90%E9%9A%8F%E6%9C%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="go生成随机字符串">go生成随机字符串</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-03-01T13:00:29.000Z" title="发表于 2024-03-01 21:00:29">2024-03-01</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/go/">go</a></span></div><div class="content">生成随机字符串1234567891011121314151617181920212223242526272829303132333435363738394041424344454647package RandomUtilimport ( "fmt" "math/rand" "time" "unsafe")// 随机数种子源var random = rand.NewSource(time.Now().UnixNano())const ( // 定义可用字符的字符串 letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" // 62个字符能用6个比特位数表示完 letterIdBits = 6 // 最大的字母id掩码 letterIdMask = 1<<letterIdBits - 1 // 可用次数的最大值 letterIdMax = letterIdMask / letterIdB ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2024/02/01/linux%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" title="linux常用命令"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/115.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="linux常用命令"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/02/01/linux%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" title="linux常用命令">linux常用命令</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-02-01T13:03:41.000Z" title="发表于 2024-02-01 21:03:41">2024-02-01</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java%E5%9F%BA%E7%A1%80/">Java基础</a></span></div><div class="content">linux常用命令lsoflsof 是 List Open File 的缩写, 它主要用来获取被进程打开文件的信息。
使用 lsof -i:端口号 可以获得所有在指定端口号上打开的文件。
12345[root@localhost ~]# lsof -i:3306COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEossec-dbd 48382 ossecm 3u IPv4 5428466 0t0 TCP localhost:54004->localhost:mysql (ESTABLISHED)mysqld 94358 mysql 4u IPv6 5423584 0t0 TCP localhost:mysql->localhost:54004 (ESTABLISHED)mysqld 94358 mysql 26u IPv6 4226501 0t0 TCP *:mysql (LISTEN)
netstatnetstat 命令用于显示 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/01/15/%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%AE%BE%E7%BD%AE%E9%9D%99%E6%80%81ip/" title="服务器设置静态ip"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/53.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="服务器设置静态ip"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/01/15/%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%AE%BE%E7%BD%AE%E9%9D%99%E6%80%81ip/" title="服务器设置静态ip">服务器设置静态ip</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-01-15T13:04:22.000Z" title="发表于 2024-01-15 21:04:22">2024-01-15</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E5%9F%BA%E7%A1%80/">基础</a></span></div><div class="content">设置静态ipCentOS7修改网卡
12# 修改指定的网卡,如eth0、ens33vim /etc/sysconfig/network-scripts/ifcfg-ens33
修改内容
12345678910# 修改BOOTPROTO=dhcp --> BOOTPROTO=static......ONBOOT=no --> ONBOOT=yes# 新增IPADDR=192.168.1.100 # 你要设置的固定 IP 地址NETMASK=255.255.252.0 # 子网掩码GATEWAY=192.168.0.1 # 网关 IP 地址DNS1=8.8.8.8 # 首选 DNS 服务器DNS2=114.114.114.114 # 备选 DNS 服务器
重启网卡
1systemctl restart network
查看修改后网卡信息
1ip a show ifcfg-ens33
Ubuntu20.04修改网卡
1sudo vim /etc/netplan/00-installer-config. ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/11/30/go%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95/" title="go基准测试"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/113.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go基准测试"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/11/30/go%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95/" title="go基准测试">go基准测试</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-11-30T13:03:05.000Z" title="发表于 2023-11-30 21:03:05">2023-11-30</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/go/">go</a></span></div><div class="content">go基准测试测试时间为5秒钟
1234567891011zhb@DESKTOP-80JJESV MINGW64 /d/Go/WorkSpace/mytest/com/zhb/utils$ go test -benchmem -benchtime=5s -bench .goos: windowsgoarch: amd64pkg: mytest/com/zhb/utilscpu: Intel(R) Core(TM) i5-10400 CPU @ 2.90GHzBenchmarkApproach1-12 74540550 78.80 ns/op 32 B/op 1 allocs/opBenchmarkApproach4-12 658540 9213 ns/op 5488 B/op 4 allocs/opBenchmarkApproach5-12 33707202 177 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/11/20/docker%E9%83%A8%E7%BD%B2jenkins%E8%87%AA%E5%8A%A8%E6%89%93%E5%8C%85go/" title="docker部署jenkins自动打包go"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/52.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="docker部署jenkins自动打包go"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/11/20/docker%E9%83%A8%E7%BD%B2jenkins%E8%87%AA%E5%8A%A8%E6%89%93%E5%8C%85go/" title="docker部署jenkins自动打包go">docker部署jenkins自动打包go</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-11-20T14:05:44.000Z" title="发表于 2023-11-20 22:05:44">2023-11-20</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/jenkins/">jenkins</a></span></div><div class="content">docker部署jenkins自动打包go参考文章:
【Jenkins】如何升级Jenkins版本_jenkins升级-CSDN博客
Jenkins安装插件失败问题解决方案(必定有效)_this version of the plugin exists but it is not be-CSDN博客
配置码云代码仓库实现自动部署
安装jenkins默认已完成docker和docker-compose安装,如果没有请参考下文使用docker搭建项目 | 柳门竹巷 (zhbblog.top)
检查docker和docker-compose安装
123# 查询docker和docker-compose版本docker -vdocker-compose -v
拉取jenkins镜像
12# 拉取jenkins镜像docker pull jenkins/jenkins
配置docker-compose.yml
123456789101112131415# 配置docker-compose.ymlversion: "3"services: jenkins: ima ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/11/10/go%E6%93%8D%E4%BD%9Cminio/" title="go操作minio"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/43.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go操作minio"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/11/10/go%E6%93%8D%E4%BD%9Cminio/" title="go操作minio">go操作minio</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-11-10T14:01:39.000Z" title="发表于 2023-11-10 22:01:39">2023-11-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/go/">go</a></span></div><div class="content">go操作minio参考文章:docker-compose 搭建 minio 分布式对象存储 最新版(使用教程)_docker-compose minio-CSDN博客
安装minio
安装docker
安装步骤详情请参考:使用docker搭建项目 | 柳门竹巷 (zhbblog.top)
12[root@localhost ~]# docker -vDocker version 24.0.6, build ed223bc
安装docker-compose
安装步骤详情请参考:使用docker搭建项目 | 柳门竹巷 (zhbblog.top)
12[root@localhost ~]# docker-compose -vDocker Compose version v2.20.3
拉取minio镜像
1docker pull minio/minio
创建minio对应文件夹
123456789# 进入data目录cd /data# 创建minio目录mkdir minio# 进入minio目录cd minio# 在minio目录下创建data目录和config目录mkdir datamk ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/10/10/go%E9%A1%B9%E7%9B%AE%E6%90%AD%E5%BB%BA%E4%B8%8E%E9%83%A8%E7%BD%B2/" title="go项目搭建与部署"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/83.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go项目搭建与部署"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/10/10/go%E9%A1%B9%E7%9B%AE%E6%90%AD%E5%BB%BA%E4%B8%8E%E9%83%A8%E7%BD%B2/" title="go项目搭建与部署">go项目搭建与部署</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-10-10T14:01:14.000Z" title="发表于 2023-10-10 22:01:14">2023-10-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/go/">go</a></span></div><div class="content">go项目搭建与部署参考文章:
Win10打包Go项目部署到Linux上注意事项_go 打包成linux_日日行不惧千万里的博客-CSDN博客
golang清除go get 的包_golang 删除指定包-CSDN博客
开发环境搭建(Windows10)安装goland下载链接:其他版本 - GoLand (jetbrains.com)
安装git环境下载链接:Git - Downloading Package (git-scm.com)
123# 控制台检查git是否安装成功D:\Go\WorkSpace> git versiongit version 2.36.1.windows.1
如果想要禁用或忽略 SSL 证书验证
12# 禁用或忽略SSL证书验证git config --global http.sslVerify false
go环境搭建打开goland,点击所有设置,选择GOROOT安装go
123# 控制台检查go是否安装成功D:\Go\WorkSpace> go versiongo version go1.21.2 windows/amd64
设置 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/09/24/go%E5%AE%9E%E7%8E%B0mqtt%E8%AE%A2%E9%98%85%E4%B8%8E%E6%8E%A8%E9%80%81/" title="go实现mqtt订阅与推送"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/126.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go实现mqtt订阅与推送"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/09/24/go%E5%AE%9E%E7%8E%B0mqtt%E8%AE%A2%E9%98%85%E4%B8%8E%E6%8E%A8%E9%80%81/" title="go实现mqtt订阅与推送">go实现mqtt订阅与推送</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-09-24T14:00:40.000Z" title="发表于 2023-09-24 22:00:40">2023-09-24</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/go/">go</a></span></div><div class="content">go实现mqtt订阅与推送搭建mqtt服务端安装emqx本文安装emqx作为服务端,请自行安装docker
12345# 拉取emqx最新镜像docker pull emqx# 创建并运行emqx容器docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx
浏览器打开http://ip:18083,账号默认为admin,密码默认为public
安装mqttx有需要可以选择安装mqttx
12345# 拉取mqttx镜像docker pull emqx/mqttx-web# 创建并运行mqttx容器docker run -d --name mqttx-web -p 18830:80 emqx/mqttx-web
浏览器打开http://ip:18830
go创建mqtt客户端mqtt配置文件12345678910111213mqtt: # 地址 broker: 127.0.0.1:1883 # 账号 username: admin # ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/09/10/%E4%BD%BF%E7%94%A8docker%E6%90%AD%E5%BB%BA%E9%A1%B9%E7%9B%AE/" title="使用docker搭建项目"><img class="post-bg" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/64.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="使用docker搭建项目"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/09/10/%E4%BD%BF%E7%94%A8docker%E6%90%AD%E5%BB%BA%E9%A1%B9%E7%9B%AE/" title="使用docker搭建项目">使用docker搭建项目</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-09-10T13:58:02.000Z" title="发表于 2023-09-10 21:58:02">2023-09-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/docker/">docker</a></span></div><div class="content">使用docker搭建项目安装docker123456789101112131415161718# 更新源yum -y update# centos一键安装dockercurl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun# 查询docker版本# 提示Docker version 24.0.0, build 98fdcd7就算安装成功docker -v# 启动dockersystemctl start docker# 查看docker运行状态systemctl status docker# 设置docker自启动systemctl enable docker
docker换源1234567891011# 查看docker信息docker info# Client: Docker Engine - Community# Version: 24.0.5# ......# Insecure Registries:# 127.0.0.0/8# Live Restore Enabled: false ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><span class="space">…</span><a class="page-number" href="/page/8/#content-inner">8</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/qq_Avatar.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">PigwantAcat</div><div class="author-info__description">我的个人博客</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">72</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">38</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/pigwantacat"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/pigwantacat" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="http://wpa.qq.com/msgrd?v=3&uin=1548963912&site=qq&menu=yes" target="_blank" title="QQ"><i class="fab fa-qq"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">图片源自网络,侵删。</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2024/07/21/go%E5%8F%91%E9%80%81http%E8%AF%B7%E6%B1%82/" title="go发送http请求"><img src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/39.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go发送http请求"/></a><div class="content"><a class="title" href="/2024/07/21/go%E5%8F%91%E9%80%81http%E8%AF%B7%E6%B1%82/" title="go发送http请求">go发送http请求</a><time datetime="2024-07-21T13:54:36.000Z" title="发表于 2024-07-21 21:54:36">2024-07-21</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/03/01/go%E7%94%9F%E6%88%90%E9%9A%8F%E6%9C%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="go生成随机字符串"><img src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/121.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go生成随机字符串"/></a><div class="content"><a class="title" href="/2024/03/01/go%E7%94%9F%E6%88%90%E9%9A%8F%E6%9C%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="go生成随机字符串">go生成随机字符串</a><time datetime="2024-03-01T13:00:29.000Z" title="发表于 2024-03-01 21:00:29">2024-03-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/02/01/linux%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" title="linux常用命令"><img src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/115.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="linux常用命令"/></a><div class="content"><a class="title" href="/2024/02/01/linux%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" title="linux常用命令">linux常用命令</a><time datetime="2024-02-01T13:03:41.000Z" title="发表于 2024-02-01 21:03:41">2024-02-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/01/15/%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%AE%BE%E7%BD%AE%E9%9D%99%E6%80%81ip/" title="服务器设置静态ip"><img src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/53.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="服务器设置静态ip"/></a><div class="content"><a class="title" href="/2024/01/15/%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%AE%BE%E7%BD%AE%E9%9D%99%E6%80%81ip/" title="服务器设置静态ip">服务器设置静态ip</a><time datetime="2024-01-15T13:04:22.000Z" title="发表于 2024-01-15 21:04:22">2024-01-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/11/30/go%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95/" title="go基准测试"><img src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/113.jpg" onerror="this.onerror=null;this.src='https://zhb-imgs.oss-cn-beijing.aliyuncs.com/404.jpg'" alt="go基准测试"/></a><div class="content"><a class="title" href="/2023/11/30/go%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95/" title="go基准测试">go基准测试</a><time datetime="2023-11-30T13:03:05.000Z" title="发表于 2023-11-30 21:03:05">2023-11-30</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
<i class="fas fa-folder-open"></i>
<span>分类</span>
<a class="card-more-btn" href="/categories/" title="查看更多">
<i class="fas fa-angle-right"></i></a>
</div>
<ul class="card-category-list" id="aside-cat-list">
<li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Java%E5%9F%BA%E7%A1%80/"><span class="card-category-list-name">Java基础</span><span class="card-category-list-count">37</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Java%E6%A1%86%E6%9E%B6/"><span class="card-category-list-name">Java框架</span><span class="card-category-list-count">5</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Java%E9%9D%A2%E8%AF%95/"><span class="card-category-list-name">Java面试</span><span class="card-category-list-count">10</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/MySql/"><span class="card-category-list-name">MySql</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Redis/"><span class="card-category-list-name">Redis</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/docker/"><span class="card-category-list-name">docker</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/go/"><span class="card-category-list-name">go</span><span class="card-category-list-count">6</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/jenkins/"><span class="card-category-list-name">jenkins</span><span class="card-category-list-count">1</span></a></li>
</ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/http/" style="font-size: 1.1em; color: #999">http</a> <a href="/tags/string/" style="font-size: 1.17em; color: #999c9f">string</a> <a href="/tags/mqtt/" style="font-size: 1.1em; color: #999">mqtt</a> <a href="/tags/%E8%BF%87%E6%BB%A4%E5%99%A8/" style="font-size: 1.1em; color: #999">过滤器</a> <a href="/tags/%E6%95%B0%E7%BB%84/" style="font-size: 1.1em; color: #999">数组</a> <a href="/tags/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/" style="font-size: 1.17em; color: #999c9f">面向对象</a> <a href="/tags/docker/" style="font-size: 1.37em; color: #99a4b2">docker</a> <a href="/tags/%E5%BC%82%E5%B8%B8/" style="font-size: 1.1em; color: #999">异常</a> <a href="/tags/linux/" style="font-size: 1.23em; color: #999ea6">linux</a> <a href="/tags/%E9%98%9F%E5%88%97/" style="font-size: 1.17em; color: #999c9f">队列</a> <a href="/tags/%E7%BD%91%E7%BB%9C/" style="font-size: 1.37em; color: #99a4b2">网络</a> <a href="/tags/stream/" style="font-size: 1.23em; color: #999ea6">stream</a> <a href="/tags/go/" style="font-size: 1.43em; color: #99a6b9">go</a> <a href="/tags/sql/" style="font-size: 1.23em; color: #999ea6">sql</a> <a href="/tags/minio/" style="font-size: 1.1em; color: #999">minio</a> <a href="/tags/random/" style="font-size: 1.1em; color: #999">random</a> <a href="/tags/nginx/" style="font-size: 1.1em; color: #999">nginx</a> <a href="/tags/redis/" style="font-size: 1.1em; color: #999">redis</a> <a href="/tags/%E5%9F%BA%E9%87%91/" style="font-size: 1.23em; color: #999ea6">基金</a> <a href="/tags/testing/" style="font-size: 1.1em; color: #999">testing</a> <a href="/tags/%E4%B8%8A%E4%BC%A0%E4%B8%8B%E8%BD%BD/" style="font-size: 1.17em; color: #999c9f">上传下载</a> <a href="/tags/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6/" style="font-size: 1.3em; color: #99a1ac">集合框架</a> <a href="/tags/jvm/" style="font-size: 1.1em; color: #999">jvm</a> <a href="/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/" style="font-size: 1.37em; color: #99a4b2">多线程</a> <a href="/tags/%E6%8E%92%E5%BA%8F/" style="font-size: 1.1em; color: #999">排序</a> <a href="/tags/websocket/" style="font-size: 1.1em; color: #999">websocket</a> <a href="/tags/%E4%BD%8D%E8%BF%90%E7%AE%97/" style="font-size: 1.1em; color: #999">位运算</a> <a href="/tags/%E5%B7%A5%E5%85%B7%E7%B1%BB/" style="font-size: 1.1em; color: #999">工具类</a> <a href="/tags/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/" style="font-size: 1.23em; color: #999ea6">设计模式</a> <a href="/tags/git/" style="font-size: 1.1em; color: #999">git</a> <a href="/tags/%E6%A0%91/" style="font-size: 1.37em; color: #99a4b2">树</a> <a href="/tags/url/" style="font-size: 1.1em; color: #999">url</a> <a href="/tags/%E7%AE%97%E6%B3%95/" style="font-size: 1.1em; color: #999">算法</a> <a href="/tags/%E5%86%85%E9%83%A8%E7%B1%BB/" style="font-size: 1.1em; color: #999">内部类</a> <a href="/tags/jenkins/" style="font-size: 1.1em; color: #999">jenkins</a> <a href="/tags/%E5%88%B7%E9%A2%98/" style="font-size: 1.5em; color: #99a9bf">刷题</a> <a href="/tags/spring/" style="font-size: 1.37em; color: #99a4b2">spring</a> <a href="/tags/%E5%87%BD%E6%95%B0%E5%BC%8F%E6%8E%A5%E5%8F%A3/" style="font-size: 1.17em; color: #999c9f">函数式接口</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
<i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/07/"><span class="card-archive-list-date">七月 2024</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/03/"><span class="card-archive-list-date">三月 2024</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/02/"><span class="card-archive-list-date">二月 2024</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/01/"><span class="card-archive-list-date">一月 2024</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/11/"><span class="card-archive-list-date">十一月 2023</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/10/"><span class="card-archive-list-date">十月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/09/"><span class="card-archive-list-date">九月 2023</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/08/"><span class="card-archive-list-date">八月 2023</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">72</div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">48.6k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-07-21T13:57:59.890Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><div class="js-pjax"><script>window.typedJSFn = {
init: (str) => {
window.typed = new Typed('#subtitle', Object.assign({
strings: str,
startDelay: 300,
typeSpeed: 150,
loop: true,
backSpeed: 50,
}, null))
},
run: (subtitleType) => {
if (true) {
if (typeof Typed === 'function') {
subtitleType()
} else {
getScript('https://cdn.jsdelivr.net/npm/typed.js/dist/typed.umd.min.js').then(subtitleType)
}
} else {
subtitleType()
}
}
}
</script><script>function subtitleType () {
if (true) {
typedJSFn.init(["今日犹见,虽不似当年心动,仍一如既往喜欢"])
} else {
document.getElementById("subtitle").textContent = "今日犹见,虽不似当年心动,仍一如既往喜欢"
}
}
typedJSFn.run(subtitleType)</script></div><link rel="stylesheet" href="/css/Lete.css"><div class="aplayer no-destroy" data-id="8058746704" data-server="tencent" data-type="playlist" data-fixed="true" data-mini="true" data-listFolded="false" data-order="random" data-preload="none" data-autoplay="false" muted></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js"></script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-heart.min.js" async="async" mobile="false"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/metingjs/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]
var pjax = new Pjax({
elements: 'a:not([target="_blank"])',
selectors: pjaxSelectors,
cacheBust: false,
analytics: false,
scrollRestoration: false
})
document.addEventListener('pjax:send', function () {
// removeEventListener
btf.removeGlobalFnEvent('pjax')
btf.removeGlobalFnEvent('themeChange')
document.getElementById('rightside').classList.remove('rightside-show')
if (window.aplayers) {
for (let i = 0; i < window.aplayers.length; i++) {
if (!window.aplayers[i].options.fixed) {
window.aplayers[i].destroy()
}
}
}
typeof typed === 'object' && typed.destroy()
//reset readmode
const $bodyClassList = document.body.classList
$bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')
typeof disqusjs === 'object' && disqusjs.destroy()
})
document.addEventListener('pjax:complete', function () {
window.refreshFn()
document.querySelectorAll('script[data-pjax]').forEach(item => {
const newScript = document.createElement('script')
const content = item.text || item.textContent || item.innerHTML || ""
Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
newScript.appendChild(document.createTextNode(content))
item.parentNode.replaceChild(newScript, item)
})
GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()
typeof panguInit === 'function' && panguInit()
// google analytics
typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});
// baidu analytics
typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()
// prismjs
typeof Prism === 'object' && Prism.highlightAll()
})
document.addEventListener('pjax:error', e => {
if (e.request.status === 404) {
pjax.loadUrl('/404.html')
}
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span> 数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div><!-- hexo injector body_end start --><script data-pjax>
function butterfly_footer_beautify_injector_config(){
var parent_div_git = document.getElementById('footer-wrap');
var item_html = '<div id="workboard"></div>';
console.log('已挂载butterfly_footer_beautify')
parent_div_git.insertAdjacentHTML("beforeend",item_html)
}
var elist = 'null'.split(',');
var cpage = location.pathname;
var epage = 'all';
var flag = 0;
for (var i=0;i<elist.length;i++){
if (cpage.includes(elist[i])){
flag++;
}
}
if ((epage ==='all')&&(flag == 0)){
butterfly_footer_beautify_injector_config();
}
else if (epage === cpage){
butterfly_footer_beautify_injector_config();
}
</script><script async src="/js/runtime.js"></script><script data-pjax>
function butterfly_swiper_injector_config(){
var parent_div_git = document.getElementById('recent-posts');
var item_html = '<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("2021/12/21/力扣LFU缓存题解/");" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/9.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2021-12-21</span><a class="blog-slider__title" onclick="pjax.loadUrl("2021/12/21/力扣LFU缓存题解/");" href="javascript:void(0);" alt="">力扣LFU缓存题解</a><div class="blog-slider__text">力扣LFU缓存题解</div><a class="blog-slider__button" onclick="pjax.loadUrl("2021/12/21/力扣LFU缓存题解/");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("2021/07/11/面向对象的基本特征及原则/");" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/36.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2021-07-11</span><a class="blog-slider__title" onclick="pjax.loadUrl("2021/07/11/面向对象的基本特征及原则/");" href="javascript:void(0);" alt="">面向对象的基本特征及原则</a><div class="blog-slider__text">面向对象</div><a class="blog-slider__button" onclick="pjax.loadUrl("2021/07/11/面向对象的基本特征及原则/");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("2021/08/24/HTTPS和SSL/");" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/106.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2021-08-24</span><a class="blog-slider__title" onclick="pjax.loadUrl("2021/08/24/HTTPS和SSL/");" href="javascript:void(0);" alt="">HTTPS和SSL</a><div class="blog-slider__text">SSL</div><a class="blog-slider__button" onclick="pjax.loadUrl("2021/08/24/HTTPS和SSL/");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("2021/07/04/url访问过程/");" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/1.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2021-07-04</span><a class="blog-slider__title" onclick="pjax.loadUrl("2021/07/04/url访问过程/");" href="javascript:void(0);" alt="">url访问过程</a><div class="blog-slider__text">url访问</div><a class="blog-slider__button" onclick="pjax.loadUrl("2021/07/04/url访问过程/");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("2021/08/24/JWT小结/");" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/61.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2021-08-24</span><a class="blog-slider__title" onclick="pjax.loadUrl("2021/08/24/JWT小结/");" href="javascript:void(0);" alt="">JWT小结</a><div class="blog-slider__text">JWT</div><a class="blog-slider__button" onclick="pjax.loadUrl("2021/08/24/JWT小结/");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("2021/08/16/HashMap部分源码简析/");" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://zhb-imgs.oss-cn-beijing.aliyuncs.com/81.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2021-08-16</span><a class="blog-slider__title" onclick="pjax.loadUrl("2021/08/16/HashMap部分源码简析/");" href="javascript:void(0);" alt="">HashMap部分源码简析</a><div class="blog-slider__text">hashmap</div><a class="blog-slider__button" onclick="pjax.loadUrl("2021/08/16/HashMap部分源码简析/");" href="javascript:void(0);" alt="">详情 </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>';
console.log('已挂载butterfly_swiper')
parent_div_git.insertAdjacentHTML("afterbegin",item_html)
}
var elist = 'undefined'.split(',');
var cpage = location.pathname;
var epage = 'all';
var flag = 0;
for (var i=0;i<elist.length;i++){
if (cpage.includes(elist[i])){
flag++;
}
}
if ((epage ==='all')&&(flag == 0)){
butterfly_swiper_injector_config();
}
else if (epage === cpage){
butterfly_swiper_injector_config();
}
</script><script defer src="/js/swiper.min.js"></script><script defer data-pjax src="/js/swiper_init.js"></script><!-- hexo injector body_end end --><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/assets/hijiki.model.json"},"display":{"position":"right","width":150,"height":300,"hOffset":20,"vOffset":-40},"mobile":{"show":false},"react":{"opacity":1},"log":false});</script></body></html>