Skip to content

Instantly share code, notes, and snippets.

View horizon0514's full-sized avatar
🎯
Focusing

horizon horizon0514

🎯
Focusing
View GitHub Profile
@horizon0514
horizon0514 / cargo_x86_64-unknown-linux-gnu-on-m1-mac.sh
Created March 9, 2023 12:38 — forked from shqld/cargo_x86_64-unknown-linux-gnu-on-m1-mac.sh
cargo build for the target x86_64-unknown-linux-gnu on M1 Mac
# https://github.com/messense/homebrew-macos-cross-toolchains
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu
export CC_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-gcc
export CXX_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-g++
export AR_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-ar
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc
@horizon0514
horizon0514 / github-proxy.sh
Created December 8, 2021 07:42
github 设置代理
# 只对 github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:7890
@horizon0514
horizon0514 / delete-files.js
Last active December 7, 2021 11:52
Delete glob files use Node
import del from del;
async function deleteFiles(patterns) {
return del(patterns);
}
// use example
// const pattern = [`packages/**/*.js`, `!packages/common/**/*.js`, '!packages/example/**/*.js'];
// deleteFiles(pattern);
@horizon0514
horizon0514 / git-ignore.sh
Created December 3, 2021 06:19
git remove ignored files
git rm -r --cached .
git add .
git commit -am "Remove ignored files"
@horizon0514
horizon0514 / nvm.sh
Last active November 30, 2021 14:14
nvm 设置 taobao mirror 镜像地址
// 临时设置,也可以通过安装 nrm 设置
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node/
nvm install node
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
}