Skip to content

Instantly share code, notes, and snippets.

View hustjiangtao's full-sized avatar
🏠
Working from home

jiangtao hustjiangtao

🏠
Working from home
  • China
View GitHub Profile
@hustjiangtao
hustjiangtao / gist-attachment-file.md
Created January 8, 2021 13:55
add attachment files to gist
@hustjiangtao
hustjiangtao / format-u-disk-on-macos.md
Created November 4, 2019 13:19
Format sd card or U disk on MacOS
# list all disk
$ diskutil list
/dev/disk0
/dev/disk1
/dev/disk2
...

# format U-disk to FAT32
$ diskutil partitionDisk /dev/disk5 MBR FAT32 UNTITLED 0b
@hustjiangtao
hustjiangtao / backup-with-tar-or-zip-on-linux.md
Created November 3, 2019 05:13
Backup on linux with tar or zip command
  • tar
# 打包压缩
$ tar -zcvf demo.tar ./demo/
$ tar zcvf demo.tar ./demo/
$ tar zcf demo.tar ./demo/

# 解压缩
$ tar xvf demo.tar
@hustjiangtao
hustjiangtao / create_mysql_database_with_utf8mb4.md
Created November 2, 2019 11:40
Create a new database with utf8mb4
-- Create a new database named xxx

create database demo_db character set utf8mb4 collate utf8mb4_unicode_ci;
@hustjiangtao
hustjiangtao / mysql-config.md
Last active June 25, 2019 02:53
mysql conifg for mysql5.7 innodb
  • mysql在小内存服务器上的优化设置

直接安装的mysql5.7默认使用innodb引擎,默认开启performance_schema,故针对innodb优化,并关闭performance_schema,即可大幅优化内存占用 其中performance_schema影响最大,在不需要的前提下,可直接设置 performance_schema=0 即可。

# vim /etc/my.cnf
[mysqld]
performance_schema=0
innodb_buffer_pool_size = 64M
@hustjiangtao
hustjiangtao / aliyun_hk_config.md
Last active April 13, 2019 09:04
all config for aliyun-hk