Skip to content

Instantly share code, notes, and snippets.

View yaoxinghuo's full-sized avatar
🎯
Focusing

Terry Yao yaoxinghuo

🎯
Focusing
View GitHub Profile
@TTTPOB
TTTPOB / call-this-on-server-with-arg.py
Created April 11, 2021 13:52
telegram bot send message via cloudflare worker (for server notification like job done)
#!/usr/bin/env python3
from urllib import request
import sys
import json
TOKEN="16181xxxxx:xxxxxxxxxxxxxxx"
CHAT="-100118639xxxx"
TEXT=sys.argv[1]
SERVER="what ever name you want"
@tuxity
tuxity / navicat_premium_reset_trial.sh
Last active June 12, 2024 14:00
Reset Navicat Premium 15/16/17 remaining trial days
https://github.com/tuxity/navicat-premium-reset-trial
@joanbono
joanbono / macdown_brute.sh
Last active January 7, 2024 11:12
mac-torrent-download DMG brute-forcer
#!/bin/bash
# Title: Macdown.sh
# Description: Bruteforce DMG files downloaded from mac-torrent-download.net
# Author: Joan Bono (@joan_bono)
# Version: 1.1.0
# Last Modified: jbono @ 20211129
RED='\033[0;31m'
GREEN='\033[0;32m'
NOCOLOR='\033[0m'
@ihciah
ihciah / README.MD
Last active February 2, 2024 00:08
A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

To help users in China mainland access telegram api stably and conveniently with low cost, this script maybe the one you need.

The server-less means you don't have to run a server to proxy the requests, just pay as you go.

Usage

Edit key_prefix, set it to the prefix of you bot address(like /bot563441998:) can avoid abusing.

@nicStuff
nicStuff / redis-migrate.sh
Last active June 5, 2024 17:54
Comfort tool for migrating redis keys among instances. Supports KEYS syntax matching, authentication and TTL
#!/bin/bash
######
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
# TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
######
@tiann
tiann / auto_switch_kb.py
Created December 2, 2015 06:51
auto switch keyboard to english in specific applications
#! /usr/bin/env python
# coding: utf-8
'''
auto switch keyboard between different applications
if you want to change the app list, modify the var 'ignore_list'
'''
from AppKit import NSWorkspace, NSWorkspaceDidActivateApplicationNotification, NSWorkspaceApplicationKey
@zeroseis
zeroseis / disable-auto-android-file-transfer.md
Created September 14, 2015 17:28
Disable auto start for Android File Transfer
  • Close Android File Transfer
  • Open Activity Monitor and kill “Android File Transfer Agent”
  • Go to where you installed “Android File Transfer.app” (I have it under /Applications)
  • Ctrl+click –> “Show package contents”
  • Go to Contents/Resources
  • Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
  • Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
@selaromi
selaromi / make-flashlight-work-on.yosemite.md
Last active July 25, 2023 19:21
Steps to make Flashlight work on 10.10.4 (doesn't work for El Capitan)

Make Flashlight work on 10.10.4

  1. Install SIMBL http://culater.net/software/SIMBL/SIMBL.php
  2. Copy SpotlightSIMBL.bundle to /Library/Application Support/SIMBL/Plugins/ (a)
  3. Copy Flashlight.osax to ~/Library/ScriptingAdditions/ (b)
  4. Disable Flashlight
  5. Enable Flashlight
  6. Open Script Editor on your Mac (look for "Script Editor In Spotlight") and paste the following code (don't change Snow Leopard for Yosemite)
tell application "Spotlight" to inject SIMBL into Snow Leopard
@guoxiaoqiao
guoxiaoqiao / openvpn-2.3.4-obfs.patch
Last active October 17, 2019 16:20
OpenVPN 2.3.4 混淆补丁
diff -Nur openvpn-2.3.4/src/openvpn/options.c openvpn-2.3.4.obfs/src/openvpn/options.c
--- openvpn-2.3.4/src/openvpn/options.c 2014-05-01 19:12:22.000000000 +0800
+++ openvpn-2.3.4.obfs/src/openvpn/options.c 2014-10-08 21:29:19.330754723 +0800
@@ -60,6 +60,10 @@
#include "memdbg.h"
+extern char* _socket_obfs_salt;
+extern int _socket_obfs_salt_len;
+extern int _socket_obfs_padlen;
@lanceliao
lanceliao / 1-redsocks2-openwrt.md
Last active April 24, 2023 16:05
在OpenWrt上配置redsocks2

redsocks2是一款透明socks5代理工具,能够实现智能代理的功能,这里是redsocks2在OpenWrt上的配置,配合shadowsocks使用。

redsocks.conf 是配置文件,放在/etc目录,将192.168.1.1改成路由器的地址. redsocks2.sh 为自启动文件,改名为redsocks2放到/etc/init.d目录即可。自启动文件假设redsocks可执行文件在/opt/bin目录。

启动redsocks2: /etc/init.d/redsocks2 start 停止redsocks2: /etc/init.d/redsocks2 stop

redsocks2 git源