Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

jiangtao hustjiangtao

🏠
Working from home
View GitHub Profile
@hustjiangtao
hustjiangtao / gist-attachment-file.md
Created Jan 8, 2021
add attachment files to gist
View gist-attachment-file.md

为gist添加附件文件及图片

git clone git@github.com:12331233.git
cd 12331233
@hustjiangtao
hustjiangtao / format-u-disk-on-macos.md
Created Nov 4, 2019
Format sd card or U disk on MacOS
View format-u-disk-on-macos.md
# 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 Nov 3, 2019
Backup on linux with tar or zip command
View backup-with-tar-or-zip-on-linux.md
  • tar
# 打包压缩
$ tar -zcvf demo.tar ./demo/
$ tar zcvf demo.tar ./demo/
$ tar zcf demo.tar ./demo/

# 解压缩
$ tar xvf demo.tar
View create_mysql_database_with_utf8mb4.md
-- Create a new database named xxx

create database demo_db character set utf8mb4 collate utf8mb4_unicode_ci;
@hustjiangtao
hustjiangtao / mysql-config.md
Last active Jun 25, 2019
mysql conifg for mysql5.7 innodb
View mysql-config.md
  • 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
You can’t perform that action at this time.