Skip to content

Instantly share code, notes, and snippets.

@kang000feng
kang000feng / alternative.yaml
Created February 2, 2023 14:01 — forked from yxjxx/alternative.yaml
Rime中文输入状态下也使用英文标点
###中文输入法下也使用英文标点2013/8/14 yxj
###有些用戶習慣在中文裏使用ASCII標點,那麼與其一個一個覆寫,不如 整套都換掉 。
###取得這份設定檔—— Rime 別樣設定,使用西文標點(一个gist:https://gist.github.com/lotem/2334409) 在用戶資料夾保存爲 alternative.yaml ;
###再將輸入方案中的「導入 default 設定」通過打 patch 替換爲「導入 alternative 設定」
###刚刚遇到一个问题,因为教程里面说需要这前两行,所以就直接粘贴了,但是发现模糊音失效了,找到原因是[只能有一个patch:,因为上面已经有了,所以就下面就不要了,注意缩进,两个英文空格]
###又加入了一行代码['key_binder/import_preset': alternative]作用是让[ ]可以翻页,如果一开始就用 [ 上翻页的会连高亮的字加[都一起上屏「比如你好[ 」就会这样了,哈哈
###patch:
##'punctuator/import_preset': alternative
##'key_binder/import_preset': alternative
######
@kang000feng
kang000feng / netflix_aws_ipset_create.py
Created October 7, 2019 17:44
build a bash script to gather ip range for netflix and aws and route them through redsocks port 12345
import requests
import json
netflix_url = 'https://api.bgpview.io/asn/2906/prefixes'
aws_url = 'https://ip-ranges.amazonaws.com/ip-ranges.json'
netflix_data = json.loads(requests.get(netflix_url).content)
aws_data = json.loads(requests.get(aws_url).content)
@kang000feng
kang000feng / script.sh
Created August 8, 2017 17:11 — forked from codexss/debian install rinetd-lkl shadowsocks-libev.sh
debian install rinetd-lkl shadowsocks-libev
echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
apt update
apt install shadowsocks-libev curl -y
cat > /etc/shadowsocks-libev/config.json <<EOF
{
"server":"0.0.0.0",
"server_port":443,
"local_port":1080,
"password":"foobar!",
@kang000feng
kang000feng / Debian_Ubuntu_Raspberry_ Pi_OpenVPN_MysteriumNetwork
Created August 2, 2017 10:35 — forked from anonymous/Debian_Ubuntu_Raspberry_ Pi_OpenVPN_MysteriumNetwork
Debian 8 && Ubuntu 14.04 && Raspberry Pi 2/3 及更高版本源码编译安装 OpenVPN 和 Mysterium Network(密链网络)
Debian 8 && Ubuntu 14.04 && Raspberry Pi 2/3 及更高版本源码编译安装 OpenVPN 和 Mysterium Network(密链网络)
OpenVPN 部分适用于服务器端和客户端,也适用于 Raspberry Pi 2/3,如果提权麻烦可以切换成 root
首先更新系统并安装依赖包:
$ sudo apt-get update
$ sudo apt-get install autoconf automake libtool libssl-dev liblz4-dev liblz4-tool liblzo2- dev libpam0g-dev
@kang000feng
kang000feng / manually-repair-system-bootloader-on-legacy-mbr.md
Created April 5, 2017 02:26 — forked from muink/manually-repair-system-bootloader-on-legacy-mbr.md
换ssd无损迁移windows系统(传统引导方式,非uefi)

换ssd无损迁移windows系统(传统引导方式,非uefi)

  1. 将ssd挂上现有电脑系统
  2. 把ssd用mbr方式分区
  3. 创建第一个100M-200M的ntfs主分区, 并将其设置为活动分区, 作为引导分区放置引导文件
  4. 创建第二个ntfs主分区作为系统分区放置系统文件
  5. 可选的其他分区
  • 并不建议分过多分区, 尤其是逻辑分区, 一般1-3个主分区足矣
  1. 在PE或其他电脑使用fastcopy-m进行分区对分区的同步, 将原有c盘文件同步到ssd系统分区
  • 此工具可以完全复制文件/文件夹的时间和其他属性,勾选复制访问控制列表可以连带复制权限
@kang000feng
kang000feng / surge.conf
Created July 10, 2016 17:29
📦 Surge 安装步骤导览 | http://bit.ly/292EJz3
# 规则配置仅供参考,适用于 Surge iOS & Mac;
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计
# 屏蔽部分运营商劫持网页弹出流量统计
# 部分特性可能仅适用于最新的 TestFlight 版本
# 完整参数说明 zhHans.conf.ini http://bit.ly/29kwXlZ
[General]
# warning, notify, info, verbose
loglevel = notify
bypass-system = 1
@kang000feng
kang000feng / zhHans.conf.ini
Created July 10, 2016 16:46 — forked from Blankwonder/zhHans.conf.ini
surge conf 配置详细说明
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)
@kang000feng
kang000feng / xdown.sh
Last active June 3, 2016 02:51 — forked from 4ft35t/xdown.sh
用 aria2 多源下载 Download file use ISP's cache server for more speed.
#!/bin/bash
[ $# -eq 0 ] && echo "see aria2c -h" && exit
url=""
cdn='
120.52.73.2
120.52.73.4
120.52.73.6
120.52.73.7
120.52.73.10
@kang000feng
kang000feng / modernIE-downloader.sh
Created June 1, 2016 13:25 — forked from jedihe/modernIE-downloader.sh
Download all VirtualBox VMs from modern IE, for use on a Linux host.
#!/bin/bash
### IE7 - Vista
mkdir -p ~/modernIE-vms/ie7vista
cd ~/modernIE-vms/ie7vista
wget http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/Linux/IE7_Vista/IE7.Vista.For.LinuxVirtualBox.part1.sfx
wget http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/Linux/IE7_Vista/IE7.Vista.For.LinuxVirtualBox.part2.rar
wget http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/Linux/IE7_Vista/IE7.Vista.For.LinuxVirtualBox.part3.rar
wget http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/Linux/IE7_Vista/IE7.Vista.For.LinuxVirtualBox.part4.rar
wget http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/Linux/IE7_Vista/IE7.Vista.For.LinuxVirtualBox.part5.rar
@kang000feng
kang000feng / sysctl.conf
Created May 30, 2016 09:35 — forked from chenshaoju/sysctl.conf
sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additonal system variables
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3