CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install 3.7.0
git remote show origin | grep {pattern} | awk '{print $1}' | xargs git push origin -d
MacOS: Mojave 10.14.12
-
Install Java SE: https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
-
Download SchemaSpy: http://schemaspy.org/
-
Download PostgreSQL JDBC driver: http://jdbc.postgresql.org/download.html
-
Install pango:
brew install pango
-
Install Graphviz:
brew install graphviz --with-pango
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/psa/admin/bin/mail_auth_view | grep [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var body = $('.modal-body'); | |
body.animate({ | |
scrollTop: body.scrollTop() + error.offset().top - 65 | |
}, 500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Validator() {} | |
Validator.min = function(number, min) { | |
return number >= min; | |
} | |
Validator.max = function(number, max) { | |
return number <= max; | |
} |
pt-kill user must have SUPER
PROCESS
permission.
The following command intends to kill queries which have execute time greater than 30s and save terminated queries to database.
pt-kill --host=localhost --user=pt_kill_user --password=pt_kill_pass \
--busy-time=30 --interval=5s \
--log-dsn=h=localhost,D=pt_kill,t=kill_log,P=3306,u=root,p=root \
--kill --daemonize --ignore-user=backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select all and delete (actually move to buffer) | |
:%d | |
Select all and copy to buffer | |
:%y | |
Use p to paste the buffer. |
function processExists($processName) {
$exists= false;
exec("ps -aux | grep -i $processName | grep -v grep | grep -v /bin/sh", $pids);
if (count($pids) > 1) {
$exists = true;
}
return $exists;
}
NewerOlder