Skip to content

Instantly share code, notes, and snippets.

View yanli0303's full-sized avatar

Yan Li yanli0303

View GitHub Profile
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
CREATE USER 'admin'@'%' IDENTIFIED BY 'admin';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
SHOW GRANTS FOR mstr;
FLUSH PRIVILEGES;
CREATE DATABASE my_store CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
/* https://animista.net/ */
.typing {
animation: typing 2s steps(22), blink .5s step-end infinite alternate;
}
@yanli0303
yanli0303 / html-script-integrity.sh
Created August 10, 2021 14:11
Shell command for calculating the HTML script tag integrity
cat SCRIPT_FILE | openssl dgst -sha512 -binary | openssl base64 -A
@yanli0303
yanli0303 / jenkins-with-docker.md
Created July 14, 2023 16:14
Set up Jenkins server with Docker
@yanli0303
yanli0303 / xz-compress-decompress-files.md
Created July 31, 2024 17:29
Compress and decompress files with xz

Compress and decompress files with xz

See xz manual

# compress a directory
XZ_OPT='-9' tar -chvJf output-file.tar.xz -C /your/dir .

# The output archive of the above command doesn't contain the root directory.
# To compress a directory with its name in the output archive, use below command:
@yanli0303
yanli0303 / html-popover-property.html
Created July 31, 2024 17:31
HTML popover property
<!DOCTYPE html>
<html>
<head>
<title>HTML popover property</title>
</head>
<body>
<button id="button" popovertarget="select">请选择</button>
<menu id="select" popover>
<div><input type="radio" name="type" value="">请选择</div>