git

1
2
3
4
5
6
7
8
9
10
11
12
13
14
git config --global user.name "Your Name"
# 不设置 email
git config --global user.email '<>'
# 支持中文路径和文件名
git config --global core.quotepath false
# 编辑器设为 vi
git config --global core.editor "vi"
# 查看设置
git config --list
git config --global core.autocrlf false
# 提交简写
git config --global alias.ac '!git add -A && git commit -m'
# HTTP 代理
git config --global http.proxy http://127.0.0.1:17890

1 基础 初级教程、 命令总结文档、Pro Git 2nd、Pro Git 2nd(网页版) 1. git 特点分布式,不必联网。建议文本 UTF-8 编码 2. 安装 linux上 apt-get 或者 源码, windows版本 3. 设置全局的用户名和邮箱,设置代理,初始化 4. git pull 默认取所有分支,–all 取所有 remote。git push 默认当前分支,–all 所有分支 5. 代理,只用 ssh 协议。参考 1.1 图形工具 参考 best-three-way-merge-tool,使用 p4merge 和 meld 受限于网速时可用 vimdiff - 一些按键 - 关于 merge 的按键 1.2 查看修改和历史 - git diff 比较的是工作区与暂存区的差异,git diff HEAD -- readme.txt 用来 ...

阅读更多

Kopia

1
2
3
4
5
# 命令的前部分从 GUI 里面复制
XXX\kopia.exe --config-file=XXX\repositories\repository.config policy set --global --before-snapshot-root-action "powershell D:\soft\KopiaUI\before.ps1"
XXX\kopia.exe --config-file=XXX\repositories\repository.config policy set --global --after-snapshot-root-action "powershell D:\soft\KopiaUI\after.ps1"
# 要清空配置传空字符串 ""
XXX\kopia.exe --config-file=XXX\repositories\repository.config policy set --global --after-snapshot-root-action ""

1 Kopia - KopiaUI 程序所在目录新建 repositories,实现 portable、更详细的描述 - VSS - 先在 repository.config 中 enableActions 改为 true,然后用命令配置全局 profile(因为 gui 目前有 bug) - 管理员 powershell,Set-ExecutionPolicy Unrestricted - 修改 ps1 关联,用 powershell 运行 - before 脚本里有调试信息,放开后可用来确认脚本执行和备份路径 - 查看和删除 vss,防止 after 脚本没执行,vssadmin list shadows,vssadmin delete shadows - 常用命令(软件的路径区分大小写,尽管 Windows 不区分) ...

阅读更多

blog

1
2
3
4
5
6
7
8
9
10
11
12
npm install hexo
npx hexo init blog
cd blog
npm i hexo-theme-icarus hexo-generator-sitemap hexo-relative-link hexo-mermaid-lastest hexo-filename-title
# 要在 config 中添加配置
npm i hexo-auto-category hexo-feed hexo-extract-excerpt hexo-deployer-git
# source 目录下,关联笔记
mklink /J _posts D:\Documents\Dropbox\notes\blog

# 还有一个 footnote 插件从 hexo-theme-fluid 移植过来
# 还有 add_assets_url.js 添加下载图标
# 所有插件可通过 hexo --debug 选项看到

1 部署 1. 安装 git、node.js,参考 hexo 官网,windows、linux 有区别。git 设置 sock5 代理,见 git 2. github 创建 username.github.io 仓库,实测要用官方的流程设置一下主题才能开通。添加 ssh 密钥 3. 安装 hexo 、主题、插件,主题可根据star 排名来选择 1.1 Google 收录 - 先创建 Google Analytics,添加 tracking_id 到主题配置文件,注意广告拦截和浏览器拦截 - 再创建 Google Search Console,用 Google Analytics 验证所有权 - 在 Google Analytics 选择媒体资源,Search Console 关联,进行两个产品的关联 - 在 Search Console 中提交站点地图 sitemap.xml ...

阅读更多