Skip to content

Instantly share code, notes, and snippets.

View tankywoo's full-sized avatar

Tanky Woo tankywoo

View GitHub Profile
@tankywoo
tankywoo / curl.md
Created March 7, 2018 06:07 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@tankywoo
tankywoo / polyfills.js.patch
Created November 25, 2020 03:06
Fix gitbook-cli graceful-fs/polyfills.js cb.apply is not a function problem
As gitbook-cli is no longer maintained, there is a bug for its required library.
> /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287
> if (cb) cb.apply(this, arguments)
> ^
> TypeError: cb.apply is not a function
> at /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
For MacOS, the patch file is:
/usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js
ref:
- https://stackoverflow.com/a/64211387/1276501