(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deployAnd Update the new password
| server { | |
| listen 80; | |
| listen [::]:80; | |
| listen 443 ssl http2; | |
| listen [::]:443 ssl http2; | |
| ssl_certificate /usr/local/etc/nginx/ssl/nginx-selfsigned.crt; | |
| ssl_certificate_key /usr/local/etc/nginx/ssl/nginx-selfsigned.key; | |
| index index.php index.html; |
| export abstract class Form { | |
| protected abstract finishSubmit(); | |
| protected abstract form(); | |
| protected abstract createForm(); | |
| } |
| download the key pair (key.pem) from aws | |
| change its mode | |
| $ chmod 400 key.pem | |
| add it to ssh permanently to ssh store using *ssh-add* command | |
| $ ssh-add key.pem | |
| access the machine with ssh. | |
| $ ssh [email protected] |
| worker_processes 1; | |
| error_log logs/rtmp_error.log debug; | |
| pid logs/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { |
| { | |
| "env":{ | |
| "browser": true, | |
| "node": true | |
| }, | |
| "globals":{ | |
| "jQuery":true, | |
| "moment":true, | |
| "appServices":true, |
| var startAt = '2016-08-09'; | |
| var id = 1; | |
| Model.find({ | |
| where: { | |
| $and: [ | |
| { | |
| id: id | |
| }, | |
| sequelize.where( |
| XVFB=/usr/bin/Xvfb | |
| XVFBARGS=":99 -screen 0 1024x768x24 -fbdir /var/run -ac" | |
| PIDFILE=/var/run/xvfb.pid | |
| case "$1" in | |
| start) | |
| echo -n "Starting virtual X frame buffer: Xvfb" | |
| start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS | |
| echo "." | |
| ;; | |
| stop) |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deployAnd Update the new password
| #ifdef ENABLE_DEBUG | |
| #define DebugLog(format, args...) \ | |
| NSLog(@"%s, line %d: " format "\n", \ | |
| __func__, __LINE__, ## args); | |
| #else | |
| #define DebugLog(format, args...) do {} while(0) | |
| #endif | |
| // sample use | |
| DebugLog("number: %d ; class %p", count, className); |