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
| brew install nginx |
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 /usr/local/etc/nginx/ | |
| mkdir sites-available sites-enabled |
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
| worker_processes 1; | |
| # pid of nginx master process | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { |
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
| server { | |
| listen 80; | |
| server_name dropbox.local; | |
| root /Users/Jeroen/Dropbox/development/online; | |
| autoindex on; | |
| location / { | |
| index index.html index.php; |
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
| ln -s /usr/local/etc/nginx/sites-available/dev.local /usr/local/etc/nginx/sites-enabled/dev.local |
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
| <VirtualHost *:8080> | |
| ServerName dropbox.local | |
| DocumentRoot "/Users/Jeroen/Dropbox/Private/development/online" | |
| </VirtualHost> |
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 apachectl restart |
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
| # If you already installed CommandT, remove it first and | |
| # download a fresh copy you can build again | |
| # check your current ruby version, if it is 1.8.7, you should be safe | |
| # for me it wasn't :) | |
| $ rvm list | |
| # Output: | |
| # ruby-1.8.6-p420 [ x86_64 ] | |
| # => ruby-1.9.1-p376 [ x86_64 ] |
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
| Model.find({}, [], {'group': 'FIELD'}, function(err, logs) { | |
| // code | |
| }); |
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
| hook_stdout: (callback) -> | |
| old_write = process.stdout.write | |
| process.stdout.write = ((write) -> | |
| return (string, encoding, fd) -> | |
| write.apply(process.stdout, arguments) | |
| winston.log('info', string) | |
| callback(string, encoding, fd) | |
| )(process.stdout.write) |