Skip to content

Instantly share code, notes, and snippets.

View liuliangsir's full-sized avatar
💻
Coding

流浪大法师 liuliangsir

💻
Coding
View GitHub Profile
@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 / 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 / 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 / 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 / introrx.md
Created April 15, 2022 05:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@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 / README.md
Created August 30, 2022 08:28 — forked from surma/README.md
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@liuliangsir
liuliangsir / README.md
Created August 30, 2022 08:28 — forked from surma/README.md
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@liuliangsir
liuliangsir / wasm_tools_install.sh
Created October 18, 2022 23:08 — forked from miguelmota/wasm_tools_install.sh
macOS install WebAssembly (WASM) tools (wasm-objdump)
git clone --recursive https://github.com/WebAssembly/wabt
cd wabt
make
make clang-debug
make gcc-i686-release
make clang-debug-lsan
make gcc-debug-no-re2c
chmod +x bin/
@liuliangsir
liuliangsir / npm-beta-publish.md
Created November 21, 2022 08:25 — forked from adcreare/npm-beta-publish.md
npm publish a beta package

Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc

  1. Ensure any compile is run npm run dist etc
  2. Modify version in package.json to the following format (match with existing verion numbers etc) "version": "0.1.120-beta.1" where beta.x is the number of those betas
  3. Publish to npm npm publish --tag beta

There are two options for install:

  • Always install beta with npm install packagename@beta
  • Install specific version with npm install [email protected]