export http_proxy="http://172.16.20.151:7890/"
export https_proxy="http://172.16.20.151:7890/"
export no_proxy="localhost,127.0.0.1,::1"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type StrLen<T extends string, __Res extends Array<string> = []> = T extends `${infer A}${infer RestB}` | |
? StrLen<RestB, [...__Res, A]> | |
: __Res['length'] | |
export type IsValidPath< | |
T extends string, | |
__Res extends boolean = StrLen<T> extends 0 ? false : true, | |
> = T extends `${infer A}${infer RestB}` | |
? __Res extends false | |
? false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
最近发现 机场 + v2raya + GFWList 的全局透明代理的效果最好, 透明代理配置好以后, 就不再需要 SwitchyOmega 和 proxy-ns 其他工具, 省心方便, 下面是具体的攻略: | |
购买机场 | |
我主要用这个机场, 这个机场的好处是全平台支持, 非 Linux 平台都有专用客户端, 开箱即用很方便。 | |
安装 v2raya | |
ArchLinux 用yay -S v2raya 命令一键安装 v2raya, 然后在浏览器打开 http://127.0.0.1:2017 进行如下配置: | |
订阅机场: 拷贝机场订阅 URL, 点击导入按钮导入 | |
选择服务器: 选择 S.JISUSUB.CC 标签, 选择一个合适的服务器, 然后选择左上角启动按钮 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:xtradeb/apps -y | |
sudo apt update | |
sudo apt install chromium |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose pull | |
docker-compose up --force-recreate --build -d | |
docker image prune -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(const_trait_impl)] | |
fn extend_lifetime(x: &str) -> &'static str { | |
f::<S>(x) | |
} | |
const fn f<'a, T: Tr<'a> + ~const Drop>(x: &'a str) -> T::Ty { | |
// can call g with T: Drop bound, even though | |
// T: ~const Drop works for non-Drop-implementing types | |
g::<T>(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type StrLen<T extends string, R extends Array<string> = []> = T extends `${infer C}${infer P}` | |
? StrLen<P, [...R, C]> | |
: R['length'] | |
type StrSplit<T extends string, S extends string, R extends Array<string> = []> = T extends `${infer X}${S}${infer Y}` | |
? StrSplit<Y, S, StrLen<X> extends 0 ? R : [...R, X]> | |
: StrLen<T> extends 0 | |
? R | |
: [...R, T] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://serverfault.com/questions/57529/how-do-i-get-the-md5-of-a-file-on-windows | |
CertUtil -hashfile yourFileName MD5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://clients2.google.com/service/update2/crx?response=redirect&os=win&arch=x64&os_arch=x86_64&nacl_arch=x86-64&prod=chromiumcrx&prodchannel=beta&prodversion=79.0.3945.53&lang=ru&acceptformat=crx3&x=id%3D<ID>%26installsource%3Dondemand%26uc |
NewerOlder