Skip to content

Instantly share code, notes, and snippets.

View eddy8's full-sized avatar

Jianhua Sun eddy8

  • China
View GitHub Profile
@eddy8
eddy8 / download_talebook.sh
Created April 8, 2022 02:48 — forked from syhily/download_talebook.sh
Download all the books from a talebook website. The https://curl.se/ and https://stedolan.github.io/jq/ are required for using this script.
#!/usr/bin/env bash
# Download metadata, modify these as your needs.
## The directory to save the downloaded files.
download_directory="/volume1/Download/EPUB"
## The website you want to visit.
calibre_site="http://soulseeker.myds.me:25788"
## The formats you want to download. We only download the first present format.
## All the formats should be upper case.
allow_formats=( EPUB MOBI AZW3 )
@eddy8
eddy8 / git.md
Last active January 5, 2025 12:37
git 注意事项

换行符的自动转换问题

#全局配置
git config --global core.autocrlf false

#仓库单独配置,在仓库目录下执行
git config core.autocrlf false

core.autocrlf有以下三种配置,建议设置为false

  • false:不进行换行符的自动转换,保留文件的原始换行符。
@eddy8
eddy8 / nginx.md
Created January 5, 2025 12:31
nginx tips

https 部署自签名 ssl 证书

生成证书:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /cert/nginxselfsigned.key -out /cert/nginxselfsigned.crt

配置 Nginx:

server {
  listen 127.0.0.1:80;
 listen 127.0.0.1:443 ssl;