curl发送POST请求
curl -X POST -F token=TOKEN -F ref=REF_NAME http://some.wwww.url
git命令学习还在搜索?试试下面的命令
git help -a
git help -g
创建桌面太乱,不想看?😂
defaults write com.apple.finder CreateDesktop false; killall Finder
git设置credential.helper
git config --global credential.helper osxkeychain
git大文件命令
git lfs --help
git修改配置,指定文件
git config -f .lfsconfig lfs.url https://lfs.example.com/foo/bar/info/lfs
看看git在钥匙串里存了啥
git credential-osxkeychain get
看看lfs的环境变量
git lfs env
看看go在哪里?
go env GOPATH
搜索go
brew search go
安装go
brew install go
git提交代码 加描述
git commit -m "build success"
超快搜索代码
https://github.com/ggreer/the_silver_searcher
brew install the_silver_searcher
当前文件夹查找所有3倍图
find . -name "*3x*"
kill所有的某进程,例如xcodebuild
killall xcodebuild
查看进程端口
top -U <username> -o ports
命令行执行Apple Script
osascript -e $ascript
用swift实现生成Xcode工程,支持YAML或json文件配置
https://github.com/yonaskolb/XcodeGen
打印执行文件里的所有字符串
strings <可执行文件>
查看zip文件内容
zipinfo
解压some文件
unzip -p XXX.ipa 'Payload/*.app/Info.plist'
git子模块命令帮助
git submodule update --help
用命令行打开Sourcetree某个文件夹
stree <path>
给文件添加执行权限
chmod +x <path>
随系统启动
launchctl load <path>.plist
xargs命令用法
ls | xargs -I {} echo "{}"
brew主页
brew home
plutil -p Info.plist
强制删除某个分支
git branch -D
命令行启动某个模拟器
xcrun simctl boot 'iPhone 11'
删除不可用的模拟器
xcrun simctl delete unavailable
列出所有的设备,json格式
xcrun simctl list --json devices
实现通用链接
curl https://rhino.lvmama.com/.well-known/apple-app-site-association
开启新screen,避免占用终端窗口
screen -D -R nameofscreen
试试gitk,图形化界面
gitk
用脚本显示通知
osascript -e 'display notification "Content" '
只接收fast forward的pull
git pull --ff-only
建立https链接
openssl s_client -connect direct.some.com:443
Xcode显示构建时间
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
brew 可以管理的服务
brew services
scp 从端口转发的iOS越狱设备上copy文件
scp -r -P <port> root@localhost:<fromPath> <DesPath>
svn矢量图转png
cairosvg -f png -o output3.png -s 2 ~/Desktop/one.svg
指定目录执行git命令
git -C <repo Path> status
创建空文件
touch命令
获取文件的md5
md5命令
md5 -q <file path>
如果只想获取md5的值,例如在脚本里,可以用-q 参数
普通的获取可以-s或者不加参数
md5 -s <file path>
读取某个应用的default的内容,例如Reveal的
defaults read com.ittybittyapps.Reveal2
端口转发
tcprelay.py -t 22:2225
端口转发后登录越狱设备
ssh root@localhost -p 2225
删除当前文件夹下所有的png图片
find . -name "*.png" | xargs -I {} rm "{}"