Skip to content

Instantly share code, notes, and snippets.

View quentindemetz's full-sized avatar
Hiring

Quentin de Metz quentindemetz

Hiring
View GitHub Profile
@quentindemetz
quentindemetz / .arcconfig
Last active January 11, 2020 22:54
Pre-commit compatible Arcanist Lint Engine
{
"phabricator.uri" : "/url/to/phabricator/instance",
"load" : [
"../path/to/below/phabricator/module"
],
"lint.engine" : "PreCommitLintEngine"
}
mysql -u $user -p$password -h $host -NBe "SHOW TABLE STATUS;" $db | while read name engine version rowformat rows avgrowlength datalength maxdatalength indexlength datafree autoincrement createtime updatetime checktime collation checksum createoptions comment ; do
if [ "$datafree" -gt 0 ] ; then
fragmentation=$(($datafree * 100 / $datalength))
echo "$database.$name is $fragmentation% fragmented."
fi
done