Skip to content

Instantly share code, notes, and snippets.


xiaolai xiaolai

View GitHub Profile
xiaolai /
Created Mar 29, 2020
Download Coursera Material
xiaolai /
Created Mar 16, 2020
homebrew upstream repo for China
# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin

# 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin

# 替换homebrew-bottles:
View Personal
  1. Download and pin books at, and use epubor KCR converter to convert them into epubs.
  2. Download audio books at, with aax format.
  3. Obtain your activation bytes with the instruction of this post.
  4. Install ffmpeg with brew.
  5. Install audible-converter with npm. (File name will be extended automatically)
audible-converter "*.aax" -a <your-activation-bytes>
  1. Install atomicparsley with brew. (to add artwork to converted m4a files) Bash script to add artworks to m4a files:
xiaolai / gist:2ffe003b05eb3a2f7ba933858d353d7d
Created Feb 6, 2020
search and replace all mal-rendered emphasized text in github markdown
View gist:2ffe003b05eb3a2f7ba933858d353d7d
search regex:
# replace with (attention: there's a white space at the end)
xiaolai / Style.css
Created Apr 13, 2019
vscode markdown github preview custom style
View Style.css
.vscode-body .markdown-body {
font-family: "PingFang SC"
.vscode-body strong {color:#6392BF;}
.vscode-body em {color: #A9312A; font-style: normal !important;}
.vscode-body table {font-size: 95% !important;}
.vscode-body .CodeMirror, .vscode-body pre {font-size: 90%;}
.vscode-body pre {
xiaolai /
Last active Jun 7, 2020
Run Jupterlab as an desktop app

How to run Jupyterlab as a desktop app on Mac OSX

Tiered of opening terminal to launch Jupyterlab, and having to leave it opened all the time? Try to run Jupyterlab as a desktop app:


One of a benefits is avoiding the annoying accident: "closed Jupyterlab when quitting the browser".

1. Install Anaconda for mac

Run in Terminal

View gist:cef9c92caa9c252fe6aaa3f43cecb102
# install anaconda
jupyter-lab --generate-config
edit ~/.jupyter/, add lines:
c.NotebookApp.token = '' #you can set password here.
npm install nativefier -g
nativefier "http://localhost:8888"
You can’t perform that action at this time.