Flutter删除缓存

删除.pub-cache

删除对应的库,比如:

rm -rf ~/.pub-cache/git/flutter_xxx*

删除 pub 缓存

flutter pub cache repair

重装

flutter clean
rm -rf pubspec.lock
flutter pub get

Pod 重装

你懂得 …

M1 Pro iOS lame 编译报错

iOS编译lame报错:

Building for 'iOS-simulator', but linking in object file (/Users/mac/.pub-cache/git/flutter_plugin_record-d11120b8be154e38c6e36fc895ec6ea8c612375c/ios/lame-ios.framework/lame-ios[arm64][2](VbrTag.o)) built for 'iOS'

这一看lame官网,好家伙,最后一个版本 2017 年发布的,你搁哪儿给我扯蛋呢?

阅读更多

uni-app 配置env环境变量

在项目根目录新建几个.env.x,例如

.env.development
.env.alpha
.env.beta
.env.production

注意,这里面的名字不是乱起的,不是你想搞成什么名字就是什么名字,必须得是VITE_开头,不要问我为什么,我只想静静,也不要问我静静是谁 …

VITE_BASE_URL=http://www.baidu.com
(import.meta as any).env.VITE_BASE_URL;

Git常用统计命令

  1. 按照增删代码行数,输出百分比,对贡献者进行排名
git log --all --no-merges --numstat --pretty=format:"%an" | awk '
/^[^0-9-]/ {user=$0}
/^[0-9]/ {add[user]+=$1; del[user]+=$2; total+=$1+$2}
END {
for (u in add)
printf "%s: %d/%d = %.2f%%\n", u, add[u]+del[u], total, (add[u]+del[u])*100/total
}' | sort -t= -k2 -nr
Station Chenqiao: 634940/1677098 = 37.86%
liuc: 589876/1677098 = 35.17%
tongyuhu: 262416/1677098 = 15.65%
zhenwei: 57935/1677098 = 3.45%
Shuo Dai: 56632/1677098 = 3.38%
niuhao: 49964/1677098 = 2.98%
SunYupeng: 17014/1677098 = 1.01%
daisy: 4615/1677098 = 0.28%
陈桥驿站: 2879/1677098 = 0.17%
ohhhhDaisy: 718/1677098 = 0.04%
zhenwei688: 106/1677098 = 0.01% <--
Administrator: 3/1677098 = 0.00%
  1. 项目第一次提交的日期
git log --reverse --format="%ad" --date=short | head -n 1
2020-11-25

CSS显示几行文字,溢出的部分显示 ... 终极代码

.name {
font-size: 16px;
color: #000;
font-weight: 600;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
overflow-wrap: break-word;
max-width: 100%;
min-width: 0;
}