Skip to content

Instantly share code, notes, and snippets.

View yanli0303's full-sized avatar

Yan Li yanli0303

View GitHub Profile
@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 / jenkins-with-docker.md
Created July 14, 2023 16:14
Set up Jenkins server with Docker
@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
/* https://animista.net/ */
.typing {
animation: typing 2s steps(22), blink .5s step-end infinite alternate;
}
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;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./style.css">
<title>Adopt Me</title>
</head>