Skip to content

Instantly share code, notes, and snippets.

View wen-long's full-sized avatar
🥀
finding a target

wen-long

🥀
finding a target
View GitHub Profile
@KaraRyougi
KaraRyougi / full-subnet-proxy.md
Last active December 12, 2023 14:57
IPv6 完全随机化连接

使用整段 IPv6 以避免被墙的设置方案:

服务端

假设我们拥有 2602:feda:db8::/48 这段 IPv6 地址,且该段地址被静态路由至我们的服务器。

首先配置防火墙,详略。

将整段 IPv6 地址配置至服务器:

@syhily
syhily / download_talebook.sh
Last active June 4, 2024 11:57
Download all the books from a talebook website. The https://curl.se/ and https://stedolan.github.io/jq/ are required for using this script.
#!/usr/bin/env bash
# Download metadata, modify these as your needs.
## The directory to save the downloaded files.
download_directory="/volume1/Download/EPUB"
## The website you want to visit.
calibre_site="http://soulseeker.myds.me:25788"
## The formats you want to download. We only download the first present format.
## All the formats should be upper case.
allow_formats=( EPUB MOBI AZW3 )
@StrongWind1
StrongWind1 / external_ip_websites.txt
Created January 17, 2022 05:31
Domains you can "curl" to get your external IP address based on using the name of the common network utilities ipconfig and ifconfig as the domain.
Use by running "curl $domain"
IP with no line terminator such as Carriage Return (\x0D) or Line Feed (\x0A):
ifconfig.be
ifconfig.ca
ifconfig.cc
ifconfig.in
ifconfig.me
ifconfig.rest
ifconfig.so
@rg443a
rg443a / dbip-mmdb-update.sh
Created May 2, 2021 20:23
dbip mmdb update
#!/usr/bin/env bash
cd /usr/share/GeoIP;
curl -LRO https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz;
curl -LRO https://download.db-ip.com/free/dbip-city-lite-$(date +%Y-%m).mmdb.gz;
curl -LRO https://download.db-ip.com/free/dbip-asn-lite-$(date +%Y-%m).mmdb.gz;
gunzip dbip-$(date +%Y-%m).mmdb.gz;
ln -sf dbip-country-lite-$(date +%Y-%m).mmdb dbip-country-lite.mmdb;
ln -sf dbip-city-lite-$(date +%Y-%m).mmdb dbip-city-lite.mmdb;
ln -sf dbip-asn-lite-$(date +%Y-%m).mmdb dbip-asn-lite.mmdb;
geoipupdate -v;
if [ `uname` = 'Darwin' ]; then
if [ `arch` = 'arm64' ]; then
export PATH="/opt/homebrew/sbin:/opt/homebrew/bin:/usr/local/bin:$PATH"
PS1_ARCH="[ARM]"
else
export PATH="/usr/local/sbin:/usr/local/bin:/opt/homebrew/bin:$PATH"
PS1_ARCH="[X86]"
fi
export PS1="$PS1_ARCH$PS1"
alias ibrew="arch -x86_64 /usr/local/bin/brew"

The correct way, install homebrew on apple m1.

# We'll be installing Homebrew in the /opt directory.
cd /opt

# Create a directory for Homebrew. This requires root permissions.
sudo mkdir homebrew

# Make us the owner of the directory so that we no longer require root permissions.
sudo chown -R $(whoami) /opt/homebrew
@yougg
yougg / proxy.md
Last active June 20, 2024 00:39
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@xeoncross
xeoncross / golang_null_field.go
Created April 24, 2018 15:40
To use `sql.NullString` or `sql.NullInt64` on a Go (golang) struct you need to wrap sql.NullString inside a new type, then implement the json.Unmarshaler interface on that new type.
package main
import (
"database/sql"
"encoding/json"
"fmt"
"log"
"strings"
)
-----------------------------------------------------------------------------------------------------
#disable public key authentication, connect as user root via ssh
sshuser@vg-ubuntu-01:~$ ssh root@vg-ubuntu-02 -o PubkeyAuthentication=no
-----------------------------------------------------------------------------------------------------
#connect with one private key
#access ec2-23-22-230-24.compute-1.amazonaws.com with a private key located in ~/.ssh/alice.pem
$ ssh -i ~/.ssh/alice.pem alice@ec2-23-22-230-24.compute-1.amazonaws.com
-----------------------------------------------------------------------------------------------------
$ cat ~/.ssh/config
@Nilpo
Nilpo / INSTALL.md
Last active October 24, 2022 14:02
Instal Plex on Asus Tinker Board
  1. In terminal, upgrade TinkerOS.

    sudo apt update && apt upgrade -y
    sudo apt dist-upgrade
  2. Install avahi-daemon