Github

Anh-Thi Dinh

View README.md localhost

1pip install grip # <https://github.com/joeyespo/grip>
2cd myrepo
3grip # Running on <http://localhost:6419/>
Update: grip support with limited times of usage, we can use VSCode markdown previwer instead, it’s builtin.

Clone with Personal Access Tokens (PAT)

Go to this link to generate a new PAT. Then using your PAT as a password.
1$ git clone <https://github.com/fakeuser/fake-repo.git>
2Username: <your_username>
3Password: <your_personal_access_token>

Clone via git@ (ssh)

☝️
Update: It's easier if we use Github CLI!
👉 More references: this and this.
1# Go to <https://github.com/settings/keys>
2# copy public key
3cat ~/.ssh/id_rsa.pub
1# clone some repo
2git clone git@github.com:dinhanhthi/dinhanhthi.com.git

Info

  • Commits to a fork don't appear in your contributions graph.
  • Commits to a generated from template can appear in your contributions graph.
  • Get size of a github repo: https://api.github.com/repos/<user>/<repo> then find property "size". The size is in KB.

Repo template

Add Shields tags

👉 Main shield site here.
👉 Example of usage:
my main github page.
1# scikit-learn badge
2<http://img.shields.io/badge/-Scikit%20Learn-efa300?style=flat-square&logo=scikit-learn&logoColor=fff>
3# ...<NAME>-<Background-Color>?style...&logo=<LOGO>&logoColor=<LOGO-COLOR>
  • Logo name can be found at simpleicon. If the name includes spaces, replace them with dashes (e.g: ?logo=visual-studio-code)
  • Wanna create a custom logo?
    • Change SVG to PNG if needed: use this site.
    • (Optional) Change logo's color to white: use this site.
    • Must resize the image to 14x14: use this site.
    • Convert to base64 file: use this site, then copy data:image/png;base64,iVB... and paste after &logo=

Troubleshooting