Skip to content

Instantly share code, notes, and snippets.

View liuliangsir's full-sized avatar
💻
Coding

流浪大法师 liuliangsir

💻
Coding
View GitHub Profile
@liuliangsir
liuliangsir / git_submodules.md
Created May 6, 2022 03:23 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@liuliangsir
liuliangsir / introrx.md
Created April 15, 2022 05:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@liuliangsir
liuliangsir / auto-tag.sh
Last active May 23, 2022 12:04
auto name tag with a specified rule
#!/usr/bin/env bash
f() {
# 获取当前仓库最新的状态,避免本地 tag 列表不是最新的
# https://stackoverflow.com/questions/8943693/can-git-operate-in-silent-mode
# https://stackoverflow.com/questions/1204190/does-git-fetch-tags-include-git-fetch
# https://stackoverflow.com/questions/16678072/can-we-set-a-git-default-to-fetch-all-tags-during-a-remote-pull
git fetch --tags --prune --prune-tags --quiet
local latestTag
@liuliangsir
liuliangsir / html-languages.txt
Created January 19, 2022 12:37 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@liuliangsir
liuliangsir / foobar.md
Created January 14, 2022 04:30 — forked from t32k/foobar.md
foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud
@liuliangsir
liuliangsir / git-aliases.md
Created January 5, 2022 05:56 — forked from mwhite/git-aliases.md
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@liuliangsir
liuliangsir / puppeteer-ubuntu-1804.md
Created November 8, 2021 11:24 — forked from winuxue/puppeteer-ubuntu-1804.md
Solution for common dependences issues using puppeteer in ubuntu 18.04 (Bionic)

puppeteer dependeces in ubuntu 18.04 (Bionic)

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

sudo apt-get install libnss3

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libxss1
@liuliangsir
liuliangsir / gist:dfa4e75bd0f95ae4e77ff2f88cfd0631
Created November 8, 2021 10:56 — forked from yano3/gist:1378948
git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
@liuliangsir
liuliangsir / esm-package.md
Created October 12, 2021 06:23 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
POST /jiulku/api/index.php/order/add_vote_item_poll HTTP/1.1
Host: api.173zb.com
Connection: keep-alive
Content-Length: 287
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat
WX-APP-ID: com.jiulku.yizhimao.tppx
content-type: application/x-www-form-urlencoded
Referer: https://servicewechat.com/wx66d2d0c3032fff93/68/page-frame.html
Accept-Encoding: gzip, deflate, br
Pragma: no-cache