Skip to content

Instantly share code, notes, and snippets.

View meoww-bot's full-sized avatar
🐱
meow sucking

meoww-bot meoww-bot

🐱
meow sucking
View GitHub Profile
@moesoha
moesoha / worker.js
Last active May 5, 2022 15:12
Auto kick added member from Telegram group (deployed on CloudFlare Worker)
addEventListener('fetch', event => event.respondWith(handleRequest(event.request)));
// Add environment variable `TGBOT_TOKEN` via Worker-Settings
async function requestTelegramBotAPI(method, payload) {
return fetch(`https://api.telegram.org/bot${TGBOT_TOKEN}/${method}`, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8"
},
body: !payload ? undefined : JSON.stringify(payload)
@hizkifw
hizkifw / cloudflare-worker-youtube-dl.js
Last active April 24, 2024 21:03
Download YouTube videos with Cloudflare Worker
/**
* cloudflare-worker-youtube-dl.js
* Get direct links to YouTube videos using Cloudflare Workers.
*
* Usage:
* GET /?v=dQw4w9WgXcQ
* -> Returns a JSON list of supported formats
*
* GET /?v=dQw4w9WgXcQ&f=251
* -> Returns a stream of the specified format ID
@Treeki
Treeki / TurnipPrices.cpp
Last active April 5, 2024 13:55
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@jat001
jat001 / namebase.py
Created February 20, 2020 10:05
Sell HNS automatically
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal
from datetime import datetime
try:
import requests
import simplejson as json
@liberal-boy
liberal-boy / Vmess + TCP + TLS 方式的 HTTP 分流和网站伪装.md
Last active April 17, 2024 09:48
Vmess + TCP + TLS 方式的 HTTP 分流和网站伪装

TCP + TLS + Web

背景

  • 目前 Vmess + WebSocket + TLS (以下简称 wss)方式,因其特征如同 HTTPS 流量,可以隐藏 V2Ray 路径,主动侦测会得到正常 HTTP 网站响应,具有良好的伪装能力,目前被广泛用于反审查。

  • 但是如此强大的伪装能力,需要付出严重的性能代价:TLS 1.3 握手需要消耗 1-rtt,WS 握手也需要消耗 1-rtt,增大了握手延迟。V2Ray 增加了 mux 以减少握手的发生,然而实际使用中 mux 体验并不好,很多用户选择关闭。

  • 最近兴起了一个新的反审查工具——Trojan,这个工具将一个类似 Socks 的协议直接通过 TLS 传输,并将认证失败的流量交由 Web 服务器处理。降低 WS 延迟的同时,提供与 wss 方式一样的伪装能力。但是该工具较为年轻,没有路由功能,各平台图形化客户端也不完善。

@ForeverZer0
ForeverZer0 / RemoveGitSubModule.md
Last active February 18, 2020 13:22
Completely remove/delete git submodule from project

Completely Remove Git Sub-Module

Two different methods to automate the process of removing a submodule from a git repo with a single command. Adapted from here.

NOTE: A commit is made during removal, so it is best to commit any other changes prior to executing the command.

Using as a script in your PATH (filename will be name of command)

  • Create a new file anywhere in your shell's search paths (i.e. ~/.local/bin)
  • Copy the following
@madeye
madeye / example.json
Last active March 16, 2020 05:36
example.json
[
{
"server": "198.199.101.152",
"server_port": 8388,
"password": "u1rRWTssNv0p",
"method": "aes-256-cfb",
"remarks": "Example 1"
},
{
"server": "198.199.101.12",
@nwesterhausen
nwesterhausen / node_exporter_setup.md
Last active April 24, 2024 21:36
node_exporter installation on ubuntu

Installing node_exporter

Steps to install node_exporter

  1. Add user for node_exporter

    sudo useradd --no-create-home --shell /bin/false node_exporter
@vitobotta
vitobotta / gist:45f62ca44bfa19196bc2e44c9ec42b8b
Created April 14, 2019 10:15
Install Rook/Ceph with Rancher deployed cluster
- In Rancher, edit cluster, then edit Cluster Options as yaml and change the kubelet section as follows if needed:
```
kubelet:
extra_args:
volume-plugin-dir: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec"
extra_binds:
- "/usr/libexec/kubernetes/kubelet-plugins/volume/exec:/usr/libexec/kubernetes/kubelet-plugins/volume/exec"
fail_swap_on: false
```