Duplicate file or floder x times with command Line

ometimes there might be a need to make multiple copies of the same file. Normally in order to make a copy of a file, one would have to open the file and click “Save As” on the Menu to the save the file in a different name. The key to having multiple copies of a file is to make sure that each file is named differently otherwise they will overlap.

Fortunately this can be done quite easily by writing some commands on the Command prompt of Windows.

Steps

  1. Create a Folder where you want to save the files.
  2. Save the File in the Folder for which you want to make multiple copies.
  3. Name the File as “cat” . For Example cat.jpg
  4. Open the Command Prompt withe CMD
  5. Change your directory to the location of the folder
  6. And then type this command
for /l %f in (1,1,5) do copy cat.pdf cat%f.pdf

On the command above “5” is the number of copies to be made. Substitute that with the number of copies you would actually need.

This is how it appears Initially. There is a Text Document named “1” on a folder.

申请SSL证书,包括FreeSSL申请、Acme脚本申请等方式

准备工作

1、域名一个

2、托管域名到 Cloudflare

3、后面 ACME 脚本申请证书,需要安装以后才可以进行使用,禁止直接使用 ACME 目录下面的证书文件。

申请 SSL 证书

FreeSSL 申请证书

这种方式申请证书,比较简单,而且还可以申请到为期一年的 “亚洲诚信” 的证书,但是,目前此网站申请证书需要进行手机验证,所以,若是有疑虑的小伙伴们还是去尝试下面其他的方法。

Acme 脚本申请证书

Acme 脚本申请证书,是我们用到的最常见的一种证书的申请方式,它有很多的申请方法,大家只需要找到一种适合自己的也就好了。

不管用下面的何种方式申请,都需要安装 Acme,有一部分的申请场景需要用到相关的插件,所以我们需要提前安装。

Continue reading “申请SSL证书,包括FreeSSL申请、Acme脚本申请等方式”

X-ui

功能介绍

  • 系统状态监控
  • 支持多用户多协议,网页可视化操作
  • 支持的协议:vmess、vless、trojan、shadowsocks、dokodemo-door、socks、http
  • 支持配置更多传输配置
  • 流量统计,限制流量限制到期时间
  • 可自定义 xray 配置模板
  • 支持 https 访问面板(自备域名 + ssl 证书)
  • 更多高级配置项,详见该项目的 GitHub:点击访问

准备工作

1、VPS 一台重置好主流的操作系统 (CentOS 7+、Ubuntu 16+、Debian 8+)

2、域名一个,做好相关的解析,若是需要套用 CDN,请托管域名到 cloudflare .

Continue reading “X-ui”

如何解决NAS video station TMDB连接测试失败的问题

申请TMDB的API.

SSH:

  1. 打开终端
  2. 访问NAS,输入密码
  3. 要管理员权限,输入密码
ssh 你的DSM用户名@IP -p 22
输入密码
sudo -i
输入密码

更改群晖hosts文件

vi /etc/hosts

在键盘上点击i,发现左下角已经变成了INSERT

Continue reading “如何解决NAS video station TMDB连接测试失败的问题”

Alist文件列表程序Webdav在Windows系统下映射本地磁盘方法

前言
网上找到个Alist文件列表程序作本地磁盘映射的最简单方式,无需安装任何客户端,几行代码即可搞定。可以实现本地挂载多个网盘。 本人亲测非常好用,用此方法也可以完成网盘之前的复制/粘贴。

如何获取Alist文件列表程序的Webdav地?
链接地址:http[s]://domain:port/dav/ 协议:http/https 根据自己情况更换 端口:同web端口 账号:见设置-后端-WebDAV username 密码:见设置-后端-WebDAV password

使用方法
新建一个 txt 文本,输入以下内容:保存后修改文件名后缀为 .bat,(注意空格):

net use Z: WebDAV地址 /user:你的账号 /persistent:YES 你的密码

(以上的 Z 指的是映射到本机地址作为虚拟的 Z 盘,可以改成其他的盘符,也可以用此方法建立多个,但尽量从字母表顺序往前倒着来,防止和已有的盘冲突) 用坚果云举例,命名为 WebDAVLink.bat:

net use Z: https://dav.jianguoyun.com/dav /user:[email protected] /persistent:YES mypassword

然后将此文件 WebDAVLink.bat 复制到以下路径,可以在系统启动时自动连接: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

小雅 Alist

小雅 Alist 白嫖近千T网盘资源,影视即点即播 网盘资源 webdav 小雅Alist:http://alist.xiaoya.pro/ 获取Token:https://easy-token.cooluc.com/

0. docker stop xiaoya; docker rm xiaoya
1. mkdir -p /etc/xiaoya
2. touch /etc/xiaoya/mytoken.txt
3. 这生成了一个空的文件 /etc/xiaoya/mytoken.txt ,这时候你就可以把你的token填进去了,不填也可以 .
4. 官网的一键脚本:

docker run -d -v /etc/xiaoya/mytoken.txt:/mytoken.txt -p 5678:80 --restart=always --name=xiaoya xiaoyaliu/alist:latest
curl -s http://docker.xiaoya.pro/update_xiaoya.sh | bash

Enable Oracle cloud root login with SSH

1:开启root登入

sudo su
cd /root

修改authorized_keys文件(即ssh证书)
vi .ssh/authorized_keys
把ssh-rsa之前的文件都删除掉.
编辑ssh配置文件
nano /etc/ssh/sshd_config
找到PermitRootLogin, 把前面的#去掉 改成下面这样
PermitRootLogin yes
ctrl+x 保存退出 选择y 然后回车
然后
reboot
重启服务器。就可以使用root用户名配合秘钥登入了

Continue reading “Enable Oracle cloud root login with SSH”