Skip to content

Instantly share code, notes, and snippets.

Stackie Jia stackia

Block or report user

Report or block stackia

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
@stackia
stackia / vk_to_us.plist
Created Nov 14, 2017
macOS VKeyCode to U.S. layout character map
View vk_to_us.plist
<?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 / giveaway_su_captcha_helper.user.js
Last active Mar 20, 2019
giveaway.su 验证码辅助输入脚本
View giveaway_su_captcha_helper.user.js
// ==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
View 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 / shadowsocks
Last active Mar 17, 2017
shadowsocks shell script
View shadowsocks
#!/bin/sh /etc/rc.common
START=90
STOP=15
NAME=shadowsocks
EXTRA_COMMANDS=rules
CONFIG_FILE=/etc/$NAME.json
DELAY=10
View js-c#-decode.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication4
{
public static class Program
{
public static void Main(string[] args)
{
View bootstrap-customize-config-steamcn.json
{
"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",
View anti-dns-spoofing-iptables.sh
#!/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
@stackia
stackia / homebrew.mxcl.aria2.plist
Last active Apr 10, 2019
aria2c daemon start at boot. Put this file into /Library/LaunchDaemons, them 'chmod 600' and 'chown root'. Remember to fill placeholders below.
View homebrew.mxcl.aria2.plist
<?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>
You can’t perform that action at this time.