Skip to content

Instantly share code, notes, and snippets.

@wohugb
wohugb / node-pre-gyp.txt
Last active October 15, 2019 06:09
node-pre-gyp WARN Using request for node-pre-gyp https download
npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
或者
npm i canvas --build-from-source
@wohugb
wohugb / text
Last active August 15, 2019 02:54
rocketmq 订阅关系不一致
在不同的 客户端 中启动了多个 Consumer,并且给相同的 Group ID 配置了不同的 Topic,
或者是相同的 Topic 但 Tag 不同,最终导致订阅关系不一致,消息不符合预期。
尤其是用tag区分生产环境和产品端而忘了Group ID也要区分产品端和生产端
所以一定要对应:
1. Tag: development product
2. Group: GID-CONSUMER-development GID-CONSUMER-product
@wohugb
wohugb / gist:89391f01d3ab3ffca36b2d3aec3483da
Created August 6, 2019 09:19
npm install : npm err! cb() never called!
这个是因为开启的代理
而代理无法联网
关闭~/.npmrc 中的代理设置就可以了
#proxy=http://127.0.0.1:1086/
#https-proxy=http://127.0.0.1:1086
@wohugb
wohugb / gist:778166ac25372041360bde50e4447406
Created August 6, 2019 09:16
git pull origin master : fatal: Could not read from remote repository.
➜ api git:(master) git pull origin master
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方法:
您的ssh密钥很可能已从ssh代理中删除
@wohugb
wohugb / index.html
Last active April 5, 2022 02:36 — forked from Globik/index.html
Websocket multi room based on ws.js
<html>
<body>
<h4>websocket</h4>
<h5>Group: <span id="group">darwin</span></h5>
<!-- a hardoced group name -->
<button onclick="bjoin();">join group</button><br />
<input id="text" type="text" />
<span id="out"></span>
<script>
var group = document.getElementById("group").textContent;
@wohugb
wohugb / convert_markdown_inline_link_to_reference_footnote.py
Last active February 5, 2018 03:25
将Markdown行内式链接转为文末参考式链接
@wohugb
wohugb / rst_to_md.sh
Created January 26, 2018 13:35 — forked from zaiste/rst_to_md.sh
Convert RST to Markdown using Pandoc
FILES=*.rst
for f in $FILES
do
filename="${f%.*}"
echo "Converting $f to $filename.md"
`pandoc $f -f rst -t markdown -o $filename.md`
done
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@wohugb
wohugb / tmux-cheatsheet.md
Created June 15, 2017 06:25
Tmux 快捷键 & 速查表

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

tmux at [-t 会话名]
@wohugb
wohugb / sample-nginx.conf
Created May 3, 2017 08:19 — forked from cjus/sample-nginx.conf
AngularJS Nginx and html5Mode
server {
server_name yoursite.com;
root /usr/share/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}