包含标签 终端 的文章

快速配置zsh

比较水的 Personal Notes 查看你的系统有几种shell cat /etc/shells 显示 /bin/bash /bin/csh /bin/ksh /bin/sh /bin/tcsh /bin/zsh 安装 oh my zsh git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 重新打开终端,输入 zsh 即可切换终端,并且发现 oh my zsh 已经帮我们配置好 zsh 了 修改主题 open ~/.zshrc 修改 ZSH_THEME=”robbyrussell”,主题在 ~/.oh-my-zsh/themes 目录下。 修改为 ZSH_THEME="kolo" 可以参照这里进行选择. 设置为默认she……

阅读全文

前言 最近在喵神 onevcat 的直播中发现喵神直接在终端就能用 vsCode 打开当前代码目录,非常方便。 在zsh终端中 使用 code .,在 vcCode 打开当前文件目录 正文 配置终端环境 终端环境为:iTerm2 + zsh zsh 使用 oh_my_zsh 配置 安装zsh 查看你的系统有几种shell cat /etc/shells 显示 /bin/bash /bin/csh /bin/ksh /bin/sh /bin/tcsh /bin/zsh 安装 oh my zsh git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 重新打开终端,输入 zsh……

阅读全文

Mac 文件的隐藏与显示

让 Finder 显示隐藏文件和文件夹 基本 显示 $ defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder 隐藏 $ defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder 进阶 创建终端快捷命令 在 zsh shell 下,创建快捷命令 创建显示命令 fd (fileDisplay) $ echo "alias fd='defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder'">> ~/.zshrc && source ~/.zshrc 创建隐藏命令 fh(fileHide) $ echo "alias fd='defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder'">> ~/.zshrc && source ~/.zshrc 使用方法 显示隐藏文件 $……

阅读全文

使用 .gitignore 忽略 Git 仓库中的文件

使用 .gitignore 文件忽略指定文件 .gitignore 在Git中,很多时候你只想将代码提交到仓库,而不是将当前文件目录下的文件全部提交到Git仓库中,例如在MacOS系统下面的.DS_Store文件,或者是Xocde的操作记录,又或者是pod库的中一大串的源代码。这种情况下使用.gitignore就能够在Gi……

阅读全文

Git 代码回滚

并不适合阅读的个人文档。 git revert 和 git reset 的区别 先看图: sourceTree 中 revert 译为**提交回滚**,作用为忽略你指定的版本,然后提交一个新的版本。新的版本中已近删除了你所指定的版本。 reset 为 重置到这次提交,将内容重置到指定的版本。git reset 命令后面是需要加2种参数的:–-hard 和 –-soft。这条命令默认情……

阅读全文

Git指令整理

随便整理的一些自用的Git指令 GitHub创建仓库提示代码 echo "# 项目名" >> README.md git init git add README.md git commit -m "first commit" git remote add origin git@github.com:qiubaiying/项目名.git git push -u origin master 若仓库存在直接push git remote add origin git@github.com:qiubaiying/test.git git push -u origin master 常用操作 创建仓库(初始化) 在当前指定目录下创建 git init……

阅读全文

Mac 文本转音频

文本转语音 分享一条在Mac上将一个文本转换为音频文件的终端命令,个人认为还是蛮实用的。 来自: http://25.io/toau/ 指令: cat sample.txt | say -o sample.aiff……

阅读全文