Skip to content

Instantly share code, notes, and snippets.

View vanquang9387's full-sized avatar

Quang Ngo vanquang9387

View GitHub Profile
@vanquang9387
vanquang9387 / japanese-font-family.md
Created March 16, 2017 01:48
Japanese default css font family

Most Japanese websites use default font sets provided on Windows or Mac. The latest ones are Meiryo and Hiragino Kaku Gothic Pro. For older versions such like Windows XP, it is good to add former default fonts MS Gothic(or MS Mincho)/Osaka.

Some old browsers could not understand those font names in English, some others do not recognize the names in Japanese, so it is safe to write both in Japanese and English.

Meiryo and Hiragino's order is, because Mac users may have Meiryo from MS-Office, and Hiragino is more familiar and matching well on Mac, better by starting Hiragino series.

So the current recommended practice is like this,

font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
@vanquang9387
vanquang9387 / git-log.md
Last active October 6, 2016 08:07
Export git log by author and date range
$ git log --author="Quang Ngo" --numstat --after="2016-06-01" --pretty=tformat: > log.txt

Export git log by author and date range with format <additions> <deletions> <file>

Sample output:

29 7 file1.txt
@vanquang9387
vanquang9387 / git-export.md
Last active July 29, 2024 14:19
git: export diff files between 2 branches/commits

We can get list of changed files between 2 branches/commits by

$ tar --ignore-failed-read -vczf archive.tgz $(git diff --name-only --diff-filter=ACMRT master develop)

Let's see important part:

  1. git diff master develop:
    Get differences between master and develop branches.