markdown Markdown备忘单

Markdown Cheat Sheet.md
[//]: # (Insert Image)

_Figure 1: Sample Image_
![alt text](img/sample-image.png "Sample Image")


# Headers

```
# H1
## H2
### H3
#### H4
##### H5
###### H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1
======

Alt-H2
------
```

# H1
## H2
### H3
#### H4
##### H5
###### H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1
======

Alt-H2
------

markdown Git删除我们的所有提交历史记录

repo-reset.md
### First Method

Deleting the `.git` folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

```
# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A

# Commit the changes:
git commit -am "Initial commit"

# Delete the old branch:
git branch -D master

# Rename the temporary branch to master:
git branch -m master

# Finally, force update to our repository:
git push -f origin master
```

This will not keep our old commits history around. **But if this doesn't work, try the next method below.**

### Second Method

```
# Clone the project, e.g. `myproject` is my project repository:
git clone https://github/heiswayi/myproject.git

# Since all of the commits history are in the `.git` folder, we have to remove it:
cd myproject

# And delete the `.git` folder:
git rm -rf .git

# Now, re-initialize the repository:
git init
git remote add origin https://github.com/heiswayi/myproject.git
git remote -v

# Add all the files and commit the changes:
git add --all
git commit -am "Initial commit"

# Force push update to the master branch of our project repository:
git push -f origin master
```
**NOTE:** You might need to provide the credentials for your GitHub account.

copy from: https://gist.github.com/heiswayi/350e2afda8cece810c0f6116dadbe651

markdown GPU的计算能力

.markdown
 compute capability for your GPU, then check the tables:
 
https://developer.nvidia.com/cuda-gpus#compute

markdown 蝙蝠脚本后台开机启动

.md
编写vbs脚本

```
Set ws = WScript.CreateObject("WScript.Shell")
ws.run "connect_me.bat", 0
```

Win+R 运行`shell:startup`,创建vbs脚本快捷方式并复制到启动文件夹

markdown 代办事项

A.md
# 代办事项
laravelValidator.md
# laravel校验封装

两个类,一个实现数组查找,一个实现校验检测


```
    protected $validatorArray = [
        'park_car_json' => [
            'count' => ['每用户自助入车台数', 'required|integer|min:1'],
            'leave_lock' => ['出车缴费按钮后的计费时长锁定有效时间', 'required|integer|min:1']
        ],
    ];
```

markdown Git差异

diff
Diff current changes   
`git diff > path/to/patch.diff`   

Diff staged changes   
`git diff --staged > path/to/patch.diff`

Diff between commits
`git diff 9be7981d1a9d5d58d3e4395af678df2691d17717...97b5e18fc913fade852b9e128528b01dd6116075 > path/to/patch.diff` 

Apply diff   
`git apply  path/to/patch.diff`

markdown 灯塔报道

lighthouse-report.md
# PerfReviews

- Lighthouse Report: https://perf.reviews/tools/1.1-Lighthouse-Report/
- Repo: https://github.com/PerfReviews/PerfTools/tree/master/Lighthouse-Report

markdown Pupeteer录音机

pupeteer-recorder.md
Chrome extension: https://chrome.google.com/webstore/detail/puppeteer-recorder/djeegiggegleadkkbgopoonhjimgehda?hl=en

markdown 用Master覆盖某个分支

资料来源:https://stackoverflow.com/questions/25561379/how-to-overwrite-a-certain-branch-with-master

terminal.md
`git push origin master:otherbranch`

markdown 检查模型结构

model_structure_checker.md
Online tool to check model structures: 
https://lutzroeder.github.io/netron/