Skip to content

Instantly share code, notes, and snippets.

View GalvinGao's full-sized avatar
🌏
Creating Awesomeness

GalvinGao GalvinGao

🌏
Creating Awesomeness
View GitHub Profile
@koukuko
koukuko / qq_message_xml.md
Last active April 4, 2024 05:50
发送XML消息的格式

QQ的XML消息格式整理

QQ可以使用xml的方式发送消息,以下为了方便描述统称为卡片。

发送方式

通过机器人的API进行发送xml即可,但是如果选择发送xml,那么其他如[image=xxx][@xxx]这些命令就不可使用了。整个消息只有XML。

基本结构

xml主要由msg,item,source这3部分组成

<?xml version='1.0' encoding='utf-8' standalone='yes'?>
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 24, 2024 08:00
Hyperlinks in Terminal Emulators
@mrjnamei
mrjnamei / 常用regex
Created June 28, 2017 09:43
常用regex
RegularExpression
常用正则表达式大全汇总(持续更新中……)
校验数字的表达式
数字:^[0-9]*$
n位的数字:^\d{n}$
m-n位的数字:^\d{m,n}$
至少n位的数字:^\d{n,}$
@asukakenji
asukakenji / 0-go-os-arch.md
Last active May 24, 2024 08:40
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@yougg
yougg / proxy.md
Last active May 23, 2024 11:36
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)
@geekeren
geekeren / electron-floating-window.js
Last active March 10, 2022 11:34
electron Floating Window
let floatingWindow;
const createFloatingWindow = function() {
const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;
if (!floatingWindow) {
floatingWindow = new BrowserWindow({
width: 1000,
height: 80,
titleBarStyle: 'hide',
transparent: true,

Penguin Statistics - Enable Debug

This is a very tiny snippet of userscript that allows the one to enable debug features on the production version of Penguin Statistics website.

Limitations

This snippet may NOT be distributed through any public file or code sharing services such as GreasyFork or other places on GitHub. This snippet is releasing under only a personal attribution of myself :D

@sindresorhus
sindresorhus / esm-package.md
Last active May 24, 2024 02:36
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.