Skip to content

Instantly share code, notes, and snippets.

View wenxingxing's full-sized avatar
:fishsticks:

wenxing wenxingxing

:fishsticks:
View GitHub Profile
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@silvasur
silvasur / hide-wikipedia-donation-nagscreen.user.js
Last active December 12, 2023 04:51
Userscript to hide Wikipedia donation nagscreen
// ==UserScript==
// @name Hide wikipedia donation nagscreen
// @description Wikimedia, I already give you money, leave me alone!
// @version 3
// @grant GM.setValue
// @grant GM.getValue
// @match https://*.wikipedia.org/*
// ==/UserScript==
(async function() {
@libChan
libChan / wsl_clash_proxy.sh
Last active November 9, 2024 11:40
WSL2使用clash for windows代理
# WSL通过Win访问网络,所以WSL的网关指向的是Windows,DNS服务器指向的也是Windows,设置WSL的proxy为win的代理ip+端口即可
# WSL中的DNS server在/etc/resolv.conf中查看,该文件是由/etc/wsl.conf自动生成的。
# 如果关闭了wsl.conf中自动生成resolve.conf并自行修改了resolve.conf,DNS nameserver并不是本机win ip
# 需要开启wsl.conf的自动生成,再运行以下命令
# https://zhuanlan.zhihu.com/p/153124468
# 添加到环境变量设置中,例如~/.zshrc
export hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
export https_proxy="http://${hostip}:7890"
export http_proxy="http://${hostip}:7890"