This file contains hidden or 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
### Unicorn ### | |
check process unicorn | |
with pidfile "/home/deployer/qna/current/tmp/pids/unicorn.pid" | |
start program = "/bin/su - deployer -c 'cd /home/deployer/qna/current && ( RAILS_ENV=production ~/.rvm/bin/rvm default do bundle exec unicorn -c /home/deployer/qna/current/config/unicorn/production.rb -E deployment -D )'" | |
stop program = "/bin/su - deployer -c 'cd /home/deployer/qna/current && /usr/bin/env kill -s QUIT `cat /home/deployer/qna/current/tmp/pids/unicorn.pid`'" | |
if memory usage > 90% for 3 cycles then restart | |
if cpu > 90% for 2 cycles then restart | |
if 5 restarts within 5 cycles then timeout | |
### Puma ### |
This file contains hidden or 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
class S3Uploader | |
def initialize() | |
@aws_access_key_id = APP_CONFIG.aws_access_key_id | |
@aws_secret_access_key = APP_CONFIG.aws_secret_access_key | |
@bucket = APP_CONFIG.s3_upload_bucket_name | |
@acl = "public-read" | |
@expiration = 10.hours.from_now | |
@s3_region = APP_CONFIG.s3_region | |
@current_dt = DateTime.now |
This file contains hidden or 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
# Ring the bell if any background window rang a bell | |
set -g bell-action any | |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -g default-terminal screen-256color | |
# Keep your finger on ctrl, or don't | |
bind-key ^D detach-client | |
# Create splits and vertical splits |
This file contains hidden or 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
cd ~/Library/Application\ Support/SynologyDrive/SynologyDrive.app/Contents/Resources/conf |