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
# YOLO | |
sudo su | |
# Install postfix (use Internet Site configuration) | |
apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules | |
# Setup allowed SSL certs | |
cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | tee -a /etc/postfix/cacert.pem | |
# Add to /etc/postfix/main.cf |
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
upstream application { | |
server unix:/home/deploy/apps/APPNAME/shared/tmp/sockets/puma.sock fail_timeout=0; | |
} | |
# Optional redirect | |
#server { | |
# listen 80; | |
# server_name www.DOMAIN default; | |
# return 301 $scheme://DOMAIN$request_uri; | |
#} |
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
sudo apt-get install postgresql-9.3 postgresql-contrib | |
sudo -u postgres psql | |
create role USERNAME with password 'PASSWORD'; | |
alter role USERNAME login; | |
create database DBNAME; |
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
chain: function() { | |
collection.fetch() | |
whenFetched(collection,function() { | |
... | |
another_collection.fetch() | |
whenFetched(another_collection,function() { | |
... | |
}); | |
); | |
}, |
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
@DanielApp.module "Entities", (Entities, App, Backbone, Marionette, $, _) -> | |
App.commands.setHandler "when:fetched", (entities, callback) -> | |
xhrs = _.chain([entities]).flatten().pluck("_fetch").value() | |
$.when(xhrs...).done -> | |
callback() |
NewerOlder