Skip to content

Instantly share code, notes, and snippets.

View rain2307's full-sized avatar
🎯
Focusing

rain2307

🎯
Focusing
  • New York
View GitHub Profile
@rain2307
rain2307 / rust-command-line-utilities.markdown
Created January 28, 2024 15:39 — forked from sts10/rust-command-line-utilities.markdown
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@rain2307
rain2307 / docker-registry-mirrors.md
Last active February 7, 2024 11:55 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@rain2307
rain2307 / 压缩脚本.sh
Created September 2, 2023 22:17 — forked from MoyuScript/压缩脚本.sh
字体压缩
#!/bin/bash
# MIT License
# Copyright (c) 2022-present MoyuScript
# See: https://mit-license.org/
echo "Input path: $1"
echo "With subset: $2"
echo "Custom text file: $3"
@rain2307
rain2307 / Cargo.toml
Created August 27, 2023 02:21
dll.rs
[target.'cfg(windows)'.dev-dependencies]
windows = { version = "0.48.0", features = [
"Win32_System_LibraryLoader",
"Win32_Foundation",
] }
@rain2307
rain2307 / tracing.rs
Created August 24, 2023 00:03
init tracing
use tracing_appender;
use tracing_error::ErrorLayer;
use tracing_subscriber::{self, fmt, prelude::*, registry::Registry};
pub fn init_tracing(directory: &str, file_name: &str) -> tracing_appender::non_blocking::WorkerGuard {
let file_appender = tracing_appender::rolling::hourly(directory, file_name);
let (non_blocking, guard) = tracing_appender::non_blocking(file_appender);
let file_log =
fmt::layer().with_ansi(false).with_thread_names(true).with_line_number(true).with_writer(non_blocking).pretty();
根据Unicode5.0整理如下:
1)标准CJK文字
http://www.unicode.org/Public/UNIDATA/Unihan.html
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF
http://www.unicode.org/charts/PDF/UFF00.pdf
3)CJK部首补充:2E80-2EFF
http://www.unicode.org/charts/PDF/U2E80.pdf