Skip to content

Instantly share code, notes, and snippets.

View krast's full-sized avatar
🇨🇳
I may be slow to respond.

Krast krast

🇨🇳
I may be slow to respond.
View GitHub Profile
@krast
krast / fluent-filebeat-comparison.md
Created February 28, 2019 03:15 — forked from StevenACoffman/fluent-filebeat-comparison.md
Fluentd Fluent-bit FileBeat memory and cpu resources

Fluent-bit rocks

A short survey of log collection options and why you picked the wrong one. 😜

Who am I? Where am I from?

I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?

Number what it means
101,332,633 unique visitors in 2017
@krast
krast / Quiver_HTML_importer.py
Created September 13, 2018 07:04 — forked from kspeeckaert/Quiver_HTML_importer.py
Quiver HTML importer
import json
import uuid
from pathlib import Path
from urllib.parse import urlparse
from datetime import datetime
import html2text
import requests
from bs4 import BeautifulSoup
@krast
krast / iladder-gfwlist.pac
Last active May 1, 2018 08:54
iladder-gfwlist
// Generated by gfwlist2pac in precise mode
// https://github.com/clowwindy/gfwlist2pac
var proxy = "PROXY 127.0.0.1:1080;";
var rules = [
"||2dbook.com",
"||4tern.com",
"|http://85.17.73.31/",
"||adorama.com",
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@krast
krast / Download YouTube Videos as MP4
Last active April 15, 2023 20:15
tampermonkey scritp
// ==UserScript==
// @name Download YouTube Videos as MP4
// @description Adds a button that lets you download YouTube videos.
// @homepageURL https://github.com/gantt/downloadyoutube
// @author Gantt
// @version 1.8.10
// @date 2017-02-13
// @namespace http://googlesystem.blogspot.com
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
@krast
krast / shadowsocks-on-openwrt.md
Created April 14, 2017 01:23 — forked from crazygo/shadowsocks-on-openwrt.md
shadowsocks on openwrt

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@krast
krast / howto-setup-transparent-proxied-router.md
Created April 12, 2017 17:53 — forked from snakevil/howto-setup-transparent-proxied-router.md
如何在路由器中实现透明代理?

如何在路由器中实现透明代理?

0 互联网现状

目前整个互联网环境,被破坏最严重地部分,是 Web 服务体验。当直接破坏难以实现时,就会从流程链的上下游着手,如:DNS 污染。

其它地互联网服务类型,例如:邮件,可能小部分会受到 Web 服务上下游破坏地余震,但整体上基本不受影响。

@krast
krast / ss-redir 透明代理.md
Created April 12, 2017 17:53 — forked from wen-long/ss-redir 透明代理.md
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
@krast
krast / setup-taiga-centos.sh
Created January 23, 2017 03:25 — forked from sink66/setup-taiga-centos.sh
Taiga.io minimum install & run commands / CentOS7.2
#!/bin/bash
# How to use
# 1. Replace the "YOURIP" to yourIP
#sed -i -e 's/YOURIP/192.168.x.x/g' setup-taiga-centos.sh
# 2. Run at the root
#source setup-taiga-centos.sh