-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeed.xml
More file actions
1786 lines (1721 loc) · 102 KB
/
feed.xml
File metadata and controls
1786 lines (1721 loc) · 102 KB
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
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>wxm's Blog</title>
<link>https://wxmvv.github.io/blog</link>
<description>Developer</description>
<language>zh-cn</language>
<managingEditor>wxmvv@outlook.com (wxm)</managingEditor>
<webMaster>wxmvv@outlook.com (wxm)</webMaster>
<lastBuildDate>Fri, 20 Mar 2026 00:00:00 GMT</lastBuildDate>
<atom:link href="https://wxmvv.github.io/feed.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://wxmvv.github.io/blog/code/ai/2026年的codex强的可怕</guid>
<title>2026年的codex强的可怕</title>
<link>https://wxmvv.github.io/blog/code/ai/2026年的codex强的可怕</link>
<description><p>codex真香,订阅了Plus会员一百多,用它把我的旧项目修了一个遍...就一个感受:额度太多了!用不完!根本用不完!</p>
<p>gpt5.4 ! gpt5.4 ! gpt5.4 ! 香!</p>
<h2>0405 补充</h2>
<p>已经用了快一个月了,codex 给我的最大感受就是修 bug 真的很准!尤其是在公司有大型屎山项目的情况下,改 bug 甚至比 claude 还要准,并且用的 token 还少,这谁受的了。</p>
<p>不过也不是没有缺点,比如 codex 的审美真的很拉,相比之下 Claude 设计的 UI 就要好看很多。还有就是如果启动一个新项目,尤其在架构设计方面,codex 给出的方案会非常抽象工程化,而且起名真的苦手,很多名字结构感觉都是直接从书上扒下来的,相比之下 Claude 给出的架构方案会更贴近实际情况,并且起名明显也是参考了不少实际项目。</p>
<p>所以目前我也在更多使用 Claude 来制定开发计划,设计 UI,而让 codex 去执行,或者修 bug。</p>
</description>
<pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>codex</category><category>AI</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/homepage/实现一下液态玻璃效果</guid>
<title>用html和css实现一下液态玻璃(liquid glass)效果</title>
<link>https://wxmvv.github.io/blog/homepage/实现一下液态玻璃效果</link>
<description><p><a href="https://juejin.cn/post/7514618352829448244">参考1 juejin</a>
<a href="https://kube.io/blog/liquid-glass-css-svg/">参考2 kube.io</a></p>
<p>参考了大神的实现,自己又调整了参数,并且适配了黑暗模式,仅供参考。</p>
<p>效果就在主页的菜单Hover就可以看到,在Safari中svg反射效果不生效,用Chrome就能正常显示。</p>
<pre><code class="language-js">&lt;div className=&quot;liquid_glass-wrapper h-full w-full&quot;&gt;
&lt;svg style={{ display: &quot;none&quot; }}&gt;
&lt;defs&gt;
&lt;filter
id=&quot;liquid_glass_filter&quot;
x=&quot;0%&quot;
y=&quot;0%&quot;
width=&quot;100%&quot;
height=&quot;100%&quot;
filterUnits=&quot;objectBoundingBox&quot;
&gt;
&lt;feDisplacementMap scale=&quot;200&quot; /&gt;
&lt;/filter&gt;
&lt;/defs&gt;
&lt;/svg&gt;
&lt;div className=&quot;liquid_glass-outer&quot;&gt;&lt;/div&gt;
&lt;div className=&quot;liquid_glass-cover&quot;&gt;&lt;/div&gt;
&lt;div className=&quot;liquid_glass-sharp&quot;&gt;&lt;/div&gt;
&lt;div className=&quot;liquid_glass-reflect&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>适配了黑暗模式的css</p>
<pre><code class="language-css">.liquid_glass-wrapper {
--liquid_glass-border-radius: 1rem;
position: relative;
display: flex;
overflow: hidden;
border: 1px solid #00000020;
background: linear-gradient(180deg, #ffffff10, #fafafa00);
box-shadow:
inset 0 2px 4px 0 #fff,
inset 0 -4px 4px 0 hsla(0, 0%, 100%, 0.1),
inset 0 -4px 16px 0 #fff,
inset 0 4px 10px 0 hsla(240, 3%, 45%, 0.07),
0 4px 14px -10px rgba(53, 53, 79, 0.4),
0 11px 28px -10px rgba(53, 53, 79, 0.1);
border-radius: var(--liquid_glass-border-radius);
}
.liquid_glass-border-radius {
border-radius: var(--liquid_glass-border-radius);
}
.liquid_glass-outer {
backdrop-filter: url(#liquid_glass_filter);
position: absolute;
inset: 0;
z-index: 0;
border-radius: var(--liquid_glass-border-radius);
mask-image:
url(&#39;data:image/svg+xml;utf8,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;&lt;rect x=&quot;0&quot; y=&quot;0&quot; width=&quot;100%&quot; height=&quot;100%&quot; rx=&quot;0&quot; ry=&quot;0&quot; fill=&quot;white&quot;/&gt;&lt;/svg&gt;&#39;),
url(&#39;data:image/svg+xml;utf8,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;calc(100% - 10px)&quot; height=&quot;calc(100% - 10px)&quot; rx=&quot;21&quot; ry=&quot;21&quot; fill=&quot;white&quot;/&gt;&lt;/svg&gt;&#39;);
mask-composite: exclude;
}
.liquid_glass-cover {
backdrop-filter: blur(2px);
position: absolute;
inset: 0;
z-index: 2;
border-radius: var(--liquid_glass-border-radius);
background: rgba(0, 0, 0, 0.02);
}
.liquid_glass-sharp {
position: absolute;
inset: 0;
z-index: 3;
box-shadow:
inset 1px 1px 0px 0px rgba(255, 255, 255, 0.5),
inset -1px -1px 0px 0px rgba(255, 255, 255, 0.6);
border-radius: var(--liquid_glass-border-radius);
}
.liquid_glass-reflect {
position: absolute;
inset: 1px;
z-index: 2;
border-radius: var(--liquid_glass-border-radius);
}
.dark {
/* https://juejin.cn/post/7514618352829448244 */
.liquid_glass-wrapper {
--liquid_glass-border-radius: 1rem;
position: relative;
display: flex;
overflow: hidden;
border: 1px solid #ffffff20;
background: linear-gradient(180deg, #ffffff10, #fafafa00);
box-shadow:
inset 0 2px 4px 0 #00000040,
inset 0 -4px 4px 0 hsla(0, 0%, 0%, 0.1),
inset 0 -4px 16px 0 #00000060,
inset 0 4px 10px 0 hsla(0, 0%, 13%, 0.07),
0 4px 14px -10px rgba(112, 112, 167, 0.4),
0 11px 28px -10px rgba(53, 53, 79, 0.1);
border-radius: var(--liquid_glass-border-radius);
}
.liquid_glass-border-radius {
border-radius: var(--liquid_glass-border-radius);
}
.liquid_glass-outer {
backdrop-filter: url(#liquid_glass_filter);
position: absolute;
inset: 0;
z-index: 0;
border-radius: var(--liquid_glass-border-radius);
mask-image:
url(&#39;data:image/svg+xml;utf8,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;&lt;rect x=&quot;0&quot; y=&quot;0&quot; width=&quot;100%&quot; height=&quot;100%&quot; rx=&quot;0&quot; ry=&quot;0&quot; fill=&quot;white&quot;/&gt;&lt;/svg&gt;&#39;),
url(&#39;data:image/svg+xml;utf8,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;calc(100% - 10px)&quot; height=&quot;calc(100% - 10px)&quot; rx=&quot;21&quot; ry=&quot;21&quot; fill=&quot;white&quot;/&gt;&lt;/svg&gt;&#39;);
mask-composite: exclude;
}
.liquid_glass-cover {
backdrop-filter: blur(2px);
position: absolute;
inset: 0;
z-index: 2;
border-radius: var(--liquid_glass-border-radius);
background: rgba(0, 0, 0, 0.02);
}
.liquid_glass-sharp {
position: absolute;
inset: 0;
z-index: 3;
box-shadow:
inset 1px 1px 0px 0px rgba(255, 255, 255, 0.2),
inset -1px -1px 0px 0px rgba(255, 255, 255, 0.3);
border-radius: var(--liquid_glass-border-radius);
}
.liquid_glass-reflect {
position: absolute;
inset: 1px;
z-index: 2;
border-radius: var(--liquid_glass-border-radius);
}
}
</code></pre>
</description>
<pubDate>Fri, 06 Feb 2026 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>animation</category><category>css</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/music/work-music</guid>
<title>20251013 work music sharing</title>
<link>https://wxmvv.github.io/blog/music/work-music</link>
<description><h2>youtube take your time</h2>
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="450" src="//music.163.com/outchain/player?type=4&id=1228137686&auto=0&height=430"></iframe>
<h2>youtube utopic_dreamer</h2>
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="450" src="//music.163.com/outchain/player?type=4&id=1230910500&auto=0&height=430"></iframe>
</description>
<pubDate>Mon, 13 Oct 2025 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>music</category><category>music share</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/code/js/完全解决nvm启动速度慢的问题2</guid>
<title>完全解决nvm启动速度慢的问题2</title>
<link>https://wxmvv.github.io/blog/code/js/完全解决nvm启动速度慢的问题2</link>
<description><p>时隔 3 年,我终于找到了彻底解决 nvm 启动速度慢的方法,并且这个方法对 macOS 和 Windows 系统都有效!</p>
<p>那就是:删掉 nvm 使用 fnm!</p>
<p>几乎一样的使用方式,完全没有迁移成本!速度贼快!</p>
<p><a href="https://github.com/Schniz/fnm?tab=readme-ov-file#shell-setup">fnm</a></p>
</description>
<pubDate>Thu, 03 Jul 2025 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>shell</category><category>macos</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/homepage/aria2Helper最新版本1_4</guid>
<title>Aria2Helper新版本1.4来啦!!</title>
<link>https://wxmvv.github.io/blog/homepage/aria2Helper最新版本1_4</link>
<description><p>距离上一次更新已经很久了,这次更新带来了新的 setting 界面,使用 tailwind+daisyUI 重新构建,整体设计参考苹果系统的设置,以及<a href="https://github.com/zerebos/ghostty-config">ghostty-config</a>项目,并且添加了更多的色彩主题。</p>
<p>项目地址: <a href="https://github.com/wxmvv/Aria2Helper-for-Safari">Aria2Helper for Safari</a></p>
<p><img src="https://wxmvv.github.io/static/images/Aria2HelperForSafari/Aria2HelperForSafariNewSettings1.png" alt="setting1">
<img src="https://wxmvv.github.io/static/images/Aria2HelperForSafari/Aria2HelperForSafariNewSettings2.png" alt="setting2"></p>
</description>
<pubDate>Sat, 28 Jun 2025 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>safari</category><category>Aria2Helper</category><category>my app</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/homepage/MyTuner也上线啦</guid>
<title>MyTuner也上线啦,简约设计的调音器,支持多种乐器~</title>
<link>https://wxmvv.github.io/blog/homepage/MyTuner也上线啦</link>
<description><img src="https://github.com/wxmvv/MyTuner/raw/main/Images/icon.png" width="60" height="60" align="center" />
<h2>链接</h2>
<p>项目地址: <a href="https://github.com/wxmvv/MyTuner">My Tuner</a></p>
<p>商店链接:<a href="https://apps.apple.com/app/id6746087511"><img src="https://raw.githubusercontent.com/wxmvv/MyTuner/refs/heads/main/Images/appstore.svg" alt="Download on the App Store"></a></p>
<h2>预览</h2>
<table>
<thead>
<tr>
<th>Dark</th>
<th>Light</th>
</tr>
</thead>
<tbody><tr>
<td><img src="https://raw.githubusercontent.com/wxmvv/MyTuner/refs/heads/main/Images/ios-dark-shortcut.png" alt=""></td>
<td><img src="https://raw.githubusercontent.com/wxmvv/MyTuner/refs/heads/main/Images/ios-light-shortcut.png" alt=""></td>
</tr>
</tbody></table>
<h2>介绍</h2>
<p>大概花了半个月时间,断断续续把这个 My Tuner 完成了。</p>
<p>一开始在 AI 的建议下从 0 开始码了一个版本,自己实现了一个 FFT 音高识别,无奈的是准确度有点低,最后只能先放弃,最后参考了 AudioKit 这个库实现的音高识别,准确度大大提高。</p>
<p>其他的功能包括设置的实现都相对简单,也算是从编程的角度对音调又有了一些更全面的尝试。</p>
<p>欢迎大家下载下来尝试~</p>
</description>
<pubDate>Tue, 27 May 2025 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>music</category><category>iOS</category><category>my app</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/note/aria2Helper更新1.1</guid>
<title>Aria2Helper更新1.1 !</title>
<link>https://wxmvv.github.io/blog/note/aria2Helper更新1.1</link>
<description><p>最近在使用过程中遇到一些小 bug,于是修复了一下更新了 1.1 版本,顺便添加了新功能:</p>
<ul>
<li>添加了监听白名单于黑名单</li>
<li>popup 页面添加了监听快捷按钮</li>
<li>添加了多语言支持</li>
<li>更新了 icon</li>
<li>更新了 UI 界面</li>
<li>修复了一些 content 脚本 bug</li>
</ul>
<p>项目地址: <a href="https://github.com/wxmvv/Aria2Helper-for-Safari">Aria2Helper for Safari</a></p>
<p>App 文件: <a href="https://wxmvv.github.io/static/file/aria2Helper.zip">Aria2Helper.zip</a></p>
</description>
<pubDate>Sat, 15 Mar 2025 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>safari</category><category>Aria2Helper</category><category>my app</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/vpn/VPS下载测速文件100M1GB10GB</guid>
<title>VPS下载测速文件100M/1GB/10GB</title>
<link>https://wxmvv.github.io/blog/vpn/VPS下载测速文件100M1GB10GB</link>
<description><blockquote>
<p>转载自 <a href="https://lot.pm/vps-download-speedtest-files.html">lot.pm</a></p>
</blockquote>
<h2>推荐:全球通用(Cloudflare Anycast)</h2>
<p>速度极快,推荐国外使用。</p>
<h3>100MB</h3>
<pre><code class="language-markdown">https://speed.cloudflare.com/__down?during=download&amp;bytes=104857600
</code></pre>
<h3>1GB</h3>
<pre><code class="language-markdown">https://speed.cloudflare.com/__down?during=download&amp;bytes=1073741824
</code></pre>
<h3>10GB</h3>
<pre><code class="language-markdown">https://speed.cloudflare.com/__down?during=download&amp;bytes=10737418240
</code></pre>
<h2>中国大陆推荐</h2>
<h3>200MB(QQ)</h3>
<p>腾讯 CDN 加速。</p>
<pre><code class="language-markdown">https://dldir1.qq.com/qqfile/qq/PCQQ9.7.17/QQ9.7.17.29225.exe
</code></pre>
<h3>300MB(阿里 CDN)</h3>
<pre><code class="language-markdown">https://wirelesscdn-download.xuexi.cn/publish/xuexi_android/latest/xuexi_android_10002068.apk
</code></pre>
<h3>1000MB (教育网)</h3>
<pre><code class="language-markdown">http://speedtest.zju.edu.cn/1000M
</code></pre>
<h3>1GB/10GB(电信)</h3>
<pre><code class="language-markdown">http://vipspeedtest8.wuhan.net.cn:8080/download?size=1073741824
http://vipspeedtest8.wuhan.net.cn:8080/download?size=10737418240
</code></pre>
<h3>2GB(推荐)</h3>
<pre><code class="language-markdown">自适应 https://dlied4.myapp.com/myapp/1104466820/cos.release-40109/10040714_com.tencent.tmgp.sgame_a2480356_8.2.1.9_F0BvnI.apk
联通 https://ml-dlied4.bytes.tcdnos.com/myapp/1104466820/cos.release-40109/10040714_com.tencent.tmgp.sgame_a2480356_8.2.1.9_F0BvnI.apk
移动 https://875e1151af8aa9e3b793f51f6049996d.dlied1.cdntips.net/dlied4.myapp.com/myapp/1104466820/cos.release-40109/10040714_com.tencent.tmgp.sgame_a2480356_8.2.1.9_F0BvnI.apk
电信 https://dlied4.csy.tcdnos.com/myapp/1104466820/cos.release-40109/10040714_com.tencent.tmgp.sgame_a2480356_8.2.1.9_F0BvnI.apk
</code></pre>
<h3>3GB(Apple)</h3>
<p>国内似乎用的是金山 CDN,国际是 Akamai 和苹果自家 CDN。</p>
<pre><code class="language-markdown">http://updates-http.cdn-apple.com/2019WinterFCS/fullrestores/041-39257/32129B6C-292C-11E9-9E72-4511412B0A59/iPhone_4.7_12.1.4_16D57_Restore.ipsw
</code></pre>
<h2>亚洲</h2>
<h3>中国香港</h3>
<p>100MB (Datapacket/CDN77)</p>
<pre><code class="language-markdown">http://hkg.download.datapacket.com/100mb.bin
</code></pre>
<p>1000MB(Datapacket/CDN77)</p>
<pre><code class="language-markdown">http://hkg.download.datapacket.com/1000mb.bin
</code></pre>
<p>10000MB(Datapacket/CDN77)</p>
<pre><code class="language-markdown">http://hkg.download.datapacket.com/10000mb.bin
</code></pre>
<h3>新加坡</h3>
<p>100/1000/10000MB (Datapacket/CDN77)</p>
<pre><code class="language-markdown">http://sgp.download.datapacket.com/100mb.bin
http://sgp.download.datapacket.com/1000mb.bin
http://sgp.download.datapacket.com/10000mb.bin
</code></pre>
<p>100MB(OVH)</p>
<pre><code class="language-markdown">https://sgp.proof.ovh.net/files/100Mb.dat
</code></pre>
<p>100MB(Vultr)</p>
<pre><code class="language-markdown">https://sgp-ping.vultr.com/vultr.com.100MB.bin
</code></pre>
<p>1GB(OVH)</p>
<pre><code class="language-markdown">https://sgp.proof.ovh.net/files/1Gb.dat
</code></pre>
<p>1GB(Vultr)</p>
<pre><code class="language-markdown">https://sgp-ping.vultr.com/vultr.com.1000MB.bin
</code></pre>
<p>10GB(OVH)</p>
<pre><code class="language-markdown">https://sgp.proof.ovh.net/files/10Gb.dat
</code></pre>
<h3>日本东京</h3>
<p>100/1000/10000MB (Datapacket/CDN77)</p>
<pre><code class="language-markdown">http://tyo.download.datapacket.com/100mb.bin
http://tyo.download.datapacket.com/1000mb.bin
http://tyo.download.datapacket.com/10000mb.bin
</code></pre>
<p>100MB/1GB(Vultr)</p>
<pre><code class="language-markdown">https://hnd-jp-ping.vultr.com/vultr.com.100MB.bin
https://hnd-jp-ping.vultr.com/vultr.com.1000MB.bin
</code></pre>
<h2>欧洲</h2>
<h3>德国</h3>
<p>推荐使用 Hetzner 的测速文件。<br>100MB(Nuremberg-Hetzner)</p>
<pre><code class="language-markdown">https://nbg1-speed.hetzner.com/100MB.bin
</code></pre>
<p>100MB(Frankfurt-Vultr)</p>
<pre><code class="language-markdown">https://fra-de-ping.vultr.com/vultr.com.100MB.bin
</code></pre>
<p>1GB(Nuremberg-Hetzner)</p>
<pre><code class="language-markdown">https://nbg1-speed.hetzner.com/1GB.bin
</code></pre>
<p>1GB(Frankfurt-Vultr)</p>
<pre><code class="language-markdown">https://fra-de-ping.vultr.com/vultr.com.1000MB.bin
</code></pre>
<p>10GB(Nuremberg-Hetzner)</p>
<pre><code class="language-markdown">https://nbg1-speed.hetzner.com/10GB.bin
</code></pre>
<p>10GB(Frankfurt-Hivelocity)</p>
<pre><code class="language-markdown">https://speedtest.fra1.hivelocity.net/10GiB.file
</code></pre>
<h3>法国</h3>
<p>100/1000/10000MB (Datapacket/CDN77)</p>
<pre><code class="language-markdown">http://par.download.datapacket.com/100mb.bin
http://par.download.datapacket.com/1000mb.bin
http://par.download.datapacket.com/10000mb.bin
</code></pre>
<p>100MB(OVH)</p>
<pre><code class="language-markdown">https://gra.proof.ovh.net/files/100Mb.dat
</code></pre>
<p>1GB(OVH)</p>
<pre><code class="language-markdown">https://gra.proof.ovh.net/files/1Gb.dat
</code></pre>
<p>10GB(OVH)</p>
<pre><code class="language-markdown">https://gra.proof.ovh.net/files/10Gb.dat
</code></pre>
<h2>北美</h2>
<h3>美西</h3>
<p>100/1000/10000MB (Datapacket/CDN77 洛杉矶)</p>
<pre><code class="language-markdown">http://lax.download.datapacket.com/100mb.bin
http://lax.download.datapacket.com/1000mb.bin
http://lax.download.datapacket.com/10000mb.bin
</code></pre>
<p>100MB(Oregon-OVH)</p>
<pre><code class="language-markdown">https://hil.proof.ovh.us/files/100Mb.dat
</code></pre>
<p>100MB(LA-Vultr)</p>
<pre><code class="language-markdown">https://lax-ca-us-ping.vultr.com/vultr.com.100MB.bin
</code></pre>
<p>1GB(Oregon-OVH)</p>
<pre><code class="language-markdown">https://hil.proof.ovh.us/files/1Gb.dat
</code></pre>
<p>1GB(LA-Vultr)</p>
<pre><code class="language-markdown">https://lax-ca-us-ping.vultr.com/vultr.com.1000MB.bin
</code></pre>
<p>10GB(Oregon-OVH)</p>
<pre><code class="language-markdown">https://hil.proof.ovh.us/files/10Gb.dat
</code></pre>
<p>10GB (Oregon-Hetzner)</p>
<pre><code class="language-markdown">https://hil-speed.hetzner.com/10GB.bin
</code></pre>
<h3>美东</h3>
<p>100/1000/10000MB (Datapacket/CDN77 阿什本)</p>
<pre><code class="language-markdown">http://ash.download.datapacket.com/100mb.bin
http://ash.download.datapacket.com/1000mb.bin
http://ash.download.datapacket.com/10000mb.bin
</code></pre>
<p>100MB(Virginia-OVH)</p>
<pre><code class="language-markdown">https://vin.proof.ovh.us/files/100Mb.dat
</code></pre>
<p>100MB(New Jersey-Vultr)</p>
<pre><code class="language-markdown">https://nj-us-ping.vultr.com/vultr.com.100MB.bin
</code></pre>
<p>1GB(Virginia-OVH)</p>
<pre><code class="language-markdown">https://vin.proof.ovh.us/files/1Gb.dat
</code></pre>
<p>1GB(New Jersey-Vultr)</p>
<pre><code class="language-markdown">https://nj-us-ping.vultr.com/vultr.com.1000MB.bin
</code></pre>
<p>10GB(Virginia-OVH)</p>
<pre><code class="language-markdown">https://vin.proof.ovh.us/files/10Gb.dat
</code></pre>
<p>10GB(Virginia-Hetzner)</p>
<pre><code class="language-markdown">https://ash-speed.hetzner.com/10GB.bin
</code></pre>
</description>
<pubDate>Sat, 15 Mar 2025 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>code</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/note/safari插件Aria2Helper开发</guid>
<title>Safari插件Aria2Helper开发踩坑集</title>
<link>https://wxmvv.github.io/blog/note/safari插件Aria2Helper开发</link>
<description><p>花了大概 1 周多时间,断断续续终于把这个 Aria2Helper 插件完成了。如果使用有什么问题也可以邮寄联系我,或者在 github 上提 issue。</p>
<p>项目地址: <a href="https://github.com/wxmvv/Aria2Helper-for-Safari">Aria2Helper for Safari</a></p>
<p>App 文件: <a href="https://wxmvv.github.io/static/file/aria2Helper.zip">Aria2Helper for Safari.zip</a></p>
<h2>商店链接</h2>
<p>也欢迎去 App Store 下载,支持一下我的开发。</p>
<p><a href="https://apps.apple.com/us/app/aria2helper/id6742623503#?platform=mac"><img src="https://raw.githubusercontent.com/wxmvv/Aria2Helper-for-Safari/refs/heads/main/Shared%20(Extension)/Download_on_the_Mac_App_Store_Badge_US-UK_RGB_blk_092917.svg" alt="Download on the Mac App Store"></a></p>
<h2>为何而做</h2>
<p>Safari 本身的下载器无法断点续传,下载大文件到一半断网后重新下载需要重新下载,实在是让人崩溃。如果想使用其他下载方式则需要复制粘贴下载链接,如果需要下载的链接一多真的是鼠标点爆炸。在 chrome 有很多好用的插件可以通过设置 rpc 来想配合 Motrix 下载文件,而且都包含下载拦截功能,在我搜索了 app store 之后也没有看到相关功能的插件。于是决定自己开发一个。</p>
<h2>主要功能</h2>
<ol>
<li>通过多种方式在 Safari 中快速添加下载链接到 Aria2</li>
<li>实时显示 Aria2 的任务下载进度</li>
<li>支持 Aria2 的多种功能,如暂停、删除、强制开始、强制暂停、强制移除等</li>
<li>支持对点击下载链接拦截,使用 aria2 代替 Safari 下载</li>
</ol>
<h2>遇到的一些问题与解决</h2>
<ol>
<li>safari 不支持 notification</li>
</ol>
<p>在<a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/API/notifications">mdn notification 文档</a>最下面可以看到 safari 并不支持,但是我确实有在其他 safari 中看到调用 notifications 的案例。其实他们是使用的 app 端口的 notifications API,需要将信息从 web 项目发送到 app 端,然后通过 app 展示。</p>
<ol start="2">
<li>safari 不支持 browser.download API</li>
</ol>
<p>本来想用 browser.download 这个来实现获取默认下载然后发送 aria2 的,但是<a href="https://developer.apple.com/forums/thread/660046">safari 不支持 browser.download API</a>,于是考虑其他方案,经过尝试,选择了拦截用户点击请求的方式,拦截后获取点击链接中的文件链接,然后发送到 aria2。</p>
<ol start="3">
<li>web 插件开发中 popup 页面的背景问题</li>
</ol>
<p>我在插件中的 popup 页面,的很多地方使用了透明背景,如果是第一次运行,它会像 chrome 插件一样显示白色或黑色的背景(根据电脑是否黑暗模式),但是当你的 safari 运行一段时间后,它的背景色会消失,变成苹果的磨砂玻璃背景,虽然很好看,但是完全随机发生,目前没有好的解决办法。</p>
<ol start="4">
<li>动态获取并设置 body 宽度造成的问题</li>
</ol>
<p>因为我是希望开发一个外观类似 safari 本身下载器外形的插件,所以想动态设置 body 宽度。
具体实现是先将 body 的宽设置为 auto,在打开 popup 页面是根据下载项中的最宽一项设置 body 宽度,但这样会在打开的一瞬间 body 还没有设置 width,导致页面大小闪烁,无法接受,最后还是选择了使用固定宽度。</p>
<ol start="5">
<li>app 开发模式中的调试问题</li>
</ol>
<p>其中有一个 <code>os_log()</code> 函数用于调试,但是输出不知道在哪,后来才发现是系统自带 console.app,在这里面搜索就能看到,记得打开流式传输。</p>
<p>还有,如果使用 <code>%@</code> 来作为占位符,则在控制台中会显示 &quot;pravite&quot; 标签 ,如果像明文显示信息,可以使用 <code>%{public}s</code> 来作为占位符。</p>
<ol start="6">
<li>xcode 打包之后,再 run 有概率会让 safari 的 app 出现错误</li>
</ol>
<p>解决办法就是 product -&gt; clean build folder,如果还是有问题就打开 build 文件夹 Show Build Folder in Finder,然后将里面的文件夹都删了,在重启 safari 就好了。</p>
<ol start="7">
<li><p>关于在 css 中使用系统色
<code>background: -apple-system-control-accent;</code></p>
<p><a href="https://stackoverflow.com/questions/62797493/how-can-i-use-the-macos-system-accent-color-in-css">stackoverflow 参考</a></p>
</li>
</ol>
<h2>最后</h2>
<p>比预计多花了不少时间,但是总算是完成了,后续再慢慢优化吧。</p>
<p>也想总结下 safari 插件开发的一些经验,方便以后开发。</p>
</description>
<pubDate>Fri, 31 Jan 2025 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>safari</category><category>Aria2Helper</category><category>my app</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/note/终于通关八方旅人2</guid>
<title>终于通关八方旅人2</title>
<link>https://wxmvv.github.io/blog/note/终于通关八方旅人2</link>
<description><p>断断续续终于通关了八方旅人 2,这么久才通过一方面是最近时间少,另一方面是我的心里总是会有一些复杂的情绪,让我不想通关,希望故事能一直持续下去。</p>
<p>音乐部分很棒,在编曲方面可以说全面性的丰富了,不过再回去听 1 代的音乐,虽然没有 2 代乐器更多,编织更丰富,但是依然有很多亮点。仅仅听着音乐久可以让我在城镇树林间穿梭时沉浸其中。</p>
<p>剧情部分相比 1 代丰富了不少,每个人多了一个剧情场景,而且还多了双人剧情,用一条暗线将每个角色联系在一起。不过也有一些莫名其妙的狗血剧情,比如我使用的盗贼小姐开局,前三章玩完觉得有点意思,一个很正的复仇舞台剧,从杀“蛇父”那里就开始不对劲了,本来觉得“复仇爽”的故事,一下变成了狗血伦理剧?当时看完剧情的我满头问号。虽然有狗血的,但是也有我觉得很亮眼的剧情设计,比如商人部分,尤其是最后富豪开着船来支援的时候,还有最后的大战火车,这的让我有一种中二的热血感,很赞。 其他的,如猎人,神官,舞娘的剧情也都很有意思,让我印象深刻。</p>
<p>不过,无论是怎样精彩的旅途,也难免有结束的时候,希望下一作尽快来吧~</p>
<p><img src="/static/images/OctopathTraveller2/%E6%88%AA%E5%B1%8F2024-12-05%2008.51.49.jpg" alt="决战!">
<img src="/static/images/OctopathTraveller2/%E6%88%AA%E5%B1%8F2024-12-05%2009.02.23.jpg" alt="商人">
<img src="/static/images/OctopathTraveller2/%E6%88%AA%E5%B1%8F2025-02-24%2016.34.55.jpg" alt="大侦探题米诺斯">
<img src="/static/images/OctopathTraveller2/%E6%88%AA%E5%B1%8F2025-02-28%2015.15.20.jpg" alt="舞王"></p>
</description>
<pubDate>Tue, 03 Dec 2024 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>note</category><category>吐槽</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/code/macos/parallels_desktop20</guid>
<title>Parallels Desktop 20.1.1 55740</title>
<link>https://wxmvv.github.io/blog/code/macos/parallels_desktop20</link>
<description><p>不得不说 PD 真的很流氓,之前买过两年,大版本一更新,旧的版本会出现各种问题,而且所谓的更新才能用新系统大部分时候也只是加了个版本号检测,纯纯逼你花钱买新版。</p>
<h2>pd 本体</h2>
<p><a href="https://download.parallels.com/desktop/v20/20.1.1-55740/ParallelsDesktop-20.1.1-55740.dmg">Parallels Desktop 20.1.1 55740</a></p>
<h2>crack 补丁</h2>
<p>注意:需要先关闭 SIP</p>
<p><a href="https://1drv.ms/u/s!AujtcnlMx9Vsg-4eYTiqBwDZsR3XjQ?e=EXanJD">Parallels Desktop Activation Tool SIPOFF 6.3.0 MacKed</a></p>
</description>
<pubDate>Thu, 21 Nov 2024 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>macos</category><category>app</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/code/js/blog新的动画效果</guid>
<title>blog 新的动画效果</title>
<link>https://wxmvv.github.io/blog/code/js/blog新的动画效果</link>
<description><p>页面出现的线性的动画,之前在刚开始重构 blog 时就想实现,不过因为当时比较忙,就暂时搁置了,最近有空,就还是使用 motion 库来实现一下。</p>
<h2>需要实现的效果</h2>
<p>页面元素依次出现,首先是过渡动画包括 opacity blur X 这三部分的变化,并且需要有一个 delay 的效果,让元素一个一个的出现。</p>
<h2>实现思路</h2>
<p>opacity blur X 这种变化,使用 motion 实现十分简单,甚至用原生 js 也很简单,问题在于 delay 的效果。页面有很多元素 甚至包括需要渲染的列表,如果一个一个添加恐怕是十分浪费时间。</p>
<p>花了一点时间仔细查了 motion 的文档,发现一个好东西 <code>staggerChildren</code> (<a href="https://motion.dev/docs/react-transitions">文档</a>) ,使用这个配合 <code>variants</code> 属性,可以轻松实现元素和子元素的依次出现。</p>
<h2>代码</h2>
<p>先新建一个 <code>motionVariants.tsx</code> 组件重复调用。在其中定义 <code>containerVariants</code> 和 <code>itemVariants</code>。</p>
<pre><code class="language-js">export const containerVariants = {
hidden: {
opacity: 0,
filter: &quot;blur(8px)&quot;,
transform: &quot;translateY(16px) translateZ(0)&quot;,
},
visible: {
opacity: 1,
filter: &quot;blur(0)&quot;,
transform: &quot;none&quot;,
transition: {
transform: { duration: 0.4, timeConstant: 750 },
opacity: { duration: 0.7, timeConstant: 350 },
filter: { duration: 0.8, timeConstant: 350 },
type: &quot;tween&quot;,
duration: 0.6,
ease: [0.25, 0.3, 0.5, 1],
delayChildren: 0,
// staggerChildren: 0.12, // 每个子项之间的延迟时间
staggerChildren: 0.08, // 每个子项之间的延迟时间
},
},
};
export const itemVariants = {
hidden: {
opacity: 0,
filter: &quot;blur(8px)&quot;,
transform: &quot;translateY(16px) translateZ(0)&quot;,
transition: {},
},
visible: {
opacity: 1,
filter: &quot;blur(0)&quot;,
transform: &quot;none&quot;,
transition: {
transform: { duration: 0.2, timeConstant: 350 },
opacity: { duration: 0.4, timeConstant: 350 },
filter: { duration: 0.4, timeConstant: 350 },
duration: 0.4,
ease: [0.25, 0.3, 0.5, 1],
},
},
};
</code></pre>
<p>在你的组件中添加效果</p>
<pre><code class="language-js">import { motion } from &#39;framer-motion&#39;
import { containerVariants, itemVariants } from &#39;@/components/MyMotion&#39;
return (
&lt;&gt;
&lt;motion.div variants={containerVariants} initial=&quot;hidden&quot; animate=&quot;visible&quot;&gt;
&lt;motion.div variants={itemVariants}&gt;
&lt;h2&gt;title&lt;/h2&gt;
&lt;/motion.div&gt;
&lt;motion.div variants={itemVariants}&gt;
&lt;p&gt;body&lt;/p&gt;
&lt;/motion.div&gt;
&lt;motion.div variants={itemVariants}&gt;
&lt;p&gt;link&lt;/p&gt;
&lt;/motion.div&gt;
&lt;/div&gt;
&lt;/&gt;
)
}
</code></pre>
<h2>最终效果</h2>
<div className="flex flex-row justify-center bg-zinc-100 rounded-sm ">
<video autoPlay loop preload="auto" playsInline className="my-0 rounded">
<source src="/static/video/blog新的动画.mp4" type="video/mp4" />
</video>
</div>
</description>
<pubDate>Sat, 16 Nov 2024 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>css</category><category>js</category><category>animation</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/code/macos/AppleScript实现鼠标连点</guid>
<title>AppleScript 实现鼠标连点</title>
<link>https://wxmvv.github.io/blog/code/macos/AppleScript实现鼠标连点</link>
<description><p>因为最近在玩一个老游戏,开了作弊但是还需要手动点击才能升级,于是使用 applescript 来实现一下自动点击。</p>
<h2>事前准备</h2>
<p>鼠标点击使用 cliclick 包,可以使用 brew 安装 <code>brew install cliclick</code> 键盘则直接使用 applescript 即可</p>
<h2>脚本实现</h2>
<h3>鼠标点击</h3>
<pre><code class="language-javascript">-- 定义点击位置,点击次数,点击间隔
set x to 615
set y to 461
set clickNum to 1000
set clickNum to 0.4
-- 执行点击
repeat clickNum times
do shell script &quot;/usr/local/bin/cliclick c:&quot; &amp; x &amp; &quot;,&quot; &amp; y
delay delayNum -- 调整延迟以控制点击速度
end repeat
</code></pre>
<p>使用步骤如下</p>
<ol>
<li>然后通过命令行<code>cliclick p</code>获取你想点击的位置</li>
<li>填入 x,y,clickNum,clickNum 四个变量,运行即可</li>
</ol>
<p>也可以配合电脑中的 shortcut 来实现快捷键启动</p>
<h3>键盘输入</h3>
<ol>
<li>输入文字</li>
</ol>
<pre><code class="language-javascript">-- 定义输入内容
set inputText to &quot;hello world&quot;
-- 执行输入
tell application &quot;System Events&quot;
keystroke inputText
end tell
</code></pre>
<ol>
<li>模拟键盘按键</li>
</ol>
<pre><code class="language-javascript">-- 激活目标应用,比如 Safari
tell application &quot;Safari&quot;
activate
end tell
-- 设置按键组合的次数和延迟
set pressCount to 10 -- 重复次数
set delayTime to 0.1 -- 每次按键后的延迟(秒)
-- 模拟键盘连按
repeat pressCount times
tell application &quot;System Events&quot;
key code 49 -- 这里的 49 是空格键的 keycode
delay delayTime
end tell
end repeat
</code></pre>
<p>其中的 keycode 是对应键盘的键码,可以通过<code>System Events</code>中的<code>key code</code>来使用, <a href="https://web.archive.org/web/20100501161453/http://www.classicteck.com/rbarticles/mackeyboard.php">keycode</a> 在这里可以查看 keycode 列表,顺便我也在下面也列出一些常用按键的键码</p>
<table>
<thead>
<tr>
<th>键</th>
<th>键码</th>
</tr>
</thead>
<tbody><tr>
<td>Enter</td>
<td>36</td>
</tr>
<tr>
<td>Backspace</td>
<td>51</td>
</tr>
<tr>
<td>Tab</td>
<td>48</td>
</tr>
<tr>
<td>空格</td>
<td>49</td>
</tr>
<tr>
<td>Delete</td>
<td>51</td>
</tr>
<tr>
<td>Escape</td>
<td>53</td>
</tr>
<tr>
<td>Command</td>
<td>55</td>
</tr>
<tr>
<td>Shift</td>
<td>56</td>
</tr>
<tr>
<td>Caps Lock</td>
<td>57</td>
</tr>
<tr>
<td>Option</td>
<td>58</td>
</tr>
<tr>
<td>Control</td>
<td>59</td>
</tr>
<tr>
<td>方向左</td>
<td>123</td>
</tr>
<tr>
<td>方向右</td>
<td>124</td>
</tr>
<tr>
<td>方向下</td>
<td>125</td>
</tr>
<tr>
<td>方向上</td>
<td>126</td>
</tr>
</tbody></table>
<h2>参考</h2>
<ul>
<li><p><a href="https://web.archive.org/web/20100501161453/http://www.classicteck.com/rbarticles/mackeyboard.php">keycode</a></p>
</li>
<li><p><a href="https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_classes.html#//apple_ref/doc/uid/TP40000983-CH1g-SW15">AppleScript Language Guide</a></p>
</li>
</ul>
</description>
<pubDate>Sun, 13 Oct 2024 00:00:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>applescript</category><category>macos</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/code/ios/使用Capacitor来构建你的app吧!</guid>
<title>使用 Capacitor 来构建你的 app 吧!</title>
<link>https://wxmvv.github.io/blog/code/ios/使用Capacitor来构建你的app吧!</link>
<description><p>capacitor[^doc] 作为一个跨平台 ios 和安卓的框架,本身和 flutter、RN 并不是同一赛道,capacitor 在官网也清晰的写着,基于两个平台 webview 来展示你的 html 静态网站,我们可以先用各种框架如 vue、react 来写一个静态网站,然后使用 capacitor 来把它变成 app,或者仅仅把它当成一个 app 的扩展工具,用 js 库来实现一些原生不太好实现的功能。相比直接用 capacitor 来构建 app,把它作为一个 js 扩展应该是一个更好的选择。</p>
<p><a href="https://capacitorjs.com/">doc</a></p>
<h2>简单尝试</h2>
<h3>随便新建一个项目</h3>
<p>我这里新建了一个 nextjs 项目。</p>
<pre><code class="language-shell">npx create-next-app@latest
</code></pre>
<p>记得在 next.config 中设定 output。</p>
<pre><code class="language-js">output: &quot;export&quot;,
</code></pre>
<h3>安装 Capacitor</h3>
<pre><code class="language-shell"># 安装cap命令
npm install @capacitor/cli @capacitor/core
# 新建cap项目
npx cap init
</code></pre>
<p>你可以看到目录中出现了 capacitor.config.json
下面有一个简单的设置。</p>
<pre><code class="language-json">{
&quot;appId&quot;: &quot;com.example.captest&quot;, //唯一id
&quot;appName&quot;: &quot;captest&quot;,
&quot;webDir&quot;: &quot;out&quot;, //这个是静态网站的位置,nextjs导出的静态页面在out文件夹
&quot;server&quot;: {
&quot;url&quot;: &quot;http://127.0.0.1:3000&quot;, //这里设定是对应nextjs dev模式的端口,设定后可以热更新
&quot;cleartext&quot;: true
}
}
</code></pre>
<h3>安装 cap 对应 sdk</h3>
<p>这里以 ios 项目为例,</p>
<p>这里特别说一下在 ios 开发中需要安装 cocoapods,如果正常安装出错可以使用 brew 安装,我有个专门的日志写了如何解决这个问题。</p>
<pre><code class="language-shell"># 先把nextjs的预览打开
npm run dev
# 安装cap包
npm install @capacitor/ios @capacitor/android
# 添加ios支持
npx cap add ios
# 使用原生app xcode打开app,可以查看原生代码,然后编译在模拟器执行
npx cap open ios
# 或者不打开xocde 通过命令行直接编译
npx cap run ios
# 可以打开同步,这样就可以热更新了
npx cap sync
</code></pre>
<p><img src="/static/images/capacitor/capacitor%E9%A2%84%E8%A7%881.png" alt=""></p>
<p>这样一个可预览的 nextjs 的 app 就出来啦~</p>
<p>是不是很简单~</p>
<p>不过对比 flutter 和 RN 速度上明显还是有差距,还是要根据具体情况使用。</p>
</description>
<pubDate>Sun, 11 Aug 2024 20:47:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>capacitor</category><category>iOS</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/code/ios/解决安装cocoapods失败的问题</guid>
<title>解决安装 cocoapods 失败的问题</title>
<link>https://wxmvv.github.io/blog/code/ios/解决安装cocoapods失败的问题</link>
<description><p>最近在尝试使用 capacitor 制作 ios app,涉及到使用 cocoapods 来安装插件,但是 macos 安装会出现各种问题,经过查看各种方法,最后还是使用 brew 成功的。</p>
<p>其实主要问题在于 macos 自带的 ruby 版本比较低,</p>
<pre><code class="language-shell">ruby --version
# 查看ruby版本 如果是2.6那说明你需要这个教程
</code></pre>
<h3>首先使用 brew 安装 ruby</h3>
<pre><code class="language-sh"># 安装ruby
brew install ruby
# 配置PATH 这里请仔细看brew的log信息,地址可能会不同
echo &#39;export PATH=&quot;/opt/homebrew/opt/ruby/bin:$PATH&quot;&#39; &gt;&gt; ~/.zshrc
echo &#39;export LDFLAGS=&quot;-L/opt/homebrew/opt/ruby/lib&quot;&#39; &gt;&gt; ~/.zshrc
echo &#39;export CPPFLAGS=&quot;-I/opt/homebrew/opt/ruby/include&quot;&#39; &gt;&gt; ~/.zshrc
# 重新加载配置
source ~/.zshrc
# 再次查看ruby版本 这时候应该变成3.x了
ruby --version
</code></pre>
<h3>安装 pod</h3>
<p>这里仍然使用 brew 来安装。</p>
<pre><code class="language-sh">brew install cocoapods
# 按照提示link
brew link cocoapods
# 这里如果提示已经存在,需要按照brew给出的方法删除原文件,并再次链接
</code></pre>
<h3>使用</h3>
<pre><code class="language-sh"># 正常显示没有报错就ok了
pod env
</code></pre>
<h3>参考</h3>
<p><a href="https://github.com/CocoaPods/CocoaPods/issues/12122">cocoapods issues</a></p>
</description>
<pubDate>Sun, 11 Aug 2024 13:15:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>cocoapods</category><category>capacitor</category><category>iOS</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/homepage/SmileInTheMorning</guid>
<title>名渡山辽 - Smile in the morning 指弹谱</title>
<link>https://wxmvv.github.io/blog/homepage/SmileInTheMorning</link>
<description><p>虽然很久没弹琴,也没制作谱子了,赶上这次名渡山来天津的机会,再次拿起来练一下。</p>
<p>就挑了一首他的新曲来练一下。刚好骑鹅尤克里里的伊老师也在扒这首曲子,我们就一起合作完成谱子的整理,放在这里。</p>
<p><img src="https://wxmvv.github.io/static/pdf/ukulele/smileinthemorning.pdf" alt="smileinthemorning.pdf"></p>
<iframe src="//player.bilibili.com/player.html?isOutside=true&aid=1355658592&bvid=BV1Xz421b7FU&cid=1574676110&p=1&autoplay=0&muted=0" className='w-full h-[366px]' scrolling="no" border="0" frameBorder="no" autoPlay="0" muted="0" framespacing="0" allowFullScreen={true}></iframe>
</description>
<pubDate>Tue, 16 Jul 2024 10:17:00 GMT</pubDate>
<author>wxmvv@outlook.com (wxm)</author>
<category>music</category><category>ukulele</category>
</item>
<item>
<guid>https://wxmvv.github.io/blog/homepage/Nextjs重构主页</guid>
<title>2024 使用 Nextjs 重构主页</title>
<link>https://wxmvv.github.io/blog/homepage/Nextjs重构主页</link>
<description><p>最近在使用 Nextjs 完成工作,用的很舒服,遂决定用来重新开发下之前 hexo 弄的主页。</p>
<p>项目在这里 <a href="https://github.com/wxmvv/minimal-tailwind-nextjs-blog">minimal-tailwind-nextjs-blog</a></p>
<h2>技术选择</h2>
<ul>
<li><a href="https://tailwindcss.com/">tailwindcss</a></li>
<li><a href="https://nextjs.org/">Nextjs</a></li>
</ul>
<p>首先是框架,除了 Nextjs 之外,我平时也很常用的 tailwindcss,可以快速构建网站页面。
经过查找最后决定使用&quot;开箱即用&quot;的 <a href="https://github.com/timlrx/tailwind-nextjs-starter-blog">tailwind-nextjs-starter-blog</a>作为基础来重构主页。</p>
<h2>设计参考</h2>
<ul>
<li><a href="https://nelson.co/">nelson</a></li>
</ul>
<p>很喜欢这种干净的页面,但是同时又有不少小设计,作为参考来制作。</p>
<h2>开发列表</h2>
<ul>
<li><input checked="" disabled="" type="checkbox"> layout 修改</li>
<li><input checked="" disabled="" type="checkbox"> 色彩模式</li>
<li><input checked="" disabled="" type="checkbox"> i18n 国际化</li>
<li><input checked="" disabled="" type="checkbox"> 评论系统</li>
<li><input checked="" disabled="" type="checkbox"> rss 生成</li>
<li><input checked="" disabled="" type="checkbox"> 音乐播放器</li>
<li><input checked="" disabled="" type="checkbox"> 主页的线性动画效果</li>
<li><input checked="" disabled="" type="checkbox"> PDF 预览</li>
</ul>
<h2>问题与一些解决方案</h2>
<h3>favicons 以及 manifest</h3>
<ul>
<li><a href="https://developer.mozilla.org/zh-CN/docs/Web/Manifest">MDN 官方文档</a></li>
<li><a href="https://github.com/elegantapp/pwa-asset-generator">pwa-asset-generator 工具</a></li>
</ul>
<h3>动效框架</h3>
<p>页面的动画效果使用的<a href="https://www.framer.com/motion/">framer-motion</a></p>
<p>能打打节省开发动画的时间,并且让动画的过渡更加丝滑。</p>
<p>不得不说和 vue 相比,react 的动画库真的多太多了。</p>
<h3>github page 静态部署</h3>
<p>首先是项目中关于静态部署的设置,在文档中写的很清楚<a href="https://github.com/timlrx/tailwind-nextjs-starter-blog">tailwind-nextjs-starter-blog</a>,设置过就可以 build 了。</p>
<p>已经 build 过后,就会生成网页静态文件,然后在 github 新建一个 YourGitName.github.io 的仓库,将文件上传到仓库中即可。不过手动上传毕竟十分麻烦,可以使用 <a href="https://github.com/features/actions">github action</a> 来自动部署。可以自行参考文档部署。</p>
<p>需要注意的是,github page 使用 jekyll 部署,会自动忽略下划线开头的文件,导致_next 文件夹中的 js css 无法加载,在其中新建一个.nojekyll 即可</p>
<h3>meta 信息</h3>
<p>tailwind-nextjs-starter-blog 项目本身的 meta 信息就是参考 <a href="https://gohugo.io/content-management/front-matter/">Hugo</a> 的设置, 可以自行查看文档。</p>
<h3>过滤 Post 的修改</h3>
<p>在修改 Post 过滤过程中,其实就是 daaft 设置为 true,在 dev 模式还能正常显示,在 build 模式就会消失,如果想要做一些修改 可以搜索一个外部方法 allCoreContent ,这个方法会在 NODE_ENV 为 production 的时候过滤掉 draft 修改。然后做自己的修改即可。</p>
<h2>评论系统</h2>
<p>tailwind-nextjs-starter-blog 所提供的 comments 组件似乎有一些加载问题,所以最后还是自己解决。</p>
<p><a href="https://giscus.app/">giscus</a>
<a href="https://github.com/giscus/giscus-component">giscus-react</a></p>
<pre><code class="language-sh">npm i @giscus/react
</code></pre>
<pre><code class="language-jsx">//作为组件中使用 现在giscus官网获取id 然后将下面替换即可
import Giscus from &quot;@giscus/react&quot;;
export default function MyApp() {
return (
&lt;Giscus
id=&quot;comments&quot;
repo=&quot;giscus/giscus-component&quot;
repoId=&quot;MDEwOlJlcG9zaXRvcnkzOTEzMTMwMjA=&quot;
category=&quot;Announcements&quot;
categoryId=&quot;DIC_kwDOF1L2fM4B-hVS&quot;
mapping=&quot;specific&quot;
term=&quot;Welcome to @giscus/react component!&quot;
reactionsEnabled=&quot;1&quot;
emitMetadata=&quot;0&quot;
inputPosition=&quot;top&quot;
theme=&quot;light&quot;
lang=&quot;en&quot;
loading=&quot;lazy&quot;
/&gt;
);
}
</code></pre>
<h3>build 后的中文路径问题</h3>
<p>我在 dev 模式中没有问题,但是当我打包 build 后出现路径问题。</p>
<pre><code class="language-js">// app/blog/[...slug]/page.tsx
const isDev = process.env.NODE_ENV === &quot;development&quot;;
const isBuild = process.env.NEXT_PUBLIC_IS_BUILD === &quot;true&quot;;
export const generateStaticParams = async () =&gt; {
if (isDev) {
return allBlogs.map((p) =&gt; ({
slug: p.slug.split(&quot;/&quot;).map((name) =&gt; encodeURIComponent(name))
}));
} else {
return allBlogs.map((p) =&gt; ({
slug: p.slug.split(&quot;/&quot;).map((name) =&gt; decodeURI(name))
}));
}
};
</code></pre>
<pre><code class="language-js">// next.config.js
const isDev = process.env.NODE_ENV === &#39;development&#39;
const isBuild =process.env.NODE_ENV === &#39;production&#39; &amp;&amp; process.env.NEXT_PUBLIC_IS_BUILD === &#39;true&#39;
env: {
NEXT_PUBLIC_IS_BUILD: isBuild.toString(),
},
</code></pre>
<pre><code class="language-json">// package.json
&quot;scripts&quot;:{
&quot;build&quot;: &quot;cross-env NEXT_PUBLIC_IS_BUILD=true &amp;&amp; cross-env INIT_CWD=$PWD next build &amp;&amp; cross-env NODE_OPTIONS=&#39;--experimental-json-modules&#39; node ./scripts/postbuild.mjs&quot;,
}
</code></pre>
<h2>最后</h2>
<p>断断续续花了快 1 周时间才大概整好,其中比较花时间的是音乐播放器的动画效果,我使用 rive,从一开始画图到制作动画,还是很有趣的过程,最后效果也还可以,未来有时间我还会继续优化的。</p>