Armbian 安装 Transmission

背景

之前一直使用aria2来下载BT,PT,aria2的配置已经修改user-agent来伪装其它下载软件比如transmission.
最近再下载PT时,提示错误,errorCode=1 Tracker returned failure reason: Abnormal access blocked 看样应该是被识别并禁止下载了,
就那换一个吧, Transmission

引用

https://blog.haibara.cn/archives/173
https://github.com/ronggang/transmission-web-control/issues/292
https://ld246.com/article/1556162494650
https://my.oschina.net/CasparLi/blog/830361?utm_source=ld246.com

安装

apt install transmission transmission-daemon

一切正常

配置

首先要停用transmission-daemon服务,执行下面的命令:

service transmission-daemon stop

Django Cache Distinguish Desktop Mobile | Django缓存区分桌面版和手机端

Django Cache Distinguish Desktop Mobile

Django Cache 默认并不区分Desktop和Mobile, 但是如果Desktop 视图和mobile视图不同,这时Django Cache就会有问题,
如果某个页面先被desktop模式访问之后,页面会被缓存,但手机端再访问这个页面时,发布页面已经被缓存,所以直接返回,
但是被缓存的内容是Desktop模式,在手机端显示会有些奇怪。

引用

https://docs.djangoproject.com/zh-hans/4.0/topics/cache/
https://docs.djangoproject.com/zh-hans/4.0/topics/cache/#using-vary-headers
https://github.com/django/django/blob/main/django/utils/cache.py
https://github.com/Botir/Django-Mobile-Detector

Django-Mobile-Detector

Mobile Detector 请参考: https://github.com/Botir/Django-Mobile-Detector

使用Vary Header

Vary Header介绍: https://docs.djangoproject.com/zh-hans/4.0/topics/cache/#using-vary-headers

Nginx return 400 bad request | nginx proxy_pass url decoding

Nginx return 400 bad request

Refer

https://stackoverflow.com/questions/28684300/nginx-pass-proxy-subdirectory-without-url-decoding/37584637#37584637

Background

proxy pass static image to another host, most of requests are ok, but some requests return 400 (bad request).

Enable nginx debug

edit /var/nginx/nginx.conf

        error_log /var/log/nginx/error.log debug;

Track error log

nginx config

location ~ ^/static/images/(.*) {
        proxy_pass http://youranotherdomain/images/$1;
    }

N1 安装打印服务CUPS - HP 1020 Plus

N1 安装打印服务CUPS - HP 1020 Plus

引用

https://www.jianshu.com/p/95129aa88dfe
https://www.right.com.cn/forum/thread-4258977-1-1.html
https://www.right.com.cn/forum/thread-8227890-1-1.html
https://forums.fedoraforum.org/showthread.php?326268-Kernel-upgrades-making-WiFi-and-printer-drivers-incompatible
https://gist.github.com/bcastellano/ae63e9e2da2c3d068c0014ed6963a5a1
http://chee-yang.blogspot.com/2008/10/linux-install-hp-laserjet-1020-on-cups.html

背景

最近孩子在家上网课,老师每天发的学习资料,有一部分打印出来比较方便,经常往打印店跑,感觉有点太麻烦。
网上查了一下,HP 1020 plus 激光打印机,挺好,耗材便宜,配合N1,实现共享打印很方便, 所以就在闲鱼上买了个二手的,成色一般
打印机直接插笔记本上,可以自动识别并正常打印,然后就是折腾N1打印服务, 遇到最主要的问题就是N1不能识别打印机,整个过程记录如下。

N1 需要安装Armbian(不是必须的,但本文是基于Armbian, 如果是其它系统,本文可能不适用)

GoAccess Nginx 转发 | 实时查看nginx日志信息

Nginx | 使用日志分析工具GoAccess实时查看Nginx日志信息

引用

https://goaccess.io/
https://github.com/allinurl/goaccess/issues/1328
https://github.com/allinurl/goaccess
https://www.jianshu.com/p/b134995ae16c

说明

在搜索nginx log分析工具时,看到了GoAccess, 开源免费不仅有终端界面,也有Web界面,
本文主要讲解和记录一下,实时Web页面的更新及Nginx配置。

Sitecore AAD user can't elevated unlock item | sitecore Elevated Unlock not working

Login Sitecore with Azure Active Directory can't elevated unlock item

Refer to

https://www.altudo.co/resources/blogs/azuread-setup-for-sitecore

Question

AAD user can't elevated unlock sitecore item, sitecore local user is working normally.
When AAD user click the Elevated Unlock button , it's refresh the page ,but not unlock item.
https://s1.ax1x.com/2022/05/17/O541jH.png

Info

  • Elevated Unlock is a powershell script of Sitecore SPE module.

吐血推荐 docker 搭建Koel 详细步骤

转自: https://hostloc.com/thread-1003560-1-1.html

引用

https://hostloc.com/thread-1003560-1-1.html
https://koel.dev/

说明

Koel是一个自己托管自己的音乐的平台,官网 https://koel.dev/
这是我搭建的效果:
https://s1.ax1x.com/2022/04/21/Ly70Bt.jpg

音乐是论坛分享的douban250 无损flac:
https://www.aliyundrive.com/s/xuLCHkV97ML/folder/60dbe0c6f4f846a765ca403e982fa00b2849bd46

联通 809 xray v2ray 免流

转自: https://hostloc.com/thread-992039-1-1.html

引用

https://hostloc.com/thread-992039-1-1.html
https://github.com/Yuzuki999/Mianliu-809

说明

说是可以免一切联通流量,然后发现还可以中转,而且中转贼鸡儿快,如果本文有问题请版主删帖,不要封我!
看一下他的源作者https://github.com/Yuzuki999/Mianliu-809
大概就是说,通过去访问沃电视,带着你服务器的ip和端口,然后返回一个失效时间,这段时间内,你的服务器ip就进入了联通的白名单,就可以免了

步骤

然后再说一下怎么做

nohup + rsync 后台断点续传文件

引用

https://www.jianshu.com/p/82fe7f184b93

步骤

执行

nohup rsync --ignore-existing -razP -e ssh  /data1 [email protected]:/data1

输出

nohup: appending output to `nohup.out'

Password:

输入密码后按ctrl+z,中断进程
服务器输出

[1]+ Stopped nohup rsync --ignore-existing -razP -e ssh /data1 [email protected]:/data1

Sitecore 重建索引错误,未知字段 'title_t_vi' 'xxx_t_vi' , Sitecore rebuild index error unknown field 'title_t_vi' 'xxx_t_vi'

引用

https://sitecoreblog.marklowe.ch/2018/10/customize-solr-managed-schema/
https://mikael.com/2020/10/dealing-with-solr-managed-schema-through-sitecore-config-files/
https://github.com/mikaelnet/sitecore-solr-config
https://sitecore.namics.com/adding-new-languages-to-sitecores-solr-indexes/
https://solr.apache.org/guide/6_6/language-analysis.html

错误信息 error message

Job started: Index_Update_IndexName=sitecore_master_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> SolrNet.Exceptions.SolrConnectionException: <?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">400</int>
  <int name="QTime">23</int>
</lst>
<lst name="error">
  <lst name="metadata">
    <str name="error-class">org.apache.solr.common.SolrException</str>
    <str name="root-error-class">org.apache.solr.common.SolrException</str>
  </lst>
  <str name="msg">ERROR: [doc=sitecore://master/{eb4abdf4-67f5-45bd-b9fd-1ed3dbbd2959}?lang=vi-vn&amp;ver=1&amp;ndx=sitecore_master_index] unknown field 'title_t_vi'</str>
  <int name="code">400</int>
</lst>
</response>

重现问题步骤

  • 在sitecore(/sitecore/system/Languages) 中添加越南语言(vi-VN)
  • 给越南语言添加内容,并保存发布,
  • 尝试重建sitecore_master_index索引

Viagle Blog

欢迎来到我的个人博客网站