I hereby claim:
- I am sharshenov on github.
- I am sharshenov (https://keybase.io/sharshenov) on keybase.
- I have a public key whose fingerprint is ED36 8D30 17B6 39F8 B58E 1E7D EDF0 0A21 B208 D134
To claim this, I am signing this object:
@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() |
chain: function() { | |
collection.fetch() | |
whenFetched(collection,function() { | |
... | |
another_collection.fetch() | |
whenFetched(another_collection,function() { | |
... | |
}); | |
); | |
}, |
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; |
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; | |
#} |
# 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 |
# save as /etc/logrotate.d/APPNAME | |
/home/deploy/apps/APPNAME/shared/log/*.log { | |
su deploy deploy | |
daily | |
missingok | |
rotate 30 | |
compress | |
delaycompress | |
notifempty | |
copytruncate |
#Original article: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04 | |
dd if=/dev/zero of=/swapfile bs=1M count=1k | |
mkswap /swapfile | |
swapon /swapfile | |
echo '/swapfile none swap sw 0 0 ' >> /etc/fstab | |
echo 1 | tee /proc/sys/vm/swappiness | |
echo vm.swappiness = 1 | tee -a /etc/sysctl.conf | |
chown root:root /swapfile | |
chmod 0600 /swapfile |
I hereby claim:
To claim this, I am signing this object:
# open console as postgres user | |
sudo -u postgres psql | |
# paste this | |
update pg_database set datistemplate = FALSE where datname = 'template1'; | |
drop database template1; | |
create database template1 with owner=postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; | |
update pg_database set datistemplate = TRUE where datname = 'template1'; |
1. Select Preferences / Key Bindings(user) | |
2. Paste this: | |
```json | |
[ | |
{ "keys": ["ctrl+w"], "command": "close_file" }, | |
] | |
``` |