The trick is to only register the listener for events that indicate failure, namely
- PROCESS_STATE_STOPPED
- PROCESS_STATE_EXITED
- PROCESS_STATE_FATAL
Once they do, we should send a SIGQUIT to Supervisor.
| # Libraries and infrastructure | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| docker.io docker-buildx \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ | |
| libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
| libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
| redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
| rbenv apache2-utils |
| <?php | |
| use PhpCsFixer\Config; | |
| use PhpCsFixer\Finder; | |
| $rules = [ | |
| 'phpdoc_indent' => true, | |
| 'binary_operator_spaces' => [ | |
| 'operators' => ['=>' => null] | |
| ], |
| require 'rubygems' | |
| require 'railsless-deploy' | |
| load 'config/deploy' |
| # | |
| # After running cap deploy:cold, You'll need to remove all files from the | |
| # domains/yourdomain.com/html directory and turn the html directory into a | |
| # symlink that links to ./current which is also a symlink setup by capistrano. | |
| # | |
| # install the mt-capistrano gem, not sure if it is really needed in most situations | |
| require 'mt-capistrano' | |
| # Configure these |
A list of amazingly awesome PHP libraries, resources and shiny things.
| @mixin ie6 { * html & { @content } } | |
| #logo { | |
| background-image: url("/images/logo.png"); | |
| @include ie6 { background-image: url("/images/logo.gif"); } | |
| } |
| alias mongo.start="mongod run --config `brew --prefix mongodb`/mongod.conf" | |
| alias apache.start="sudo /usr/sbin/apachectl start" | |
| alias apache.stop="sudo /usr/sbin/apachectl stop" | |
| # alias cake="${dev}/framework/cake/console/cake" | |
| alias cakephp="${dev}/framework/cake/console/cake" | |
| alias run.elasticsearch='elasticsearch -f -D es.config=/usr/local/Cellar/elasticsearch/0.18.5/config/elasticsearch.yml' |
| function isRetina(){ | |
| return (('devicePixelRatio' in window && devicePixelRatio > 1) || | |
| ('matchMedia' in window && matchMedia("(-moz-device-pixel-ratio:1.0)").matches)) | |
| } |
| WHITE="\[\033[00m\]" | |
| BLACK="\[\033[01;30m\]" | |
| RED="\[\033[0;31m\]" | |
| LIGHT_RED="\[\033[1;31m\]" | |
| GREEN="\[\033[0;32m\]" | |
| LIGHT_GREEN="\[\033[1;32m\]" | |
| YELLOW="\[\033[0;33m\]" | |
| BLUE="\[\033[0;34m\]" | |
| PURPLE="\[\033[0;35m\]" | |
| CYAN="\[\033[0;36m\]" |