Skip to content

Instantly share code, notes, and snippets.

View mumubin's full-sized avatar
🎯
Focusing

mumubin mumubin

🎯
Focusing
  • RingCentral
  • Hangzhou
  • 04:05 (UTC +08:00)
View GitHub Profile
@mumubin
mumubin / rpm_package_simple_copy.md
Last active April 23, 2020 05:39
rpm_package_simple_copy.md

安装依赖

yum install gcc rpm-build rpm-devel rpmlint make python bash coreutils diffutils
yum install rpmdevtools

准备build文件

  1. 生成目录
rpmdev-setuptree
@mumubin
mumubin / ssh.md
Created December 17, 2019 05:30
ssh

how to check private/public key match

ssh-keygen -y -e -f private.key
@mumubin
mumubin / ssh.md
Created December 17, 2019 05:30
ssh

how to check private/public key match

ssh-keygen -y -e -f private.key
@mumubin
mumubin / mysql_node.md
Last active December 10, 2019 07:08
mysql

query table size

SELECT table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size (MB)` FROM information_schema.TABLES WHERE table_schema = "$your_database";

query column size

SELECT sum(char_length($your_column))/1024/1024 FROM $your_table
@mumubin
mumubin / go-learn.md
Last active October 16, 2019 13:48
go learn

GO Test

go test -coverprofile=c.out             
go tool cover -html=c.out 

go test -bench . -cpuprofile=cpu.profile
go tool pprof cpu.profile

Example

@mumubin
mumubin / markdown-details-collapsible.md
Created April 10, 2019 05:50 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section with markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@mumubin
mumubin / change_gateway_centos.sh
Last active April 2, 2019 07:15
change_gateway_centos.sh
#!/bin/bash
LOG_FILE="/tmp/user_script_log"
logit()
{
echo "[${USER}][`date`] - ${*}" >> ${LOG_FILE}
}
logit "Start to user script to update default gw"