Skip to content

Instantly share code, notes, and snippets.

Jimmy-Xu / tun2socks_proxy_foo.bash
Created Mar 21, 2020 — forked from rsanden/tun2socks_proxy_foo.bash
tun2socks TCP+UDP user-wide proxy through shadowsocks and udpgw
View tun2socks_proxy_foo.bash
#--- Build tun2socks and udpgw (as the user who will use the proxy) ---
mkdir -p $HOME/src
cd $HOME/src
git clone ""
cd badvpn
mkdir -p build
cd build
export OUTDIR=$PWD
export SRCDIR=$(dirname $PWD)
View Set-ScreenResolution.ps1
param (
Position = 0)]
Position = 1)]
Jimmy-Xu / right_key_run_cmd.reg
Created Sep 13, 2021 — forked from aqzlpm11/right_key_run_cmd.reg
View right_key_run_cmd.reg
Windows Registry Editor Version 5.00
@="Open command window here as Administrator"
@="cmd.exe /s /k pushd \"%V\""
View reset-terminal-services.ps1
## This Script is intended to be used for Querying remaining time and resetting Terminal Server (RDS) Grace Licensing Period to Default 120 Days.
## Developed by Prakash Kumar ( May 28th 2016
## Disclaimer: Please test this script in your test environment before executing on any production server.
## Author will not be responsible for any misuse/damage caused by using it.
$ErrorActionPreference = "SilentlyContinue"
## Display current Status of remaining days from Grace period.
Jimmy-Xu /
Last active Apr 30, 2021

shadowsocks + privoxy/tsocks

  • shadowsocks: service, socks proxy
  • privoxy: service, convert socks proxy to http proxy
  • tsocks: tool, use socks proxy for any command line


tested under ubuntu14.04

Jimmy-Xu / gist:0712b073c767f300acd73e78c870f378
Created Nov 23, 2020 — forked from chrisdone/gist:02e165a0004be33734ac2334f215380e
Build and run minimal Linux / Busybox systems in Qemu
View gist:0712b073c767f300acd73e78c870f378


export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

Jimmy-Xu /
Created Jan 20, 2016
go get支持显示进度条

修改 $GOROOT/src/cmd/go/vcs.go,作如下修改

// vcsGit describes how to use Git.
var vcsGit = &vcsCmd{
        name: "Git",
        cmd:  "git",

        createCmd:   []string{"clone --progress {repo} {dir}", "--git-dir={dir}/.git submodule update --init --recursive"},
        downloadCmd: []string{"pull --ff-only", "submodule update --init --recursive"},
Jimmy-Xu / sslocal
Created Feb 4, 2016
View sslocal
set -e
# Provides: sslocal
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
Jimmy-Xu / logrus_hooks.go
Created May 22, 2019 — forked from miguelmota/logrus_hooks.go
Golang Logrus show filename and line number
View logrus_hooks.go
package logger
import (