Skip to content

Instantly share code, notes, and snippets.

@xiaochun-z
xiaochun-z / ebook-wordwise.json
Last active July 6, 2024 15:11
ebook-wordwise latest
{
"version": "0.1.13",
"notes": "See the assets to download this version and install.",
"pub_date": "2024-07-06T12:05:28.491Z",
"platforms": {
"linux-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVTbEloQWVYNDdOTFM2djVMdnZLOG5vSEFWKzBIcHpZdUh6NzhER3lGSHBCOEtaVzlMTEkyc0Q0eHB2V0RSVlhjM0dLTmtMV1JaRlBJd3NER3gycUlFTXdneW5BTWcvZmdNPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzIwMjY3Mjc4CWZpbGU6ZWJvb2std29yZHdpc2VfMC4xLjEzX2FtZDY0LkFwcEltYWdlLnRhci5negpNN1lYY1dKYjJzU1hZYUpKaUFGejlZTmlmWG9Xc0VBN0NqcEhjUGNtZ3NVZGdFT1dBY0lIaHlIZGUzNTBGNFBxbmRZaWpHWkkrbGlSYVNZTThGK0xCQT09Cg==",
"url": "https://github.com/xiaochun-z/ebook-wordwise/releases/download/v0.1.13/ebook-wordwise_0.1.13_amd64.AppImage.tar.gz"
},
"windows-x86_64": {
@xiaochun-z
xiaochun-z / uwp_zip_unzip_resource.cs
Last active May 17, 2019 09:52
UWP Zip/Unzip/ Read Resource File
/// <summary>
/// note the build action should be Embedded Resource.
/// </summary>
/// <param name="resourceName"></param>
/// <returns></returns>
private async Task<StorageFile> ExtractFile(string resourceName)
{
var assembly = GetType().Assembly;
var nameWithAssembly = $"{assembly.GetName().Name}.{resourceName}";
var names = assembly.GetManifestResourceNames();
@xiaochun-z
xiaochun-z / py-threshold-image.py
Last active May 18, 2019 03:20
remove some other colors for ocr, possible python package: imutils numpy opencv-python Pillow pytesseract
from PIL import Image
import pytesseract
import cv2
from os import listdir
from os.path import isfile, join
if __name__ == "__main__":
path = r'C:\Users\c\Downloads\ocr'
onlyfiles = [f for f in listdir(path) if isfile(join(path, f))]

解决 Git 在 windows 下中文乱码的问题

原因

中文乱码的根源在于 windows 基于一些历史原因无法全面支持 utf-8 编码格式,并且也无法通过有效手段令其全面支持。

解决方案

  1. 安装

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@xiaochun-z
xiaochun-z / .rtorrent.rc
Last active May 14, 2017 08:59 — forked from wangyan/.rtorrent.rc
This is an Chinese example resource file for rTorrent.
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# 每个种子所允许的最小最大连接数
#min_peers = 40
#max_peers = 100
# 同上,但仅针对已完成的种子(-1 表示与下载中的种子一致)
#min_peers_seed = 10
@xiaochun-z
xiaochun-z / rtorrent.sh
Last active May 14, 2017 08:34 — forked from wangyan/rtorrent.sh
rtorrent satart shell script
#!/bin/sh
case "$1" in
start)
echo -n "Starting rtorrent"
su - root -c "screen -A -m -d -S rtorrent /usr/bin/rtorrent" &
echo "."
;;
stop)
echo -n "Stopping rtorrent"