Skip to content

Instantly share code, notes, and snippets.

View QGB's full-sized avatar
💭
unhappy=

Too large to fit in the margin QGB

💭
unhappy=
  • Please
  • Follow me
View GitHub Profile
@c2h2
c2h2 / v2ray_config.json
Created September 17, 2019 15:33
sample v2ray config.json
{
"dns" : {
"servers" : [
"1.1.1.1"
]
},
"inbounds" : [
{
"listen" : "0.0.0.0",
@huiliu
huiliu / zhihu.ts
Last active August 2, 2021 14:47
import puppeteer, { Page, Browser } from "puppeteer-core"
import axios from "axios";
import { stat } from "fs";
export default class Main {
static userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36";
static selector = "div.item:nth-child(1) > div"
static exePath = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
static async runTest(): Promise<any> {
// let exePath = "/usr/bin/chromium";
@uogbuji
uogbuji / debian-pydev.md
Last active August 25, 2023 01:10
My Python dev setup for Linux (Debian, Ubuntu, Mint & ChromeOS/Crostini)

Python dev environment on Linux

User local install as much as possible, leaving system-wide kit (e.g. python & python-pip .debs) alone. Tested on Debian, Ubuntu, Mint & ChromeOS/Crostini.

Environment

Set up the dev environment (this is the only system-wide part):

sudo apt install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 27, 2025 09:54
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@vxgmichel
vxgmichel / asyncio_timing.py
Last active November 16, 2022 05:35
A timing context for asyncio
# See the coresponding stackoverflow post:
# https://stackoverflow.com/a/34827291/2846140
import time
import asyncio
import selectors
import contextlib
class TimedSelector(selectors.DefaultSelector):
@IanSmith123
IanSmith123 / back2scu.yml
Last active June 21, 2024 20:45
clash规则列表
port: 7890
socks-port: 7891
redir-port: 7892
allow-lan: false
mode: Rule
log-level: info
external-controller: '127.0.0.1:9090'
secret: ''
cfw-bypass:
- localhost
@0xpizza
0xpizza / async_tcp_scan.py
Last active February 19, 2025 14:58
TCP Network scanner using asyncio for Python 3.7
#!/usr/bin/python3.7
import asyncio
import ipaddress
import re
import sys
MAX_NUMBER_WORKERS = 200
@DMeechan
DMeechan / word-list.js
Last active April 26, 2025 12:08
BIP39 mnemonic phases word list (2048 words)
const WORDLIST = ["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse",
"access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act",
"action","actor","actress","actual","adapt","add","addict","address","adjust","admit",
"adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent",
"agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert",
"alien","all","alley","allow","almost","alone","alpha","already","also","alter",
"always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger",
"angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique",
"anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic",
"area","arena","argue","arm","armed","armor","army","around","arrange","arrest",
def generate_nonce(length=8):
"""Generate pseudorandom number."""
return ''.join([str(random.randint(0, 9)) for i in range(length)])
def trade(signal,volume,pair):
try:
trade = 'TRADE|OPEN|' + signal + '|' + pair + '|0|0|0|IcarusBot Trade|' + generate_nonce() + '|' + volume
s.send_string(trade, encoding='utf-8')
print("Waiting for metatrader to respond...")
@sam016
sam016 / AllGattCharacteristics.java
Last active April 15, 2025 12:28
Bluetooth GATT Services & Characteristics
package com.sam016.vsflatomation.service.ble;
import java.util.HashMap;
import java.util.UUID;
public class AllGattCharacteristics {
private static HashMap<String, String> attributes = new HashMap();
static {
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name");