Skip to content

Instantly share code, notes, and snippets.

@shellexy
shellexy / ifw-inh-qqtim-services.xml
Created November 14, 2018 03:53
将这个文件放入 /data/system/ifw/ 即可抑制 qq、tim、淘宝、支付宝、美团、高德等国产 app 的多余后台服务 ,同时保持 tim 能收到消息
<rules>
<service block="true" log="false">
<component-filter name="tv.danmaku.bili/tv.danmaku.bili.update.UpdateService" />
<component-filter name="tv.danmaku.bili/com.xiaomi.push.service.XMPushService" />
<component-filter name="tv.danmaku.bili/com.xiaomi.mipush.sdk.PushMessageHandler" />
<component-filter name="tv.danmaku.bili/com.xiaomi.mipush.sdk.MessageHandleService" />
<component-filter name="tv.danmaku.bili/com.evernote.android.job.v14.PlatformAlarmService" />
<component-filter name="com.tencent.mobileqq/com.tencent.mobileqq.qipc.QIPCServiceEx" />
<component-filter name="com.tencent.mobileqq/com.tencent.pluginloader.proxy.DownloadProxyService" />
<component-filter name="com.tencent.mobileqq/com.tencent.proxyinner.plugin.loader.NowQTServiceProxy" />
@shellexy
shellexy / server.conf
Created July 25, 2015 13:00
这个 /etc/openvpn/server.conf 配置带了墙外地址路由,不影响国内网站
local 192.168.1.101 #这里替换成你的vps的IP#
port 10037 #相应的端口
proto udp
dev tun
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
ifconfig-pool-persist ipp.txt
@shellexy
shellexy / apt-pacman.sh
Last active November 10, 2022 11:00
在 msys2 bash 里用类似 apt 的命令代替直接用记不住参数用法的 pacman
#!/bin/bash
# fix the poorly designed pacman/pacman command
# 可以把本文保存在 /usr/local/bin/apt-pacman 并加上可执行权限
list()(
set -x
pacman -Sl "$@"
)
search()(
@shellexy
shellexy / wechat2txt.py
Created November 8, 2018 17:25
导出微信聊天记录为 txt
#!/usr/bin/python2.7
# -*- coding: UTF-8 -*-
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
'''导出微信聊天记录为 txt
@author: Shellexy Wang <shellexyone@gmail.com>
@license: LGPLv3+
@see:
'''
@shellexy
shellexy / cfddns_self_ip.sh
Last active May 16, 2021 04:45
利用 cloudflare dns 做 ddns
#!/bin/bash
## 利用 cloudflare dns 做 ddns
## 不再用 tp 路由器后,就要在手机或笔电服务器来检测自身公网 ip 了
## curl ifconfig 可以用来获取公网 ip
##
## 使用:
## 可以把本文件保存为 /home/您的用户/cfddns_self_ip.sh
## 然后执行 crontab -e
## 在出来的文件编辑里添加一行
## */5 * * * * bash /home/您的用户/cfddns_self_ip.sh
@shellexy
shellexy / glade2py.py
Created June 27, 2014 10:06
从 glade-2 界面文件生成 pygtk 代码,并使用 pygtkcompat 来支持 gtk3
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#@license: LGPL-3
"""由 glade 文件生成 python 源码
使用 i18n gettext 国际化
i18n.py 示例:
--
@shellexy
shellexy / vimrc
Created July 21, 2016 06:09
可能有用的 vimrc 片段
" 用 Alt+左右方向键 来切换多文件
map <silent><A-Right> :bn<CR>
map <silent><A-Left> :bp<CR>
"要在命令行上实现 Emacs 风格的编辑操作: >
" 至行首
cnoremap <C-A> <Home>
" 后退一个字符
cnoremap <C-B> <Left>
" 删除光标所在的字符
@shellexy
shellexy / gfwlist.privoxy.sh
Created February 27, 2019 07:57
让 privoxy 代理服务器使用 gfwlist 自动分流
#!/bin/bash -x
## 让 privoxy 代理服务器使用 gfwlist 自动分流
## 安装需要的包,gfwlist2privoxy 暂时只支持 py2.7 所以需要修改下::
# sudo apt install -y privoxy python-pip
# pip install --user gfwlist2privoxy
# sed -i 's,^#!/usr/bin/python.*,#!/usr/bin/python2.7,' ~/.local/bin/gfwlist2privoxy
## 修改 privoxy 配置,默认使用 8123 本地端口
grep -q gfwlist.action /etc/privoxy/config || echo 'actionsfile gfwlist.action' | sudo tee -a /etc/privoxy/config
if 64 - 64: i11iIiiIii
if 65 - 65: O0 / iIii1I11I1II1 % OoooooooOO - i1IIi
if 73 - 73: II111iiii
if 22 - 22: I1IiiI * Oo0Ooo / OoO0O00 . OoOoOO00 . o0oOOo0O0Ooo / I1ii11iIi11i
import os
if 48 - 48: oO0o / OOooOOo / I11i / Ii1I
if 48 - 48: iII111i % IiII + I1Ii111 / ooOoO0o * Ii1I
if 46 - 46: ooOoO0o * I11i - OoooooooOO
if 30 - 30: o0oOOo0O0Ooo - O0 % o0oOOo0O0Ooo - OoooooooOO * O0 * OoooooooOO
if 60 - 60: iIii1I11I1II1 / i1IIi * oO0o - I1ii11iIi11i + o0oOOo0O0Ooo
@shellexy
shellexy / .inputrc
Last active May 8, 2019 00:44
把这个文件保存为 ~/.inputrc 就能直接上下方向键搜索历史记录了。还能随时 cat ~/.inputrc 一下查看 shell 快捷键备忘
## history search
"\e[A": history-search-backward
"\e[B": history-search-forward
## visible ring
set visible-stats on
## menu complete
"\C-n": menu-complete
## 快捷键备忘
## Ctrl + a : 光标移到行首。