首页 技术 正文
技术 2022年11月15日
0 收藏 876 点赞 3,424 浏览 2091 个字
macOS 常用命令1. 显示“任何来源”选项
sudo spctl --master-disable2. 阻止屏保和睡眠
caffeinate -t 3600
这是一个BSD命令。-t可选,按Ctrl+C可结束命令3. 朗读
say Hello4. 重试命令直到成功
until cliclick -h; do sleep 2; done ; say Done
将cliclick -h替换成自己的命令,say Done可以忽略。5. 记录终端命令到svg
pip3 install pip
pip install termtosvg
termtosvg 1.svg
Ctrl+D/exit结束6. 下载视频
【you-get】
pip install you-get
you-get 一个视频页面网址【youtube-dl】
brew install youtube-dl
youtube-dl -F 一个视频页面网址 // 查看下载资源和编号信息
youtube-dl -f 1 一个视频页面网址 // 下载编号为1的资源7. 将所有下载过的文件列出来
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' |more8. 重置Launchpad
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock9. 清理DNS
sudo killall -HUP mDNSResponder10. 释放磁盘缓存
sudo purge11. 安装命令行工具
xcode-select --install12. 安装Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"安装常用工具
https://linux.cn/article-10171-1.htmlbrew install bat
echo "alias cat='bat'" >> ~/.zshrcbrew install prettyping
echo "alias ping='prettyping --nolegend'" >> ~/.zshrcbrew install fzf
$(brew --prefix)/opt/fzf/install
vim ~/.zshrc
alias preview="fzf --preview 'bat --color \"always\" {}'"
# 支持在 VS Code 里用 ctrl+o 来打开选择的文件
export FZF_DEFAULT_OPTS="--bind='ctrl-o:execute(code {})+abort'"brew install htopbrew install diff-so-fancy
vim ~/.gitconfig
[pager]
diff = diff-so-fancy | less --tabs=1,5 -RFX
show = diff-so-fancy | less --tabs=1,5 -RFXbrew install fd
例子:
$ fd cli # 所有包含 "cli" 的文件名
$ fd -e md # 所有以 .md 作为扩展名的文件
$ fd cli -x wc -w # 搜索 "cli" 并且在每个搜索结果上运行 `wc -w`brew install ncdu
echo 'alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules"' >> ~/.zshrcbrew install tldr
echo "alias help='tldr'" >> ~/.zshrc
tldr fd安装ack和ng
brew install ack
brew install the_silver_searcher13. 字体
Adobe source code
brew tap caskroom/fonts && brew cask install font-source-code-pro14. antigen zsh
cd ~
curl -L git.io/antigen > antigen.zsh
vim ~/.antigenrcsource $HOME/antigen.zsh
antigen use oh-my-zsh
antigen bundles <<EOBUNDLES
git
#gitfast
git-extras
heroku
sudo
z
history
cp
rsync
#encode64
osx
brew
brew-cask
#command-not-found
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
EOBUNDLES
antigen theme lambda
#antigen theme clean
#antigen theme ys
antigen applyecho source \$HOME/.antigenrc>~/.zshrc
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,909
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,434
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,249
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,060
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,692
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,730