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 / 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 / download_talebook.sh
Last active January 9, 2023 08:01
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 / 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 / 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 / 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
import org.junit.contrib.java.lang.system.internal.CheckExitCalled;
import org.junit.contrib.java.lang.system.internal.NoExitSecurityManager;
import org.junit.jupiter.api.extension.*;
import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
import org.junit.jupiter.api.extension.ExtensionContext.Store;
import org.junit.platform.commons.support.ReflectionSupport;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@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 / build-protoc.sh
Created January 21, 2021 09:54
Build protoc.exe for Apple M1
#!/bin/bash
# Builds protoc executable into target/<OS>/<ARCH>/protoc.exe; optionally builds
# protoc plugins into target/<OS>/<ARCH>/protoc-gen-*.exe
#
# Usage: ./build-protoc.sh <OS> <ARCH> <TARGET>
#
# <TARGET> can be "protoc" or "protoc-gen-javalite". Supported <OS> <ARCH>
# combinations:
# HOST <OS> <ARCH> <COMMENT>