Mac系统使用小技巧
日历增强
法定节假日日历源地址:https://mtjo.net/icalendar/holidays.ics
命令行分卷压缩
# -b 指定单个分卷大小 -a 指定分卷序号位数 demo.zip为文件通配前缀
# 压缩后生成文件需手动修改后缀为demo.zip.001格式才能解压
zip - demo.txt |split -b 20mb -a 3 - demo.zip
常见问题处理
远程登陆告警
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
该问题是因为通过本地ssh客户端登陆远程服务器时,客户端会将本地
LC_*
环境变量发发送到远程服务器上,当本地环境变量内容在远程服务器不存在时,就会导致远程服务器告警;解决方案:
修改本地ssh客户端配置文件
/etc/ssh/ssh_config
,注释其中SendEnv LANG LC_*
即可;vi
编辑文本异常Error detected while processing BufNewFile Autocommands for "*.gradle"..FileType Autocommands for "*"..Syntax Autocommands for "*"..function <SNR>6_SynSet[25]..script /opt/local/share/vim/vim82/syntax/groovy.vim: line 256: E945: Range too large in character class Press ENTER or type command to continue
该报错可能与设置
vim
主题有关,可通过在配置文件~/.vimrc
中添加配置规避;~/.vimrc set re=0;
iterm2
全屏顶部闪动白条目前怀疑为
Big Sur
的Bug,可通过iTerm2的配置解决,配置路径为:Advanced > General > Work around Big Sur bug where a white line flashes at the top of the screen in full screen mode
,修改配置项为Yes即可;启动软件报错
you do not have permission to open the application
该问题出现在OSX 11系统上,可尝试通过以下代码重新签名尝试修复
codesign --force --deep --sign - /Applications/DBeaver.app