Skip to content

Instantly share code, notes, and snippets.

View kmvan's full-sized avatar
🌏
What is the end and ultimate purpose of the universe?

Km.Van kmvan

🌏
What is the end and ultimate purpose of the universe?
View GitHub Profile
@kmvan
kmvan / meta-tags.md
Created August 29, 2024 03:24 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@kmvan
kmvan / nginx-certbot.sh
Created July 12, 2024 02:51
nginx+certbot
#!/bin/bash
apt install python3-certbot-nginx
# certbot --nginx
@kmvan
kmvan / mdb-fulltext-for-cjk.md
Last active April 21, 2026 02:13
Mariadb fulltext index for CJK
@kmvan
kmvan / mariadb-recovery.md
Created June 18, 2022 03:51
Recovery MariaDB data

Create table without index, foreign key and data.

ALTER TABLE [table] DISCARD TABLESPACE;

Copy [table].ibd to database dir.

ALTER TABLE [table] IMPORT TABLESPACE;
@kmvan
kmvan / _document.tsx
Created June 2, 2022 02:52
Next 12 + React 18 _document.tsx
import Document, {
DocumentContext,
Head,
Html,
Main,
NextScript,
} from 'next/document'
import { CSSProperties, ServerStyleSheet } from 'styled-components'
import { AppContextProps } from 'YOUR APP CONTEXT'
interface PageDocumentProps {
@kmvan
kmvan / 50-server.conf
Last active May 27, 2023 05:51
mariadb/mysql server.conf
###############
# 88CPUs 128GB
###############
# MariaDB Configuration File
# Server
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
@kmvan
kmvan / set-dir-and-file-mode.sh
Created June 14, 2021 09:23
Set dir and file mode
#!/bin/bash
# dirs
find -type d -exec chmod 0755 {} \;
# files
find -not -type d -exec chmod 644 {} \;
@kmvan
kmvan / certbot+nginx+nextjs.md
Last active May 26, 2021 10:14
NextJS + certbot + nginx + nextjs+ SSL

/etc/nginx/snippets/ssl.conf

include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

/etc/letsencrypt/renewal/www.DOMAIN.conf

Enable:

  • Find HKLM\System\CurrentControlSet\Control\Power
  • Add or change PlatformAoAcOverride to 0. PlatformAoAcOverride is DWORD(32bit)

Disable:

  • Remove PlatformAoAcOverride
@kmvan
kmvan / wine 配置
Last active April 17, 2024 17:00
wine
env WINEPREFIX="$HOME/.deepinwine/Spark-TIM" winecfg
env LANG=zh_CN.UTF8 wine ./san11pk.exe