Skip to content

Instantly share code, notes, and snippets.

View banyudu's full-sized avatar
🎯
Focusing

Yudu banyudu

🎯
Focusing
View GitHub Profile
@banyudu
banyudu / .npmrc
Last active February 6, 2024 12:03
.npmrc for China users
sass_binary_site=https://cdn.npmmirror.com/binaries/node-sass
disturl=https://registry.npmmirror.com/dist
profiler_binary_host_mirror=https://cdn.npmmirror.com/binaries/node-inspector/
fse_binary_host_mirror=https://cdn.npmmirror.com/binaries/fsevents/
phantomjs_cdnurl=https://cdn.npmmirror.com/binaries/phantomjs/
electron_mirror=https://cdn.npmmirror.com/binaries/electron/
chromedriver_cdnurl=https://cdn.npmmirror.com/binaries/chromedriver
operadriver_cdnurl=https://cdn.npmmirror.com/binaries/operadriver
selenium_cdnurl=https://cdn.npmmirror.com/binaries/selenium
node_inspector_cdnurl=https://cdn.npmmirror.com/binaries/node-inspector
@kcak11
kcak11 / 0000.md
Last active February 20, 2024 16:35
AES/CBC/PKCS5PADDING - Java/Javascript (Encryption & Decryption)

AES/CBC/PKCS5PADDING - Java/Javascript (Encryption & Decryption)

@kentcdodds
kentcdodds / README.md
Last active March 30, 2024 11:39
user-package-stats

user-package-stats

I was poking around trying to figure out all the packages I have access to publish and got curious. So I write this little script to determine the download stats for all the packages I have publish access to.

Feel free to try it yourself. Just change the username passed to getUserDownloadStats.

By default, the stats are sorted by their average daily downloads (descending). That should give you an idea of the most "popular" package of a given user relative to how long that package has been around.

You can use it with npx like so:

@banyudu
banyudu / svg2ico.sh
Last active March 8, 2020 13:08 — forked from azam/svg2ico.sh
Convert SVG to ICO using ImageMagick, with transparent background and multi-size icons
srcfile=$1
dstfile=$(basename $srcfile .svg).ico
convert -density 256x256 -background transparent $srcfile -define icon:auto-resize -colors 256 $dstfile
@banyudu
banyudu / README.md
Created February 17, 2020 13:36 — forked from chuyik/README.md
macOS 给 Git(Github) 设置代理(HTTP/SSH)
@Tynael
Tynael / README.md
Last active January 22, 2024 01:06
How to use npx to run gist based scripts
@adolli
adolli / 如何使用python3逃逸沙箱,获得进程上下文权限提升.md
Last active April 30, 2024 13:07
如何使用python3逃逸沙箱,获得进程上下文权限提升

如何使用python3逃逸沙箱,获得进程上下文权限提升

最近突发奇想,想对所掌握的python知识进行总结一下,目前其实还停留在python层面如何使用,还没有深入到虚拟机部分,如果下面有哪些错误,欢迎指出。

背景

OJ(Online judge, 在线编程测评提交代码到后台运行检查)网站一般都允许各种各样的代码提交,其中很有可能包含python3,于是决定尝试通过python3的代码执行,进行沙箱逃逸,以及绕过各种限制。

我随便找了一个OJ网站,这个站点的python3有如下限制

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 5, 2024 02:28
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@wayou
wayou / .npmrc
Last active August 28, 2021 08:20
配置 npm 及相关资源访问国内镜像的 npmrc
# package-lock=false
registry="https://registry.npm.taobao.org"
disturl="https://npm.taobao.org/dist"
nvm_nodejs_org_mirror="http://npm.taobao.org/mirrors/node"
nodejs_org_mirror="http://npm.taobao.org/mirrors/node"
sass_binary_site="http://npm.taobao.org/mirrors/node-sass"
electron_mirror="http://npm.taobao.org/mirrors/electron/"
SQLITE3_BINARY_SITE="http://npm.taobao.org/mirrors/sqlite3"
profiler_binary_host_mirror="http://npm.taobao.org/mirrors/node-inspector/"
node_inspector_cdnurl="https://npm.taobao.org/mirrors/node-inspector"
@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.