博远日志

记事本

被苹果判定过时设备升级12.4(macOS Monterey)

注意

本文章只是阐述操作可能性,请您在操作前仔细确认,该篇文章可能造成 变砖,数据丢失,损坏硬件等等一切后果由您自己衡量,本作者不主张操作且不负任何责任

前提简介

鄙人一直在用macbookpro 11,5 (2014 mid), 新系统macos12 不允许安装了,本文主要阐述安装过程,其他老旧设备安装原理相同.

工具集合

步骤

前置步骤

  • 打开 OpenCore-Legacy-Patcher.app
  • Create macOS Installer
  • Download macOS installer
  • 选择macOS 12.4 (21F79 -12.1GB)
  • 等待下载完成 选择你的U盘(注意:该步骤会格式化U盘,您的U盘内数据会全部丢失,请谨慎操作)
  • 等待安装完成(大约40分钟,如果你不是苹果设备,那么直接点继续就行)
  • 我是用自己的序列号和主板序列号,这里我没有点击继续,如果你没有自己的请点击继续 选择盘符安装 OpenCore(EFI)
    如果你点了继续那么下面的步骤不需要操作了 直接重启选择U盘启动就行了
  • 自己的序列号可以通过 关于本机 查看 我是使用了terminal 运行了下面的代码 system_profiler SPHardwareDataType |grep Ser |cut -f 2 -d:
  • 主板序列号 需要拆开本,在主板最下面有印刷
  • 返回了App的Main menu 选择 Setting -> 序列号填进去 并摁回车键 点击Return to Settings -> return to main menu
  • Build and Install OpenCore
  • Build OpenCore 并查看log 中 序列号是否一致
  • Install to disk -> 选择你的Upan(TransMemory)
  • disk2s1 -EFI - 209.7MB
  • reboot

安装步骤

FAQ

参考

Hexo NexT Theme 无法显示博客内容

初次发现是是在21年底jsDelivr 因SSL证书过期问题无法访问,最近发现SSl证书已经更新但家里网络不科学依然无法访问
随查到是备案问题被拒绝访问了.

解决方案

方案一: 切换next的cdn源

1
2
3
4
# 在_config.next.yml 文件中添加如下字段(切换到unpkg)
## 切换cdn 默认 jsDelivr
vendor:
plugins : unpkg

方案二: 仅使用了darkmode的next

1
2
3
4
5

# 在_config.next.yml 修改
darkmode_js:
libUrl: https://unpkg.com/darkmode-js@1.5.7/lib/darkmode-js.min.js

前言

  • 做这个的起因

    主要因为反感销售托利用父母间矛盾点造成焦虑促使孩子父母单方面冲动消费,其次是反感机器猫班销售(班主任)的电话骚扰及明确不付费后的气急败坏.

  • 事情的经过

    • 使用孩子学校老师推荐的契机进入领课群,然后分配班主任和班级群,这期间还是比较正常的.
    • 然后是每天分配班主任的电话 一般一天一个 不接他就一直打
    • 从第二天开始有家长发孩子学习的图片,知道第五条发现这个家长是托(每天发的孩子都不一样,长得也完全不同,这托太不专业),知道第七天,开始缴费2580元. 这之后才是最气愤的,这个托开始诉苦,说什么孩子他爸爸不管学习,自己多么多么辛苦(这个确实是许多父母的通病,然后孩子妈妈们就共鸣了),之后呢就开始诉说自己条件不好,孩子爸爸不同意学习,自己多么多么无奈,然后自己瞒着他爸爸交费了,自己砸锅卖铁也要供孩子上这个课,然后群里发缴费成功截图(这时候就会有宝妈跟着她的思路走了,然后冲动消费进去了).
    • 我反感的并不是这个学编程不好,而是为他们这种手段不耻.
    • 班主任开始早上打了2个电话劝我缴费,第三个电话我才和他摊牌,说我就写代码的,如果我自己能够教孩子,并且不会缴费,这时候感觉这班主任就破防了 各种嘲讽…

环境

该教程是基于Apple Playgrounds App for iPad 完成的

不得不说编程猫是一个学习编程的好App

如果您是XP/Win 系统推荐 易Logo 麻省理工研发的scratch **

土豪可食用 乐高机器人E3

致谢

感谢Apple Teacher 的免费资料,及Playgrounds App.

参考

Win

App

苹果旗下

乐高

获取ipa

通过Apple Configurator 2 ->所有设备 ->选中当前设备 -> 添加 ->应用 ->选择需要的应用 ->点击添加 注意:当出现替换提示 不要点击任何按钮,运行一下命令,所下载ipa会出现在左面的ipas文件夹下

1
cp -riv ~/Library/Group\ Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets/TemporaryItems/MobileApps/  ~/Desktop/ipas

查壳

1
2
3
4
# 查看库文件
lipo -info .a
#查看app/ipa文件
otool -l ./*.app | grep crypt

越狱

砸壳

###Mach-O View

#越狱后设备

1
2
3
4
5
6
#cocoapods
target 'DYDylib' do
use_frameworks!
pod 'LookinServer'

end

#iOS 实用视频
https://mrmad.com.tw/category/siri-shortcuts

1
2
# 获取CPU线程
sysctl -n hw.logicalcpu

##弃用

##开启

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sudo vim /System/Library/LaunchDaemons/tftp.plist
# dd掉两行
<key>Disabled</key> 和 <true/>
# 添加两行(-i 开启不安全模式 -l 记录所有log)
<string>-i</string>
<string>-l</string>

# 加载
launchctl load -F /System/Library/LaunchDaemons/tftp.plist
# 开启
sudo launchctl start com.apple.tftpd

# tail -f /var/log/system.log

### chmod 777
sudo chmod 777 /private/tftpboot

# MacOS12 /System/Library/LaunchDaemons/
mkdir ~/Library/LaunchDaemons/

cp /System/Library/LaunchDaemons/tftp.plist ~/Library/LaunchDaemons/tftp.plist

sudo launchctl start ~/Library/LaunchDaemons/tftp.plist

关闭

1
launchdctl unload -F /System/Library/LaunchDaemons/tftp.plist 

命令选项

注意跟ftp不同,没有ls命令,无法显示所有文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Commands may be abbreviated.  Commands are:

connect connect to remote tftp
mode set file transfer mode
put send file
get receive file
quit exit tftp
verbose toggle verbose mode
blksize set an alternative blocksize (def. 512)
tsize toggle extended tsize option
trace toggle packet tracing
status show current status
binary set mode to octet
ascii set mode to netascii
rexmt set per-packet retransmission timeout
timeout set total retransmission timeout
tout toggle extended timeout option
? print help information

安装MAAS

目前还是不建议使用snap, 一个是因为国内环境网络经常不通上代理只能上一部分,第二就是安装没有进度中断后需要abort 才能继续安装.

==2021-8-30更新
使用一个月后还是要用snap…, apt 安装的maas 虽然版本一样但是功能运行总是出现奇奇怪怪的问题…==

==2021-9-16更新
lxc exec 没办法进入安装centos的虚拟机,明明宣传支持就是连接不上,换成ubuntu 一切又都好了==

1
2
3
4
5
6
# in root user or add sudo
#apt-add-repository ppa:maas/3.0
#apt install maas -y

snap install maas

打开网页

http://192.168.2.150:5240/MAAS/
没有账号会提示使用sudo maas createadmin创建账号

创建账号

You will need to create a MAAS administrator user to access the web UI:

1
2
3
4
5
sudo maas createadmin --username=admin --email=574779754@qq.com --password=111111

#报错fe_sendauth: no password supplied,运行如下命令:
sudo snap install maas-test-db
sudo maas init region+rack --database-uri maas-test-db:///

验证状态
maas status
输出output如下:

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
#这是使用apt安装的
#bind9 RUNNING pid 7999, uptime 0:09:17
#dhcpd STOPPED Not started
#dhcpd6 STOPPED Not started
#ntp RUNNING pid 8598, uptime 0:05:42
#postgresql RUNNING pid 8001, uptime 0:09:17
#proxy STOPPED Not started
#rackd RUNNING pid 8000, uptime 0:09:17
#regiond:regiond-0 RUNNING pid 8003, uptime 0:09:17
#regiond:regiond-1 RUNNING pid 8008, uptime 0:09:17
#regiond:regiond-2 RUNNING pid 8005, uptime 0:09:17
#regiond:regiond-3 RUNNING pid 8015, uptime 0:09:17
#tgt RUNNING pid 8040, uptime 0:09:15


#这是使用snap 安装的
bind9 RUNNING pid 1952, uptime 0:06:24
dhcpd STOPPED Not started
dhcpd6 STOPPED Not started
http RUNNING pid 2241, uptime 0:05:28
ntp RUNNING pid 2129, uptime 0:05:37
proxy RUNNING pid 2297, uptime 0:05:23
rackd RUNNING pid 1956, uptime 0:06:24
regiond RUNNING pid 1957, uptime 0:06:24
syslog RUNNING pid 2102, uptime 0:05:38

生产环境使用参考

使用webUI登录操作
http://192.168.2.150:5240/MAAS/

LXD

snap install lxd --channel=latest/stable

首次使用运行

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
lxd init
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]: lxd
Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]:
Create a new ZFS pool? (yes/no) [default=yes]:
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]:
Size in GB of the new loop device (1GB minimum) [default=30GB]: 300GB
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
Would you like the LXD server to be available over the network? (yes/no) [default=no]: yes
Address to bind LXD to (not including port) [default=all]:
Port to bind LXD to [default=8443]:
Trust password for new clients:
Again:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: yes

### 安装文件在 /var/snap/lxd/common/lxd/disks/default.img
lxc storage list
查看文件具体位置
lxd shutdown
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
config:
core.https_address: '[::]:8443'
core.trust_password: "111111"
networks:
- config:
ipv4.address: auto
ipv6.address: auto
description: ""
name: lxdbr0
type: ""
project: default
storage_pools:
- config:
size: 300GB
description: ""
name: lxd
driver: zfs
profiles:
- config: {}
description: ""
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: lxd
type: disk
name: default
projects: []
cluster: null

创建虚拟机

1
2
3
4
5
6
7
8
# 列出支持x86_64 CPU的所有ubuntu
lxc image list ubuntu: amd64

f: ubuntu 20.04 LTS amd64 (release) (20210819)
x: ubuntu 16.04 LTS amd64 (release) (20210429)
lxc launch ubuntu: f dev1
# 新版本
lxc launch ubuntu:20.04 dev1

连接MAAS

参考

1
2
lxc config set core.https_address :8443
lxc config set core.trust_password 111111

删除lxcbr0

1
2
3
4
#需要卸载lxd lxc
apt remove lxd lxc -y
apt autoremove -y

Docker cli 在unbuntu下没有命令行补全功能

起因

使用了docker swift 镜像

1
docker pull swift

问题原因:使用了精简版ubuntu

解决方法

方式一 (建议)

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
# step 1
apt install bash-completion -y
# lrwxrwxrwx 1 root root 4 Jun 8 01:24 /bin/sh -> bash
ls -l /bin/sh

# step 2

##
#debconf: unable to initialize frontend: Dialog
#debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
#debconf: falling back to frontend: Readline
#Configuring dash
# ----------------

#The system shell is the default command interpreter for shell scripts.

#Using dash as the system shell will improve the system's overall performance.
# It does not alter the shell presented to interactive users.

# Use dash as the default system shell (/bin/sh)? [yes/no]
## 选择 no

dpkg-reconfigure dash

# step 3

chmod +x /usr/share/bash-completion/bash_completion
/usr/share/bash-completion/bash_completion


方式二

1
2
3
4
apt  remove vim-common
apt autoremove
apt install vim -y

方式三 (不建议)

直接使用 *bash* , 不建议 会出现一些不必要的权限问题

1
2
3
4
5
6
# bash  --version
# GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

sh-4.4# bash
root@22a56bf7248b:/#

###源码

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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
#version 1.6.0
! function (e, n) {
"function" == typeof define && (define.amd || define.cmd) ? define(function () {
return n(e)
}) : n(e, !0)
}(this, function (o, e) {
if (!o.jWeixin) {
var n, c = {
config: "preVerifyJSAPI",
onMenuShareTimeline: "menu:share:timeline",
onMenuShareAppMessage: "menu:share:appmessage",
onMenuShareQQ: "menu:share:qq",
onMenuShareWeibo: "menu:share:weiboApp",
onMenuShareQZone: "menu:share:QZone",
previewImage: "imagePreview",
getLocation: "geoLocation",
openProductSpecificView: "openProductViewWithPid",
addCard: "batchAddCard",
openCard: "batchViewCard",
chooseWXPay: "getBrandWCPayRequest",
openEnterpriseRedPacket: "getRecevieBizHongBaoRequest",
startSearchBeacons: "startMonitoringBeacons",
stopSearchBeacons: "stopMonitoringBeacons",
onSearchBeacons: "onBeaconsInRange",
consumeAndShareCard: "consumedShareCard",
openAddress: "editAddress"
},
a = function () {
var e = {};
for (var n in c) e[c[n]] = n;
return e
}(),
i = o.document,
t = i.title,
r = navigator.userAgent.toLowerCase(),
s = navigator.platform.toLowerCase(),
d = !(!s.match("mac") && !s.match("win")),
u = -1 != r.indexOf("wxdebugger"),
l = -1 != r.indexOf("micromessenger"),
p = -1 != r.indexOf("android"),
f = -1 != r.indexOf("iphone") || -1 != r.indexOf("ipad"),
m = (n = r.match(/micromessenger\/(\d+\.\d+\.\d+)/) || r.match(/micromessenger\/(\d+\.\d+)/)) ? n[1] :
"",
g = {
initStartTime: L(),
initEndTime: 0,
preVerifyStartTime: 0,
preVerifyEndTime: 0
},
h = {
version: 1,
appId: "",
initTime: 0,
preVerifyTime: 0,
networkType: "",
isPreVerifyOk: 1,
systemType: f ? 1 : p ? 2 : -1,
clientVersion: m,
url: encodeURIComponent(location.href)
},
v = {},
S = {
_completes: []
},
y = {
state: 0,
data: {}
};
O(function () {
g.initEndTime = L()
});
var I = !1,
_ = [],
w = {
config: function (e) {
B("config", v = e);
var t = !1 !== v.check;
O(function () {
if (t) M(c.config, {
verifyJsApiList: C(v.jsApiList),
verifyOpenTagList: C(v.openTagList)
}, function () {
S._complete = function (e) {
g.preVerifyEndTime = L(), y.state = 1, y.data = e
}, S.success = function (e) {
h.isPreVerifyOk = 0
}, S.fail = function (e) {
S._fail ? S._fail(e) : y.state = -1
};
var t = S._completes;
return t.push(function () {
! function () {
if (!(d || u || v.debug || m < "6.0.2" || h.systemType <
0)) {
var i = new Image;
h.appId = v.appId, h.initTime = g.initEndTime -
g.initStartTime, h.preVerifyTime = g.preVerifyEndTime -
g.preVerifyStartTime, w.getNetworkType({
isInnerInvoke: !0,
success: function (e) {
h.networkType = e.networkType;
var n =
"https://open.weixin.qq.com/sdk/report?v=" +
h.version + "&o=" + h.isPreVerifyOk +
"&s=" + h.systemType +
"&c=" + h.clientVersion +
"&a=" + h.appId + "&n=" +
h.networkType + "&i=" +
h.initTime + "&p=" + h.preVerifyTime +
"&u=" + h.url;
i.src = n
}
})
}
}()
}), S.complete = function (e) {
for (var n = 0, i = t.length; n < i; ++n) t[n]();
S._completes = []
}, S
}()), g.preVerifyStartTime = L();
else {
y.state = 1;
for (var e = S._completes, n = 0, i = e.length; n < i; ++n) e[n]();
S._completes = []
}
}), w.invoke || (w.invoke = function (e, n, i) {
o.WeixinJSBridge && WeixinJSBridge.invoke(e, x(n), i)
}, w.on = function (e, n) {
o.WeixinJSBridge && WeixinJSBridge.on(e, n)
})
},
ready: function (e) {
0 != y.state ? e() : (S._completes.push(e), !l && v.debug && e())
},
error: function (e) {
m < "6.0.2" || (-1 == y.state ? e(y.data) : S._fail = e)
},
checkJsApi: function (e) {
M("checkJsApi", {
jsApiList: C(e.jsApiList)
}, (e._complete = function (e) {
if (p) {
var n = e.checkResult;
n && (e.checkResult = JSON.parse(n))
}
e = function (e) {
var n = e.checkResult;
for (var i in n) {
var t = a[i];
t && (n[t] = n[i], delete n[i])
}
return e
}(e)
}, e))
},
onMenuShareTimeline: function (e) {
P(c.onMenuShareTimeline, {
complete: function () {
M("shareTimeline", {
title: e.title || t,
desc: e.title || t,
img_url: e.imgUrl || "",
link: e.link || location.href,
type: e.type || "link",
data_url: e.dataUrl || ""
}, e)
}
}, e)
},
onMenuShareAppMessage: function (n) {
P(c.onMenuShareAppMessage, {
complete: function (e) {
"favorite" === e.scene ? M("sendAppMessage", {
title: n.title || t,
desc: n.desc || "",
link: n.link || location.href,
img_url: n.imgUrl || "",
type: n.type || "link",
data_url: n.dataUrl || ""
}) : M("sendAppMessage", {
title: n.title || t,
desc: n.desc || "",
link: n.link || location.href,
img_url: n.imgUrl || "",
type: n.type || "link",
data_url: n.dataUrl || ""
}, n)
}
}, n)
},
onMenuShareQQ: function (e) {
P(c.onMenuShareQQ, {
complete: function () {
M("shareQQ", {
title: e.title || t,
desc: e.desc || "",
img_url: e.imgUrl || "",
link: e.link || location.href
}, e)
}
}, e)
},
onMenuShareWeibo: function (e) {
P(c.onMenuShareWeibo, {
complete: function () {
M("shareWeiboApp", {
title: e.title || t,
desc: e.desc || "",
img_url: e.imgUrl || "",
link: e.link || location.href
}, e)
}
}, e)
},
onMenuShareQZone: function (e) {
P(c.onMenuShareQZone, {
complete: function () {
M("shareQZone", {
title: e.title || t,
desc: e.desc || "",
img_url: e.imgUrl || "",
link: e.link || location.href
}, e)
}
}, e)
},
updateTimelineShareData: function (e) {
M("updateTimelineShareData", {
title: e.title,
link: e.link,
imgUrl: e.imgUrl
}, e)
},
updateAppMessageShareData: function (e) {
M("updateAppMessageShareData", {
title: e.title,
desc: e.desc,
link: e.link,
imgUrl: e.imgUrl
}, e)
},
startRecord: function (e) {
M("startRecord", {}, e)
},
stopRecord: function (e) {
M("stopRecord", {}, e)
},
onVoiceRecordEnd: function (e) {
P("onVoiceRecordEnd", e)
},
playVoice: function (e) {
M("playVoice", {
localId: e.localId
}, e)
},
pauseVoice: function (e) {
M("pauseVoice", {
localId: e.localId
}, e)
},
stopVoice: function (e) {
M("stopVoice", {
localId: e.localId
}, e)
},
onVoicePlayEnd: function (e) {
P("onVoicePlayEnd", e)
},
uploadVoice: function (e) {
M("uploadVoice", {
localId: e.localId,
isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1
}, e)
},
downloadVoice: function (e) {
M("downloadVoice", {
serverId: e.serverId,
isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1
}, e)
},
translateVoice: function (e) {
M("translateVoice", {
localId: e.localId,
isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1
}, e)
},
chooseImage: function (e) {
M("chooseImage", {
scene: "1|2",
count: e.count || 9,
sizeType: e.sizeType || ["original", "compressed"],
sourceType: e.sourceType || ["album", "camera"]
}, (e._complete = function (e) {
if (p) {
var n = e.localIds;
try {
n && (e.localIds = JSON.parse(n))
} catch (e) {}
}
}, e))
},
getLocation: function (e) {},
previewImage: function (e) {
M(c.previewImage, {
current: e.current,
urls: e.urls
}, e)
},
uploadImage: function (e) {
M("uploadImage", {
localId: e.localId,
isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1
}, e)
},
downloadImage: function (e) {
M("downloadImage", {
serverId: e.serverId,
isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1
}, e)
},
getLocalImgData: function (e) {
!1 === I ? (I = !0, M("getLocalImgData", {
localId: e.localId
}, (e._complete = function (e) {
if (I = !1, 0 < _.length) {
var n = _.shift();
wx.getLocalImgData(n)
}
}, e))) : _.push(e)
},
getNetworkType: function (e) {
M("getNetworkType", {}, (e._complete = function (e) {
e = function (e) {
var n = e.errMsg;
e.errMsg = "getNetworkType:ok";
var i = e.subtype;
if (delete e.subtype, i) e.networkType = i;
else {
var t = n.indexOf(":"),
o = n.substring(t + 1);
switch (o) {
case "wifi":
case "edge":
case "wwan":
e.networkType = o;
break;
default:
e.errMsg = "getNetworkType:fail"
}
}
return e
}(e)
}, e))
},
openLocation: function (e) {
M("openLocation", {
latitude: e.latitude,
longitude: e.longitude,
name: e.name || "",
address: e.address || "",
scale: e.scale || 28,
infoUrl: e.infoUrl || ""
}, e)
},
getLocation: function (e) {
M(c.getLocation, {
type: (e = e || {}).type || "wgs84"
}, (e._complete = function (e) {
delete e.type
}, e))
},
hideOptionMenu: function (e) {
M("hideOptionMenu", {}, e)
},
showOptionMenu: function (e) {
M("showOptionMenu", {}, e)
},
closeWindow: function (e) {
M("closeWindow", {}, e = e || {})
},
hideMenuItems: function (e) {
M("hideMenuItems", {
menuList: e.menuList
}, e)
},
showMenuItems: function (e) {
M("showMenuItems", {
menuList: e.menuList
}, e)
},
hideAllNonBaseMenuItem: function (e) {
M("hideAllNonBaseMenuItem", {}, e)
},
showAllNonBaseMenuItem: function (e) {
M("showAllNonBaseMenuItem", {}, e)
},
scanQRCode: function (e) {
M("scanQRCode", {
needResult: (e = e || {}).needResult || 0,
scanType: e.scanType || ["qrCode", "barCode"]
}, (e._complete = function (e) {
if (f) {
var n = e.resultStr;
if (n) {
var i = JSON.parse(n);
e.resultStr = i && i.scan_code && i.scan_code.scan_result
}
}
}, e))
},
openAddress: function (e) {
M(c.openAddress, {}, (e._complete = function (e) {
e = function (e) {
return e.postalCode = e.addressPostalCode, delete e.addressPostalCode,
e.provinceName = e.proviceFirstStageName, delete e.proviceFirstStageName,
e.cityName = e.addressCitySecondStageName, delete e.addressCitySecondStageName,
e.countryName = e.addressCountiesThirdStageName, delete e.addressCountiesThirdStageName,
e.detailInfo = e.addressDetailInfo, delete e.addressDetailInfo,
e
}(e)
}, e))
},
openProductSpecificView: function (e) {
M(c.openProductSpecificView, {
pid: e.productId,
view_type: e.viewType || 0,
ext_info: e.extInfo
}, e)
},
addCard: function (e) {
for (var n = e.cardList, i = [], t = 0, o = n.length; t < o; ++t) {
var r = n[t],
a = {
card_id: r.cardId,
card_ext: r.cardExt
};
i.push(a)
}
M(c.addCard, {
card_list: i
}, (e._complete = function (e) {
var n = e.card_list;
if (n) {
for (var i = 0, t = (n = JSON.parse(n)).length; i < t; ++i) {
var o = n[i];
o.cardId = o.card_id, o.cardExt = o.card_ext, o.isSuccess = !!o.is_succ,
delete o.card_id, delete o.card_ext, delete o.is_succ
}
e.cardList = n, delete e.card_list
}
}, e))
},
chooseCard: function (e) {
M("chooseCard", {
app_id: v.appId,
location_id: e.shopId || "",
sign_type: e.signType || "SHA1",
card_id: e.cardId || "",
card_type: e.cardType || "",
card_sign: e.cardSign,
time_stamp: e.timestamp + "",
nonce_str: e.nonceStr
}, (e._complete = function (e) {
e.cardList = e.choose_card_info, delete e.choose_card_info
}, e))
},
openCard: function (e) {
for (var n = e.cardList, i = [], t = 0, o = n.length; t < o; ++t) {
var r = n[t],
a = {
card_id: r.cardId,
code: r.code
};
i.push(a)
}
M(c.openCard, {
card_list: i
}, e)
},
consumeAndShareCard: function (e) {
M(c.consumeAndShareCard, {
consumedCardId: e.cardId,
consumedCode: e.code
}, e)
},
chooseWXPay: function (e) {
M(c.chooseWXPay, V(e), e)
},
openEnterpriseRedPacket: function (e) {
M(c.openEnterpriseRedPacket, V(e), e)
},
startSearchBeacons: function (e) {
M(c.startSearchBeacons, {
ticket: e.ticket
}, e)
},
stopSearchBeacons: function (e) {
M(c.stopSearchBeacons, {}, e)
},
onSearchBeacons: function (e) {
P(c.onSearchBeacons, e)
},
openEnterpriseChat: function (e) {
M("openEnterpriseChat", {
useridlist: e.userIds,
chatname: e.groupName
}, e)
},
launchMiniProgram: function (e) {
M("launchMiniProgram", {
targetAppId: e.targetAppId,
path: function (e) {
if ("string" == typeof e && 0 < e.length) {
var n = e.split("?")[0],
i = e.split("?")[1];
return n += ".html", void 0 !== i ? n + "?" + i : n
}
}(e.path),
envVersion: e.envVersion
}, e)
},
openBusinessView: function (e) {
M("openBusinessView", {
businessType: e.businessType,
queryString: e.queryString || "",
envVersion: e.envVersion
}, (e._complete = function (n) {
if (p) {
var e = n.extraData;
if (e) try {
n.extraData = JSON.parse(e)
} catch (e) {
n.extraData = {}
}
}
}, e))
},
miniProgram: {
navigateBack: function (e) {
e = e || {}, O(function () {
M("invokeMiniProgramAPI", {
name: "navigateBack",
arg: {
delta: e.delta || 1
}
}, e)
})
},
navigateTo: function (e) {
O(function () {
M("invokeMiniProgramAPI", {
name: "navigateTo",
arg: {
url: e.url
}
}, e)
})
},
redirectTo: function (e) {
O(function () {
M("invokeMiniProgramAPI", {
name: "redirectTo",
arg: {
url: e.url
}
}, e)
})
},
switchTab: function (e) {
O(function () {
M("invokeMiniProgramAPI", {
name: "switchTab",
arg: {
url: e.url
}
}, e)
})
},
reLaunch: function (e) {
O(function () {
M("invokeMiniProgramAPI", {
name: "reLaunch",
arg: {
url: e.url
}
}, e)
})
},
postMessage: function (e) {
O(function () {
M("invokeMiniProgramAPI", {
name: "postMessage",
arg: e.data || {}
}, e)
})
},
getEnv: function (e) {
O(function () {
e({
miniprogram: "miniprogram" === o.__wxjs_environment
})
})
}
}
},
T = 1,
k = {};
return i.addEventListener("error", function (e) {
if (!p) {
var n = e.target,
i = n.tagName,
t = n.src;
if ("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i)
if (-1 != t.indexOf("wxlocalresource://")) {
e.preventDefault(), e.stopPropagation();
var o = n["wx-id"];
if (o || (o = T++, n["wx-id"] = o), k[o]) return;
k[o] = !0, wx.ready(function () {
wx.getLocalImgData({
localId: t,
success: function (e) {
n.src = e.localData
}
})
})
}
}
}, !0), i.addEventListener("load", function (e) {
if (!p) {
var n = e.target,
i = n.tagName;
n.src;
if ("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) {
var t = n["wx-id"];
t && (k[t] = !1)
}
}
}, !0), e && (o.wx = o.jWeixin = w), w
}

function M(n, e, i) {
o.WeixinJSBridge ? WeixinJSBridge.invoke(n, x(e), function (e) {
A(n, e, i)
}) : B(n, i)
}

function P(n, i, t) {
o.WeixinJSBridge ? WeixinJSBridge.on(n, function (e) {
t && t.trigger && t.trigger(e), A(n, e, i)
}) : B(n, t || i)
}

function x(e) {
return (e = e || {}).appId = v.appId, e.verifyAppId = v.appId, e.verifySignType = "sha1", e.verifyTimestamp =
v.timestamp + "", e.verifyNonceStr = v.nonceStr, e.verifySignature = v.signature, e
}

function V(e) {
return {
timeStamp: e.timestamp + "",
nonceStr: e.nonceStr,
package: e.package,
paySign: e.paySign,
signType: e.signType || "SHA1"
}
}

function A(e, n, i) {
"openEnterpriseChat" != e && "openBusinessView" !== e || (n.errCode = n.err_code), delete n.err_code,
delete n.err_desc, delete n.err_detail;
var t = n.errMsg;
t || (t = n.err_msg, delete n.err_msg, t = function (e, n) {
var i = e,
t = a[i];
t && (i = t);
var o = "ok";
if (n) {
var r = n.indexOf(":");
"confirm" == (o = n.substring(r + 1)) && (o = "ok"), "failed" == o && (o = "fail"), -1 != o
.indexOf("failed_") && (o = o.substring(7)), -1 != o.indexOf("fail_") && (o = o.substring(
5)), "access denied" != (o = (o = o.replace(/_/g, " ")).toLowerCase()) &&
"no permission to execute" != o || (o = "permission denied"), "config" == i &&
"function not exist" == o && (o = "ok"), "" == o && (o = "fail")
}
return n = i + ":" + o
}(e, t), n.errMsg = t), (i = i || {})._complete && (i._complete(n), delete i._complete), t = n.errMsg ||
"", v.debug && !i.isInnerInvoke && alert(JSON.stringify(n));
var o = t.indexOf(":");
switch (t.substring(o + 1)) {
case "ok":
i.success && i.success(n);
break;
case "cancel":
i.cancel && i.cancel(n);
break;
default:
i.fail && i.fail(n)
}
i.complete && i.complete(n)
}

function C(e) {
if (e) {
for (var n = 0, i = e.length; n < i; ++n) {
var t = e[n],
o = c[t];
o && (e[n] = o)
}
return e
}
}

function B(e, n) {
if (!(!v.debug || n && n.isInnerInvoke)) {
var i = a[e];
i && (e = i), n && n._complete && delete n._complete, console.log('"' + e + '",', n || "")
}
}

function L() {
return (new Date).getTime()
}

function O(e) {
l && (o.WeixinJSBridge ? e() : i.addEventListener && i.addEventListener("WeixinJSBridgeReady", e, !1))
}
});

下载jweixin源码

顺序 :

  1. 千年灵芝
  2. 百年玄黄
  3. 万年首乌

药笺

  • 平凡的药笺: 5 5 5/6 6 6
  • 普通的药笺: 4 4 4
  • 无用的药笺: 1 1 1
  • 一般的药笺: 17 1 1

  • 明目方(8): 2 1 3
  • 舒经方: 1 3 1
  • 续骨方(12): 2 8 2
  • 保元方:(12): 1 4 7

玄参白术笺: 6 1 7
温里固涩笺: 10 9 3

#Failed to start LSB: Start Jenkins at boot time.

启动时报错

1
2
3
4
sudo systemctl restart jenkins.service
systemctl status jenkins.service
journalctl -xe

报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Job for jenkins.service failed because the control process exited with error code.
See "systemctl status jenkins.service" and "journalctl -xe" for details.
invoke-rc.d: initscript jenkins, action "start" failed.
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: failed (Result: exit-code) since Fri 2020-10-16 08:13:34 UTC; 70ms ago
Docs: man:systemd-sysv-generator(8)
Process: 18357 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)

Oct 16 08:13:32 ubuntu systemd[1]: Starting LSB: Start Jenkins at boot time...
Oct 16 08:13:34 ubuntu jenkins[18357]: Found an incorrect Java version
Oct 16 08:13:34 ubuntu jenkins[18357]: Java version found:
Oct 16 08:13:34 ubuntu jenkins[18372]: openjdk version "14.0.1" 2020-04-14
Oct 16 08:13:34 ubuntu jenkins[18372]: OpenJDK Runtime Environment (build 14.0.1+7-Ubuntu-1ubuntu1)
Oct 16 08:13:34 ubuntu jenkins[18372]: OpenJDK Server VM (build 14.0.1+7-Ubuntu-1ubuntu1, mixed mode, sharing)
Oct 16 08:13:34 ubuntu jenkins[18357]: Aborting
Oct 16 08:13:34 ubuntu systemd[1]: jenkins.service: Control process exited, code=exited, status=1/FAILURE
Oct 16 08:13:34 ubuntu systemd[1]: jenkins.service: Failed with result 'exit-code'.
Oct 16 08:13:34 ubuntu systemd[1]: Failed to start LSB: Start Jenkins at boot time.

主要原因是系统自带的tomcat 占用了8080端口

如果你的/etc/init.d/jenkins文件无法启动Jenkins,编辑/etc/default/jenkins, 修改 —-HTTP_PORT=8080—-为----HTTP_PORT=8081---- 在这里,“8081”也可被换为其他可用端口。

###: 修改启动用户为root

###: 使用java14

报错:

1
2
3
4
5
6
7
8
9
Oct 16 09:02:57 ubuntu jenkins[15764]: Found an incorrect Java version
Oct 16 09:02:57 ubuntu jenkins[15764]: Java version found:
Oct 16 09:02:57 ubuntu jenkins[15779]: openjdk version "14.0.1" 2020-04-14
Oct 16 09:02:57 ubuntu jenkins[15779]: OpenJDK Runtime Environment (build 14.0.1+7-Ubuntu-1ubuntu1)
Oct 16 09:02:57 ubuntu jenkins[15779]: OpenJDK Server VM (build 14.0.1+7-Ubuntu-1ubuntu1, mixed mode, sharing)
Oct 16 09:02:57 ubuntu jenkins[15764]: Aborting
Oct 16 09:02:57 ubuntu systemd[1]: jenkins.service: Control process exited, code=exited, status=1/FAILURE
Oct 16 09:02:57 ubuntu systemd[1]: jenkins.service: Failed with result 'exit-code'.
Oct 16 09:02:57 ubuntu systemd[1]: Failed to start LSB: Start Jenkins at boot time.
1
2
3
4
5
6
7
8
9
10
11
12
13
sudo vi  /etc/default/jenkins
# 将JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT"
改为
#JENKINS_ARGS="--enable-future-java --webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT"


sudo vi /etc/init.d/jenkins
# 将JAVA_ALLOWED_VERSIONS=( "18" "110" ) 改为
# JAVA_ALLOWED_VERSIONS=( "18" "140" )

#刷新daemon
sudo systemctl daemon-reload && sudo systemctl restart jenkins.service
cat /var/log/jenkins/jenkins.log
0%