Skip to content

Instantly share code, notes, and snippets.

@kdrx
kdrx / Sublime Text 3 cheating.md
Created January 18, 2019 17:54 — forked from laptrinhcomvn/Sublime Text 3 cheating.md
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
#EXTM3U name="江苏电信IPTV"
#EXTINF:-1,CCTV1HD
http://<itv domain or ip address>:9080/rtp/239.49.8.19:9614
#EXTINF:-1,CCTV2HD
http://<itv domain or ip address>:9080/rtp/239.49.8.50:9802
#EXTINF:-1,CCTV3
http://<itv domain or ip address>:9080/rtp/239.49.0.3:9566
#EXTINF:-1,CCTV4HD
http://<itv domain or ip address>:9080/rtp/239.49.8.51:9806
#EXTINF:-1,CCTV5
@kdrx
kdrx / bash-colors.md
Created October 12, 2018 03:06 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@kdrx
kdrx / 52281395_127.0.0.1.cert
Created June 21, 2018 15:50
v2ray http2 example
-----BEGIN CERTIFICATE-----
MIIC+zCCAeOgAwIBAgIJAPjMqtwI0gVWMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
BAMMCTEyNy4wLjAuMTAeFw0xODAzMDMwMTQ0MjRaFw0yODAyMjkwMTQ0MjRaMBQx
EjAQBgNVBAMMCTEyNy4wLjAuMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBALDlEUPmm1d+zhJ+wc5c6irrtwu8GV0urUUg/38wFTRjA8ISrJnsD7XX6cTQ
/aTlcFhc6QdV85TY4Oyd2cgKzhyqfTnE1Fi/kZpKXOBz6UhgFzZVBzB4TrX96daX
ZP48Ck5ZldOwnHUjofv9NqybJNHZ/m1VWTLR5rcM7zjNPP6NbhVxY5o7MxOVrR3o
W2dmzMppHsWVIuuW0QfVS7rqxYD8fgeV0eAX0NYqITx1rVYZLF7bLR9BSCZSgqRw
yIeSpj8WItcPvKAcDkq6lMmQ2qX16cYFefBGxdvWbhX1F1TqWsha0CDw3iy6sZwY
hnb1tZGfx2iSu0vCbio7wjPX288CAwEAAaNQME4wHQYDVR0OBBYEFFaw2uW1cJ2i
@kdrx
kdrx / Google Domains.txt
Created October 23, 2017 12:11
List of known Google domain names. Useful e.g. for filtering Mint referrers.
# What's this? It's a monster list of Google domain names that have been found to refer
# users to sites that are monitored with Shaun Inman's "Mint" statistics package. http:/haveamint.com/
#
# A huge number of these came from Shawn Blanc's domain list here:
# http://shawnblanc.net/2010/08/cleanup-mint-unique-referrers/
#
# I merged them in to my existing list for this "MONSTAH LIST". Enjoy!
#
# To filter many, many of the Google search results from your "Newest Unique Referrers" results in
# Mint, copy the list below verbatim (don't include these "comment" lines) and paste them into your
@kdrx
kdrx / dnsmasq.conf
Created August 10, 2017 02:26
dnsmasq conf of apple services
#apple
#nslookup -vc a1.phobos.apple.com 168.95.1.1
#203.78.36.42 203.69.138.18
#jp 120.29.145.9 124.40.51.32 61.213.183.25
address=/a1.mzstatic.com/203.69.138.18
address=/a2.mzstatic.com/203.69.138.18
address=/a3.mzstatic.com/203.69.138.18
address=/a4.mzstatic.com/203.69.138.18
address=/a5.mzstatic.com/203.69.138.18
address=/a6.mzstatic.com/203.69.138.18
@kdrx
kdrx / youtube-list.sh
Created July 4, 2017 07:21 — forked from nanpuyue/youtube-list.sh
用于获取youtube播放列表内的所有视频地址
#!/bin/bash
#
# e.g.
# for https://www.youtube.com/playlist?list=PLL7JeXQtCv0MslQgUCV3DvKmaagaB9Nms use:
# youtube-list.sh PLL7JeXQtCv0MslQgUCV3DvKmaagaB9Nms
for i in \
`curl -s "https://www.youtube.com/playlist?list=$1" |\
grep -Po "/watch.*?$1" |\
sed -r "s#&.*##" | uniq`;
@kdrx
kdrx / _service.md
Created June 1, 2017 00:53 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@kdrx
kdrx / gist:7ec1e69461297f131a4ab24a6502114b
Created October 18, 2016 06:09 — forked from windwiny/gist:c85dd8c2571b4374f874
Linux 基于策略的路由(Linux Policy Routing)(Linux 多个网卡使用相同网段的IP地址设置)
----
Linux 基于策略的路由(Linux Policy Routing)
Linux 有传统的基于数据包目的地址的路由算法,和新的基于策略的路由算法
新算法优点:支持多个路由表,支持按数据报属性(源地址、目的地址、协议、端口、数据包大小、内容等)选择不同路由表
# 查看规则命令,后面可跟其它参数,默认为 show(list) 显示全部
ip rule