Skip to content

Instantly share code, notes, and snippets.

@miyouzi
miyouzi / nginx_with_socat.md
Last active May 3, 2024 14:05
配置 Nginx 通过代理访问反代目标(B站代理解析)

简介

众所周知,有些服务存在着地区限制,我们可以通过在服务所属地区搭建代理服务来解决,其中在其服务范围内部署 Nginx 反代服务是个有效且流行的办法。

但如果区域很多,每个区域都布置一台服务器那成本会有些高昂且利用率很低,通常我们只是需要该地区的 IP 而已,如果手头上正好有这些地区的代理池的话,那我们就可以只用一台服务器部署Nginx反向代理结合服务所在地区的代理实现相同的效果。

本文着重介绍的就是如何让 Nginx 通过代理访问上游服务。(即 proxy_pass 的目标)

详细图文说明可以参见《Nginx 如何与 Socat 配合使用》

PS:本配置兼容 《哔哩漫游》《解除b站区域限制》

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@core2duoe6420
core2duoe6420 / velop_log.py
Created February 5, 2022 07:43
A python script to follow Linksys Velop's log printed by sysinfo.cgi
import requests
import time
from datetime import datetime, timedelta
from requests.auth import HTTPBasicAuth
last_time = datetime.min
last_message = ''
while True:
basic = HTTPBasicAuth('admin', '${velop_password}')
@xbeta
xbeta / README.md
Last active May 3, 2024 14:04
Macbook Pro Bluetooth + WiFi 2.4GHz interference fix for Mavericks
@thepwrtank18
thepwrtank18 / keys.md
Last active May 3, 2024 14:00
Windows XP/2003 Product Keys

Windows XP/2003 Product Keys

These keys have been tested to work. These are a combination of keys from Chinese websites, trial keys inside ISO's, auto-activate keys in OEM ISO's, and directly from Microsoft's website, all aggregated for your convenience.

Usage

In order to use these keys, you need the right edition of Windows XP/2003. Not just Home/Pro/Enteprise/etc, whether it's a Retail, OEM or Volume version. There's a clear cut way to check this.

If you see this, you have a Retail copy.
image

@kuhnza
kuhnza / http-request-dumper.js
Last active May 3, 2024 13:59
A simple node server that dumps raw incoming http requests out to the command line.
var http = require('http');
var LISTEN_ON_PORT = 3000;
function toTitleCase(str) {
return str.replace(/[a-z]*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
http.createServer(function (req, res) {
var body;
@tcoppex
tcoppex / c_nostd.txt
Last active May 3, 2024 13:58
Writing C software without the standard library [Linux Edition] - Franc[e]sco's Gopherspace
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
stop there.
I will provide a more complete explanation that will allow you to
build yourself a little framework to write more complex programs.
@gijigae
gijigae / install-dify.sh
Last active May 3, 2024 13:57
Shell script to install Dify
#!/bin/bash
# Install Docker
curl -fsSL https://get.docker.com -o install-docker.sh
sh install-docker.sh
# Clone the GitHub repository
git clone https://github.com/langgenius/dify.git
# Navigate to the desired directory
@nk23x
nk23x / build.prop.tweaks
Last active May 3, 2024 13:57
build.prop tweaks in common raw format (edit needed to adapt to device)
#
# TWEAKS
#
# Qualcomm
#com.qc.hardware=true
#debug.qctwa.statusbar=1
#debug.qctwa.preservebuf=1
#debug.qc.hardware=true
@pancelor
pancelor / README.md
Last active May 3, 2024 13:55
aseprite to pico8/picotron exporter

picotron is in early alpha -- it doesn't seem to have a sprite editor yet but it does support sprites in a particular format, so I threw together this aseprite exporter.

picotron is out! importing sprites is still a bit tricky, so I built this script to help, along with this picotron cart

this script works great for pico8 too -- I use it often

how to use

you'll need Aseprite to use this.