-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1161 lines (763 loc) · 46.5 KB
/
index.html
File metadata and controls
1161 lines (763 loc) · 46.5 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<script id="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {"hostname":"marchccc.top","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
</script>
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "gjl00v3rti");
</script>
<meta name="description" content="编程技术交流">
<meta property="og:type" content="website">
<meta property="og:title" content="Marchccc">
<meta property="og:url" content="https://marchccc.top/index.html">
<meta property="og:site_name" content="Marchccc">
<meta property="og:description" content="编程技术交流">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="Marchccc">
<meta property="article:tag" content="Marchccc">
<meta property="article:tag" content=" PHP">
<meta property="article:tag" content=" 博客">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="https://marchccc.top/">
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome : true,
isPost : false,
lang : 'zh-CN'
};
</script>
<title>Marchccc</title>
<noscript>
<style>
.use-motion .brand,
.use-motion .menu-item,
.sidebar-inner,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-header { opacity: initial; }
.use-motion .site-title,
.use-motion .site-subtitle {
opacity: initial;
top: initial;
}
.use-motion .logo-line-before i { left: initial; }
.use-motion .logo-line-after i { right: initial; }
</style>
</noscript>
<link rel="alternate" href="/atom.xml" title="Marchccc" type="application/atom+xml">
</head>
<body itemscope itemtype="http://schema.org/WebPage">
<div class="container use-motion">
<div class="headband"></div>
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="切换导航栏">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<h1 class="site-title">Marchccc</h1>
<span class="logo-line-after"><i></i></span>
</a>
<p class="site-subtitle" itemprop="description">编程技术交流</p>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
</div>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="main-menu menu">
<li class="menu-item menu-item-首页">
<a href="/" rel="section"><i class="home fa-fw"></i>首页</a>
</li>
<li class="menu-item menu-item-归档">
<a href="/archives/" rel="section"><i class="archive fa-fw"></i>归档</a>
</li>
<li class="menu-item menu-item-分类">
<a href="/categories/" rel="section"><i class="th fa-fw"></i>分类</a>
</li>
<li class="menu-item menu-item-关于">
<a href="/about/" rel="section"><i class="user fa-fw"></i>关于</a>
</li>
<li class="menu-item menu-item-网站状态">
<a href="https://stats.uptimerobot.com/x2EnvUJ20j" rel="noopener" target="_blank"><i class=" fa-fw"></i>网站状态</a>
</li>
</ul>
</nav>
</div>
</header>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
<main class="main">
<div class="main-inner">
<div class="content-wrap">
<div class="content index posts-expand">
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2026/01/19/macOS%E4%B8%8D%E5%BC%80TUN%E6%A8%A1%E5%BC%8F%E4%BD%BF%E7%94%A8Antigravity/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2026/01/19/macOS%E4%B8%8D%E5%BC%80TUN%E6%A8%A1%E5%BC%8F%E4%BD%BF%E7%94%A8Antigravity/" class="post-title-link" itemprop="url">macOS不开TUN模式使用Antigravity</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2026-01-19 15:58:51 / 修改时间:16:07:04" itemprop="dateCreated datePublished" datetime="2026-01-19T15:58:51+08:00">2026-01-19</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%8A%80%E6%9C%AF/" itemprop="url" rel="index"><span itemprop="name">技术</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>Proxifier 软件配置:<br>Proxies,删掉默认的配置,新建一个配置,端口和类型参考自己的魔法,我的是 7890 socket5<br>Rules,Default默认改为Direct直连。新增Rule,Applications填入:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"Antigravity.app"; "Antigravity"; com.google.antigravity;"Antigravity Helper (Plugin)";"language_server_macos_x64";"language_server_macos_arm";</span><br></pre></td></tr></table></figure>
<p>Action选择新建的Proxies。</p>
<p>重启Antigravity即可。</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2026/01/15/How-to-use-Cloudflared-tunnel/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2026/01/15/How-to-use-Cloudflared-tunnel/" class="post-title-link" itemprop="url">How to use Cloudflared tunnel</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2026-01-15 14:39:30 / 修改时间:14:47:39" itemprop="dateCreated datePublished" datetime="2026-01-15T14:39:30+08:00">2026-01-15</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%8A%80%E6%9C%AF/" itemprop="url" rel="index"><span itemprop="name">技术</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>有时候需要公网访问本地服务的场景,例如工作流调用测试。<br>本文记录创建cloudflared tunnel映射本地域名到公网。</p>
<p>比如我本地用的MAMP PRO,本地设置的域名是 apitest.com</p>
<h1 id="临时隧道"><a href="#临时隧道" class="headerlink" title="临时隧道"></a>临时隧道</h1><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cloudflared tunnel --url http://127.0.0.1:80 --http-host-header apitest.com</span><br></pre></td></tr></table></figure>
<p>控制台会输出临时域名,打开访问即可。</p>
<h1 id="持久隧道(和临时隧道2选1)"><a href="#持久隧道(和临时隧道2选1)" class="headerlink" title="持久隧道(和临时隧道2选1)"></a>持久隧道(和临时隧道2选1)</h1>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2026/01/15/How-to-use-Cloudflared-tunnel/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/09/08/gitlab%E5%AE%89%E5%85%A8%E9%98%B2%E6%8A%A4%E9%85%8D%E7%BD%AE/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/09/08/gitlab%E5%AE%89%E5%85%A8%E9%98%B2%E6%8A%A4%E9%85%8D%E7%BD%AE/" class="post-title-link" itemprop="url">gitlab安全防护配置</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-09-08 18:51:00" itemprop="dateCreated datePublished" datetime="2025-09-08T18:51:00+08:00">2025-09-08</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2025-10-30 15:15:29" itemprop="dateModified" datetime="2025-10-30T15:15:29+08:00">2025-10-30</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%8A%80%E6%9C%AF/" itemprop="url" rel="index"><span itemprop="name">技术</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li>关闭公开可见性。<br>管理员-设置-通用-可见性与访问控制,限制可见性级别勾选【公开】项。</li>
</ol>
<p>–如果选中,则只有管理员能够创建公开群组、项目和片段。此外,个人资料仅对经过身份验证的用户可见。</p>
<ol start="2">
<li><p>登录失败速率限制。<br> /etc/gitlab/gitlab.rb</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">gitlab_rails['rack_attack_enabled'] = true</span><br><span class="line"></span><br><span class="line">gitlab_rails['rack_attack_git_basic_auth'] = {</span><br><span class="line"> 'enabled' => true,</span><br><span class="line"> 'ip_whitelist' => ["127.0.0.1"],</span><br><span class="line"> 'maxretry' => 2, # 最大允许失败尝试次数</span><br><span class="line"> 'findtime' => 12000, # 时间窗口(秒),在此时间内统计失败尝试</span><br><span class="line"> 'bantime' => 3600 # 账户锁定的持续时间(秒)</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<p> 限制同一个IP 3小时内只能登录失败两次。</p>
<p> sudo gitlab-ctl reconfigure // 重载配置<br> sudo gitlab-ctl restart // 重启服务</p>
</li>
</ol>
<ol start="3">
<li>对多次尝试的IP段封禁。</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">jq -r 'select(.path=="/users/sign_in") | .remote_ip' /var/log/gitlab/gitlab-rails/production_json.log | sort | uniq -c | sort -nr</span><br></pre></td></tr></table></figure>
<p>对统计出来的IP,筛选出可疑IP,通过IP段封禁。</p>
<p>或者直接取消锁定配置<br> 编辑 /opt/gitlab/embedded/service/gitlab-rails/config/initializers/8_devise.rb (可能是其他数字前缀)<br> 将 unlock_strategy 设为 :none<br> lock_strategy 设为 :none</p>
<pre><code>这样就不会爆破后Lock并下线,可以强制用户开2FA。
sudo gitlab-ctl reconfigure // 重载配置
sudo gitlab-ctl restart // 重启服务</code></pre>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/05/20/dify-docker%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/05/20/dify-docker%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/" class="post-title-link" itemprop="url">dify docker安装配置</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-05-20 16:51:31" itemprop="dateCreated datePublished" datetime="2025-05-20T16:51:31+08:00">2025-05-20</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2025-10-30 15:17:04" itemprop="dateModified" datetime="2025-10-30T15:17:04+08:00">2025-10-30</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%9C%8D%E5%8A%A1%E5%99%A8/" itemprop="url" rel="index"><span itemprop="name">服务器</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/langgenius/dify.git</span><br><span class="line">cd dify/docker</span><br><span class="line">cp .env.example .env</span><br></pre></td></tr></table></figure>
<p>docker/nginx/ssl/ 放入你自己的域名证书</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">dify.crt</span><br><span class="line">dify.key</span><br></pre></td></tr></table></figure>
<p>.env开启https</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">NGINX_HTTPS_ENABLED=true</span><br><span class="line">TOP_K_MAX_VALUE=30 // 这项目是topk也要设置大一点</span><br></pre></td></tr></table></figure>
<p>在后台启动 docker-compose.yml 中定义的所有容器服务。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">docker compose up -d</span><br><span class="line">docker compose ps</span><br></pre></td></tr></table></figure>
<p>无需配置域名,解析到服务器,直接访问域名打开dify。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2025/05/20/dify-docker%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/04/28/vscode-Copilot-Proxy/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/04/28/vscode-Copilot-Proxy/" class="post-title-link" itemprop="url">vscode Copilot Proxy</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-04-28 10:46:52 / 修改时间:10:50:55" itemprop="dateCreated datePublished" datetime="2025-04-28T10:46:52+08:00">2025-04-28</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E5%B7%A5%E5%85%B7/" itemprop="url" rel="index"><span itemprop="name">工具</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>菜单栏Code-首选项-设置<br>搜索 proxy,点在 seetings.json 中编辑。<br>设置:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">"http.proxy": "http://127.0.0.1:7890",</span><br><span class="line">"https.proxy": "http://127.0.0.1:7890",</span><br><span class="line">"http.proxyStrictSSL": false,</span><br></pre></td></tr></table></figure>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/04/24/%E9%81%BF%E5%85%8D-Laravel-%E6%97%A5%E5%BF%97%E6%9D%83%E9%99%90%E9%97%AE%E9%A2%98%EF%BC%9A%E6%AD%A3%E7%A1%AE%E8%AE%BE%E7%BD%AE-Crontab-%E7%94%A8%E6%88%B7%E8%BA%AB%E4%BB%BD/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/04/24/%E9%81%BF%E5%85%8D-Laravel-%E6%97%A5%E5%BF%97%E6%9D%83%E9%99%90%E9%97%AE%E9%A2%98%EF%BC%9A%E6%AD%A3%E7%A1%AE%E8%AE%BE%E7%BD%AE-Crontab-%E7%94%A8%E6%88%B7%E8%BA%AB%E4%BB%BD/" class="post-title-link" itemprop="url">避免 Laravel 日志权限问题:正确设置 Crontab 用户身份</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-04-24 15:27:05 / 修改时间:15:29:32" itemprop="dateCreated datePublished" datetime="2025-04-24T15:27:05+08:00">2025-04-24</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E5%90%8E%E7%AB%AF/" itemprop="url" rel="index"><span itemprop="name">后端</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>使用 crontab -e 编辑时,编辑的都是当前用户的定时任务文件。<br>里面的任务都会用当前用户身份执行。</p>
<p>Laravel 任务中若创建日志文件,文件也会归 root 所有,但 Web 程序通常以 www 用户运行,无法写入这些日志,导致报错。</p>
<p>正确使用方式:</p>
<p>一种方式是 sudo crontab -u www -e,来编辑www用户的crontab。</p>
<p>另一种方式是 root 的 crontab 任务里通过 sudo -u ,指定用 www 用户身份执行。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">* * * * * sudo -u www /www/server/php/74/bin/php /www/wwwroot/yourwebsite/artisan schedule:run >> /dev/null 2>&1</span><br></pre></td></tr></table></figure>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/04/09/n8n-Microsoft-Teams-%E9%9B%86%E6%88%90%EF%BC%9A%E8%A7%A3%E5%86%B3-Need-admin-approval-%E9%97%AE%E9%A2%98/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/04/09/n8n-Microsoft-Teams-%E9%9B%86%E6%88%90%EF%BC%9A%E8%A7%A3%E5%86%B3-Need-admin-approval-%E9%97%AE%E9%A2%98/" class="post-title-link" itemprop="url">n8n Microsoft Teams 集成:解决 Need admin approval 问题</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-04-09 22:07:59 / 修改时间:22:23:37" itemprop="dateCreated datePublished" datetime="2025-04-09T22:07:59+08:00">2025-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%8A%80%E6%9C%AF/" itemprop="url" rel="index"><span itemprop="name">技术</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>报错内容:</p>
<p>Need admin approval<br>unverified<br>needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2025/04/09/n8n-Microsoft-Teams-%E9%9B%86%E6%88%90%EF%BC%9A%E8%A7%A3%E5%86%B3-Need-admin-approval-%E9%97%AE%E9%A2%98/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/03/25/Python%E7%8E%AF%E5%A2%83%E8%99%9A%E6%8B%9F%E5%8C%96/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/03/25/Python%E7%8E%AF%E5%A2%83%E8%99%9A%E6%8B%9F%E5%8C%96/" class="post-title-link" itemprop="url">Python环境虚拟化</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-03-25 15:51:29" itemprop="dateCreated datePublished" datetime="2025-03-25T15:51:29+08:00">2025-03-25</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2025-04-09 22:05:31" itemprop="dateModified" datetime="2025-04-09T22:05:31+08:00">2025-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E5%B7%A5%E5%85%B7/" itemprop="url" rel="index"><span itemprop="name">工具</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>// 创建虚拟环境<br>python3 -m venv sqlrag</p>
<p>// 激活虚拟环境<br>source sqlrag/bin/activate</p>
<p>// 进入项目目录<br>cd sqlrag</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/01/20/%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E5%A4%A7%E9%87%8F%E6%96%87%E7%AB%A0%E7%94%A8%E4%BA%8E%E8%A2%AB%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E%E6%94%B6%E5%BD%95/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/01/20/%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E5%A4%A7%E9%87%8F%E6%96%87%E7%AB%A0%E7%94%A8%E4%BA%8E%E8%A2%AB%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E%E6%94%B6%E5%BD%95/" class="post-title-link" itemprop="url">如何创建大量文章用于被搜索引擎收录</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-01-20 18:04:10" itemprop="dateCreated datePublished" datetime="2025-01-20T18:04:10+08:00">2025-01-20</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2025-01-21 18:18:45" itemprop="dateModified" datetime="2025-01-21T18:18:45+08:00">2025-01-21</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E5%B7%A5%E5%85%B7/" itemprop="url" rel="index"><span itemprop="name">工具</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>参考竞争对手的文章标题,用不同的方式表达。</p>
<p>Google搜关键词,通过 People also ask ,点击源站点链接进入源站。<br>找到相关文章,例如 <a href="https://www.indmall.in/hub/photoelectric-sensors/" target="_blank" rel="noopener">https://www.indmall.in/hub/photoelectric-sensors/</a></p>
<p>提示词模板:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">请根据以下内容重写一篇文章,要求内容逻辑清晰、语句流畅、段落分明,并保持主题一致。同时,优化SEO,适当加入相关关键词,使其更容易被搜索引擎收录。注意原创性,避免完全复制原文。文章需要提供一个全新的标题:</span><br><span class="line"></span><br><span class="line">如果原标题包含问号,新标题也需以问号结尾。</span><br><span class="line">如果原标题不含问号,新标题需体现原创性,与原标题不同,同时吸引读者点击。</span><br><span class="line">原文链接:[在此处插入原文链接]</span><br><span class="line"></span><br><span class="line">需要优化的关键词包括:[在此处插入关键词列表]。文章长度控制在 [在此处插入字数要求]。文章语言使用[在此处插入语言]。</span><br></pre></td></tr></table></figure>
<p>使用AI时要勾选Web搜索功能。</p>
<p>例子:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">请根据以下内容重写一篇文章,要求内容逻辑清晰、语句流畅、段落分明,并保持主题一致。同时,优化SEO,适当加入相关关键词,使其更容易被搜索引擎收录。注意原创性,避免完全复制原文。文章需要提供一个全新的标题:</span><br><span class="line"></span><br><span class="line">如果原标题包含问号,新标题也需以问号结尾。</span><br><span class="line">如果原标题不含问号,新标题需体现原创性,与原标题不同,同时吸引读者点击。</span><br><span class="line">原文链接:https://www.indmall.in/faq/what-is-a-photoelectric-detector/</span><br><span class="line"></span><br><span class="line">需要优化的关键词包括:[Photoelectric Sensors、Telemecanique Sensors]。文章长度控制在 [500字]。文章语言使用[英文]。</span><br></pre></td></tr></table></figure>
<p>如果生成的效果不够优,可以多生成几次,选效果最好的,或者组合使用。</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://marchccc.top/2025/01/15/Mac-mini%E6%9C%AC%E5%9C%B0%E8%BF%90%E8%A1%8C%E6%96%87%E6%9C%AC%E6%A8%A1%E5%9E%8B%E5%92%8C%E5%9B%BE%E5%83%8F%E6%A8%A1%E5%9E%8B/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="Marchccc">
<meta itemprop="description" content="编程技术交流">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Marchccc">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2025/01/15/Mac-mini%E6%9C%AC%E5%9C%B0%E8%BF%90%E8%A1%8C%E6%96%87%E6%9C%AC%E6%A8%A1%E5%9E%8B%E5%92%8C%E5%9B%BE%E5%83%8F%E6%A8%A1%E5%9E%8B/" class="post-title-link" itemprop="url">Mac mini本地运行文本模型和图像模型</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2025-01-15 17:39:07" itemprop="dateCreated datePublished" datetime="2025-01-15T17:39:07+08:00">2025-01-15</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2025-02-10 09:35:04" itemprop="dateModified" datetime="2025-02-10T09:35:04+08:00">2025-02-10</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/AI/" itemprop="url" rel="index"><span itemprop="name">AI</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="文本模型"><a href="#文本模型" class="headerlink" title="文本模型"></a>文本模型</h1><p>环境为Mac mini M4 16GB版本。</p>
<p>用 LM Studio 客户端作为前端,在 huggingface 下载文本模型 phi-4-gguf 版本。</p>
<p><a href="https://huggingface.co/lmstudio-community/phi-4-GGUF/tree/main" target="_blank" rel="noopener">https://huggingface.co/lmstudio-community/phi-4-GGUF/tree/main</a></p>
<p>模型名称,Q指的是Quantization,可以理解为压缩,值越小,模型智商越低。<br>值越大,模型体积越大,运行所需资源越多。</p>
<p>注意模型要放在模型文件夹的二级目录内。<br>在models文件夹内的路径:microsoft/phi-4/phi-4-Q4-K_M.gguf</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2025/01/15/Mac-mini%E6%9C%AC%E5%9C%B0%E8%BF%90%E8%A1%8C%E6%96%87%E6%9C%AC%E6%A8%A1%E5%9E%8B%E5%92%8C%E5%9B%BE%E5%83%8F%E6%A8%A1%E5%9E%8B/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<nav class="pagination">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><span class="space">…</span><a class="page-number" href="/page/8/">8</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right" aria-label="下一页"></i></a>
</nav>
</div>
<script>
window.addEventListener('tabs:register', () => {
let { activeClass } = CONFIG.comments;
if (CONFIG.comments.storage) {
activeClass = localStorage.getItem('comments_active') || activeClass;
}
if (activeClass) {
let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
if (activeTab) {
activeTab.click();
}
}
});
if (CONFIG.comments.storage) {
window.addEventListener('tabs:click', event => {
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
let commentClass = event.target.classList[1];
localStorage.setItem('comments_active', commentClass);
});
}