Skip to content

Instantly share code, notes, and snippets.

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

杨光 yangvipguang

🏠
Working from home
View GitHub Profile
@yangvipguang
yangvipguang / MYSQL 性能语句
Last active June 23, 2020 07:56
MySQL 性能
1、统计top 10的buffer pool占用内存的表
select * from innodb_buffer_stats_by_table order by pages desc limit 10;
2、统计mysql物理文件的物理io写入字节数(可以定位出一个表的读写io占比和实际的平均写入量来判断占用io资源)
select * from io_global_by_file_by_bytes limit 10;
3、当前运行的所有事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX\G
4、表信息
@yangvipguang
yangvipguang / Vimrc
Last active February 18, 2020 04:05
Vimrc
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
@yangvipguang
yangvipguang / Vimrc-Vim-Plug-example
Created January 16, 2020 06:57
Vimrc-Vim-Plug-example
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
@yangvipguang
yangvipguang / Vimrc-example
Created January 16, 2020 06:26
Vimrc-example
scriptencoding utf-8
" ============================================================================
" Author: yangguang
" Version: v1.1.0
" Update Time: 2020-01-01
" ============================================================================
" Vundle initialization
" Avoid modify this section, unless you are very sure of what you are doing
@yangvipguang
yangvipguang / nginx-php
Created December 26, 2018 06:34
nginx-php
server{
listen 80;
server_name example.com www.example.com;
return 301 https://www.example.com$request_uri;
}
server {
listen 443 ssl http2;
server_name example.com www.example.com;
root /var/www/html/example.com/;
@yangvipguang
yangvipguang / Pipeline-Agent-Docker
Last active November 21, 2018 08:00
Jenkins-pipeline
//1、Dokcer 环境
//2、切换workspace
//3、分配node 节点执行任务
pipeline {
//agent {
// node{
// label 'node2'
// customWorkspace '/tmp'
@yangvipguang
yangvipguang / Nginx.conf
Last active March 3, 2019 08:08
Nginx.conf
user nginx;
worker_processes 4;
worker_cpu_affinity 0001 0010 0100 1000;
error_log /etc/nginx/logs/error_nginx.log crit;
pid /run/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
ubuntu
apt-get install gcc automake autoconf libtool pkg-config gettext perl python flex bison gperf lcov doxygen libgmp-dev build-essential
scriptencoding utf-8
" ============================================================================
" Author: TaoBeier
" Blog: http://moelove.info
" Version: v1.1.0
" Update Time: 2016-09-25
" ============================================================================
" Vundle initialization
" Avoid modify this section, unless you are very sure of what you are doing
@yangvipguang
yangvipguang / Linux Server—Info.sh
Created June 1, 2018 07:35
Linux Server—Info
# 服务器型号
dmidecode | grep "Product" > server.temp.info
serverModelInfo="服务器型号:"
while read lineStr
do
temp=`echo ${lineStr##*:}`
serverModelInfo="${serverModelInfo}${temp} "
done < server.temp.info
# 操作系统
os=`cat /etc/centos-release`