Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Justin cattyhouse

💭
I may be slow to respond.
  • N/A
  • Jupiter
Block or report user

Report or block cattyhouse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View meson-gxl-s905d-phicomm-n1.dts
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2018 He Yangxuan
*/
/dts-v1/;
#include "meson-gxl-s905d-p230.dts"
/ {
View PotatsoAdblockConfig.conf
ruleSets:
- name: Potatso Adblock Config
rules:
# Some services are available locally
- DOMAIN-MATCH,aka,Proxy
- DOMAIN-SUFFIX,edu.cn,DIRECT
# Apple
- DOMAIN-SUFFIX,apple.co,Proxy
View PotatsoConfig.conf
ruleSets:
- name: Potatso Config
rules:
- DOMAIN-MATCH,aka,Proxy
- DOMAIN-SUFFIX,edu.cn,DIRECT
- DOMAIN-SUFFIX,cn,DIRECT
- DOMAIN-MATCH,-cn,DIRECT
- DOMAIN-MATCH,360buy,DIRECT
- DOMAIN-MATCH,alipay,DIRECT
View chnroute-gen.sh
#!/bin/sh
export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/bin"
# download chnroute, if faied, then stop
echo "* * * begin"
curl 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | grep ipv4 | grep CN | awk -F\| '{ printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > chnroute.txt && echo "chnroute.txt generated" || exit 1
# use cidrmerge to compress chnroute, if tailed, then exit
cat chnroute.txt | cidrmerge > chnroute.lite.txt && echo "chnroute.lite.txt generated" || exit 1
# generate new chnroute-action to use with ~/bin/acd
rm -f chnroute-action
while read cnip ; do echo "route -nq \${_action} ${cnip} \${current_gw}" >> chnroute-action ; done < chnroute.lite.txt && echo "chnroute-action generated, copy them to the script"
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@cattyhouse
cattyhouse / specified-ss-version.zsh
Last active Aug 29, 2015
How to Install A Specified Version of Shadowsocks-libev 如何安装特定版本的ss
View specified-ss-version.zsh
#!/bin/sh
## git the latest source code
## 下载最新的代码
cd ~
git clone https://github.com/shadowsocks/shadowsocks-libev.git
## or if you already have the source code, go to the dir and pull the latest
## 如果你之前下载过代码,那么只需要pull更新一下就可以了
cd ~/shadowsocks-libev
@cattyhouse
cattyhouse / Backup Archlinux and Restore to another machine
Last active Nov 3, 2017
Backup Archlinux and Restore to another machine
View Backup Archlinux and Restore to another machine
## Backup the current vps 备份当前vps
1. Clean Arch system 清理系统
pacman -Scc
2. Create an excluded file to exclude certain dirs 建立一个需要排除的目录的文件,这些文件不必要备份,新系统会自动生成
cat /root/backup/exclude.txt
/tmp/*
/root/backup/*
/proc
/dev
You can’t perform that action at this time.