Skip to content

Instantly share code, notes, and snippets.

View syhily's full-sized avatar

Yufan Sheng syhily

View GitHub Profile
@syhily
syhily / opposans.css
Last active April 22, 2024 09:11
opposans.css
/**
* OPPO Sans Fonts from: https://db.quike.com.cn/_nuxt/fonts/
*/
@font-face {
font-family: "OPPOSans";
src: url(https://db.quike.com.cn/_nuxt/fonts/OPPOSans-B.d74d1bd.woff2) format("woff2"), url(https://db.quike.com.cn/_nuxt/fonts/OPPOSans-B.b8436d4.woff) format("woff");
font-variation-settings: 'wght' 700;
font-weight: 700;
font-style: normal;
font-display: swap
@syhily
syhily / goimports.sh
Last active December 21, 2022 11:59
A custom goimports script with better -local sorting support. Used in pre-commit hooks.
#!/bin/bash
## This shell script is used with https://github.com/TekWizely/pre-commit-golang
# You should add it to your .pre-commit-config.yaml file with the options like
#
# - repo: https://github.com/tekwizely/pre-commit-golang
# rev: v1.0.0-rc.1
# hooks:
# - id: go-mod-tidy-repo
# - id: golangci-lint-mod
@syhily
syhily / pilimi-chinese-torrent-list.txt
Last active December 28, 2023 08:56
Filter the Chinese books that we need.
pilimi-zlib-420000-2379999.torrent
pilimi-zlib-2380000-2829999.torrent
pilimi-zlib-2830000-5239999.torrent
pilimi-zlib-5240000-5329999.torrent
pilimi-zlib-5330000-5359999.torrent
pilimi-zlib-5360000-5379999.torrent
pilimi-zlib-5380000-5449999.torrent
pilimi-zlib-5450000-5479999.torrent
pilimi-zlib-5480000-5499999.torrent
pilimi-zlib-5500000-5519999.torrent
@syhily
syhily / zc688.txt
Created June 7, 2022 01:55
Calibre-Web 书籍下载地址
This file has been truncated, but you can view the full file.
http://zc688.top:20206/download/1/epub/1.epub
http://zc688.top:20206/download/2/epub/2.epub
http://zc688.top:20206/download/3/epub/3.epub
http://zc688.top:20206/download/4/epub/4.epub
http://zc688.top:20206/download/5/epub/5.epub
http://zc688.top:20206/download/6/epub/6.epub
http://zc688.top:20206/download/7/epub/7.epub
http://zc688.top:20206/download/8/epub/8.epub
http://zc688.top:20206/download/9/epub/9.epub
http://zc688.top:20206/download/10/epub/10.epub
@syhily
syhily / curl_tianlangbooks.sh
Last active October 5, 2022 06:04
抓取天浪书屋的蓝奏云下载链接
for((i=1;i<=10302;i++));
do
echo ""
echo ""
echo "Start download book from $i"
echo ""
echo ""
curl "https://www.tianlangbooks.com/$i.html" -H 'authority: www.tianlangbooks.com' --data-raw 'secret_key=359198&Submit=%E6%8F%90%E4%BA%A4' --compressed | grep "蓝奏云盘" >> download.txt
done
@syhily
syhily / docker-compose.yml
Last active October 26, 2022 11:42
Miniflux on Synology Docker
version: "3.4"
services:
miniflux:
image: miniflux/miniflux:latest
container_name: miniflux
depends_on:
- rsshub
- postgres
ports:
- 1541:8080
@syhily
syhily / bootstrap.sh
Last active June 4, 2022 15:58
How to use docker talebook with MySQL.
#!/usr/bin/env bash
# Patch current talebook for adding permission
grep -qxF 'user.permission = ' /var/www/talebook/webserver/handlers/user.py || sed -i '/user.email = email/a \ \ \ \ \ \ \ \ user.permission = '\''DEPRU'\''' /var/www/talebook/webserver/handlers/user.py
# Start talebook
source /var/www/talebook/docker/start.sh
@syhily
syhily / download_talebook.sh
Last active June 4, 2024 11:57
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 )
@syhily
syhily / sync_fork.sh
Last active November 14, 2021 08:27
Update git fork with tags and selected branches.
# Repo: apache/flink
# Fork: streamnative/flink
# Prepare the working enviroment
## Clone the forked repository
git clone [email protected]:streamnative/flink.git
## Add the original repository as the upstream git remote
git remote add upstream [email protected]:apache/flink.git
@syhily
syhily / gist:6567c92a83f426b289e24942c0094c43
Created January 31, 2021 17:54 — forked from ansell/gist:1141550
Maven: Compiling and installing test jar without running them
mvn -DskipTests test-compile jar:test-jar install
the similar command below, will not compile or package the jar file (if you are using the surefire plugin) so, don't use it if you want to distribute the test jar file without running the tests
mvn -Dmaven.test.skip test-compile jar:test-jar install