Skip to content

Instantly share code, notes, and snippets.

View stackia's full-sized avatar
not undefined

Stackie Jia stackia

not undefined
View GitHub Profile
@stackia
stackia / homebrew.mxcl.aria2.plist
Last active October 13, 2023 04:50
aria2c daemon start at boot. Put this file into /Library/LaunchDaemons, them 'chmod 600' and 'chown root'. Remember to fill placeholders below.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.aria2</string>
@stackia
stackia / anti-dns-spoofing-iptables.sh
Created December 11, 2014 07:17
anti-dns-spoofing-iptables
#!/bin/bash
BADIP="74.125.127.102 74.125.155.102 74.125.39.102 74.125.39.113 209.85.229.138 128.121.126.139 159.106.121.75 169.132.13.103 192.67.198.6 202.106.1.2 202.181.7.85 203.161.230.171 203.98.7.65 207.12.88.98 208.56.31.43 209.145.54.50 209.220.30.174 209.36.73.33 211.94.66.147 213.169.251.35 216.221.188.182 216.234.179.13 243.185.187.39 37.61.54.158 4.36.66.178 46.82.174.68 59.24.3.173 64.33.88.161 64.33.99.47 64.66.163.251 65.104.202.252 65.160.219.113 66.45.252.237 72.14.205.104 72.14.205.99 78.16.49.15 8.7.198.45 93.46.8.89"
for IP in $BADIP
do
hexip=$(printf '%02X ' ${IP//./ }; echo)
#echo $hexip
iptables -I INPUT -p udp --sport 53 -m string --algo bm --hex-string "|$hexip|" --from 60 --to 180 -j DROP
iptables -I FORWARD -p udp --sport 53 -m string --algo bm --hex-string "|$hexip|" --from 60 --to 180 -j DROP
done
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication4
{
public static class Program
{
public static void Main(string[] args)
{
@stackia
stackia / shadowsocks
Last active March 17, 2017 05:08
shadowsocks shell script
#!/bin/sh /etc/rc.common
START=90
STOP=15
NAME=shadowsocks
EXTRA_COMMANDS=rules
CONFIG_FILE=/etc/$NAME.json
DELAY=10
@stackia
stackia / update-chnroute.sh
Created April 18, 2017 11:31
update-chnroute.sh
#!/bin/sh
RULES=$(wget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }')
if [ ! -z "$RULES" ]; then
echo "$RULES" > /etc/chinadns_chnroute.txt
fi
@stackia
stackia / giveaway_su_captcha_helper.user.js
Last active March 20, 2019 06:18
giveaway.su 验证码辅助输入脚本
// ==UserScript==
// @name giveaway.su 验证码输入辅助
// @namespace http://tampermonkey.net/
// @version 0.2
// @description 自动识别验证码+验证码输入键盘,必须安装 Liana 字体方可正常使用
// @author Stackia
// @require https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js
// @match https://giveaway.su/giveaway/view/*
// @updateURL https://gist.githubusercontent.com/stackia/5e6fc0a3f1196042c1075109dd149825/raw/giveaway_su_captcha_helper.user.js
// @downloadURL https://gist.githubusercontent.com/stackia/5e6fc0a3f1196042c1075109dd149825/raw/giveaway_su_captcha_helper.user.js
@stackia
stackia / vk_to_us.plist
Created November 14, 2017 10:04
macOS VKeyCode to U.S. layout character map
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>0</key>
<string>aA</string>
<key>1</key>
<string>sS</string>
<key>2</key>
<string>dD</string>
@stackia
stackia / .config
Last active March 24, 2021 12:08
Build config for Lean's OpenWRT
#
# Automatically generated file; DO NOT EDIT.
# OpenWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
# CONFIG_TARGET_sunxi is not set
# CONFIG_TARGET_apm821xx is not set
# CONFIG_TARGET_ath25 is not set
# CONFIG_TARGET_ar71xx is not set
@stackia
stackia / 海南电信 IPTV(组播).m3u8
Last active December 2, 2023 10:52
海南电信 IPTV 组播源 (EPG: https://epg.112114.xyz/pp.xml)
#EXTM3U
#EXTINF:-1 tvg-id="CCTV1" tvg-name="CCTV1" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV1.png" group-title="央视 HD",CCTV-1 HD
rtp://239.253.64.120:5140
#EXTINF:-1 tvg-id="CCTV2" tvg-name="CCTV2" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV2.png" group-title="央视 HD",CCTV-2 HD
rtp://239.253.64.195:5140
#EXTINF:-1 tvg-id="CCTV3" tvg-name="CCTV3" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV3.png" group-title="央视 HD",CCTV-3 HD
rtp://239.253.64.244:5140
#EXTINF:-1 tvg-id="CCTV4" tvg-name="CCTV4" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV4.png" group-title="央视 HD",CCTV-4 HD
rtp://239.253.64.196:5140
#EXTINF:-1 tvg-id="CCTV5" tvg-name="CCTV5" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV5.png" group-title="央视 HD",CCTV-5 HD