macOS markdown 转 docx

一行代码直接搞定:

➜  ~ pip3 install pypandoc
Collecting pypandoc
Downloading pypandoc-1.15-py3-none-any.whl.metadata (16 kB)
Downloading pypandoc-1.15-py3-none-any.whl (21 kB)
Installing collected packages: pypandoc
Successfully installed pypandoc-1.15
➜  ~ python3 -c "import pypandoc; pypandoc.convert_text(open('input.md').read(), 'docx', format='md', outputfile='output.docx', extra_args=['--standalone'])" 

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;

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;
}