Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/bin/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
check process resque-worker-production | |
with pidfile /home/webmaster/production/shared/pids/resque_worker.pid | |
start program = "/usr/bin/env HOME=/home/webmaster PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH /bin/sh -l -c 'cd /home/webmaster/production/current; nohup bundle exec rake environment resque:work RAILS_ENV=production PIDFILE=/home/webmaster/production/shared/pids/resque_worker.pid >> log/resque_worker.log 2>&1'" as uid webmaster and gid webmaster | |
stop program = "/bin/sh -c 'cd /home/webmaster/production/current && kill $(cat /home/webmaster/production/shared/pids/resque_worker.pid) && rm -f /home/webmaster/production/shared/pids/resque_worker.pid; exit 0;'" | |
if totalmem is greater than 300 MB for 10 cycles then | |
exec "/bin/kill -9 $(cat /home/webmaster/production/shared/pids/resque_worker.pid) && rm -f /home/webmaster/production/shared/pids/resque_worker.pid" | |
if 5 restarts within 5 cycles then timeout | |
group resque_workers | |
check process resque-worker-staging |
#!/bin/sh | |
# @source: https://gist.github.com/ronanguilloux/11f6a788358577474ab4 | |
# @link http://tech.zumba.com/2014/04/14/control-code-quality/ | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed |
==> default: Waiting for machine to boot. This may take a few minutes... | |
default: SSH address: 127.0.0.1:2202 | |
default: SSH username: vagrant | |
default: SSH auth method: private key | |
default: Warning: Connection timeout. Retrying... | |
default: Warning: Remote connection disconnect. Retrying... | |
default: Warning: Authentication failure. Retrying... | |
default: Warning: Authentication failure. Retrying... | |
default: Warning: Authentication failure. Retrying... |