0 缘起

之前看代码都是非常少的, 所以基本就用 IDE 啦, 还能调试, 后来接触 Android, 源码量太大了, 导入 IDE 去看太慢了.. 然后开始搜神器, 就有了 Source Insight, Understand.. 说不出来哪不好, 反正就是不爽, 最后觉得还是 OpenGrok 好用.. 那就动手搭建一个吧, 官方文档: https://github.com/oracle/opengrok/wiki/How-to-setup-OpenGrok

1 搭环境

首先, 我在 Win10 和 CentOS7.6 上都试验成功了, 但是个人建议看有关 Linux 的代码还是用 Linux 比较好, 在后面下源码的时候会说为啥, 但是鉴于 Windows 用得比较多 (我就是..), 所以整理了两份文档, 废话不多说, 开始..

Read more »

CentOS 常用软件的安装与配置

1 卸载软件

1
2
3
4
# 先列出要卸载的项
yum list installed | grep gcc
# 再逐个卸载
yum -y remove libgcc.x86_64

2 GCC

升级或安装 gcc 流程

1
2
3
4
5
6
7
8
9
wget https://mirrors.ustc.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
tar -xf gcc-7.3.0.tar.gz
cd gcc-7.3.0
./contrib/download_prerequisites
mkdir gcc-build-7.3.0
cd gcc-build-7.3.0
../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
# 时间可能很长 耐心等待就好
make && make install
Read more »

嗯,比较懒,贴两个链接留作纪念:

PicGo + GitHub 搭建个人图床工具:https://blog.csdn.net/yefcion/article/details/88412025

PicGo + Gitee + Typora: https://www.cnblogs.com/qtzd/p/12554902.html 图床,图个锤子,还是本地的最好

PicGo: https://github.com/Molunerfinn/PicGo

滥用 VPN 会导致 DNS 污染,从而利用 github 上传的图床都显示不出来了,需要解决一下,

https://www.ioiox.com/archives/62.html

通过 https://www.ipaddress.com/ 或 http://ping.chinaz.com/ 查询 raw.githubusercontent.com 的真实 ip 地址

再将以下内容保存到 hosts 文件 (Win:C:\Windows\System32\drivers\etc\hosts) 中

<ip地址> raw.githubusercontent.com

1 Hexo 的语法

参考官网给的:

https://hexo.io/docs/front-matter

https://hexo.io/docs/tag-plugins

做好笔记,以便之后寻找方便...

1.1 文章的 meta

就是这么个东西

Read more »

1 Getting Started

首先跟着 hexo 官方文档走一遍:https://hexo.io/docs/

  1. 安装 git:https://hexo.io/docs/#Install-Git

  2. 安装 Node.js:https://hexo.io/docs/#Install-Node-js

  3. 安装 hexo

    1
    2
    # Win下 找个目录右键 Git Bash Here
    npm install -g hexo-cli
    Read more »

0 初始化

每台计算机只需配置一次,升级时会保留配置信息。

Git 自带一个 git config 的工具帮助设置控制 Git 外观和行为的配置变量,这些变量存在于三个不同的位置:

  • /etc/gitconfig:包含系统上每一个用户的及他们仓库的通用配置。如果带有--system选项的 git config 时,会从此文件读写变量
  • ~/.gitconfig~/.config/git/config:只针对当前用户。使用--global选项读写此文件
  • 当前仓库目录中的 config (.git/config):针对该仓库

每一级别覆盖上一级别

基本配置

1
2
3
4
5
6
7
8
9
10
11
12
# 配置用户名和邮箱
git config --global user.name "Sidney DING"
git config --global user.email "sidneyding183@gmail.com"
# 文本编辑器 根据喜好
git config --glonal core.editor vim
# 检查配置信息
git config --list
git config user.name
# 获取帮助
git help <verb>
git <verb> --help
man git-<verb>
Read more »