Skip to content

Instantly share code, notes, and snippets.

View jeroenbourgois's full-sized avatar
🐢

Jeroen Bourgois jeroenbourgois

🐢
View GitHub Profile
@jeroenbourgois
jeroenbourgois / install-nginx.sh
Created February 26, 2011 12:39
install nginx
brew install nginx
cd /usr/local/etc/nginx/
mkdir sites-available sites-enabled
@jeroenbourgois
jeroenbourgois / nginx-main-conf
Created February 26, 2011 18:20
nginx-main-conf
worker_processes 1;
# pid of nginx master process
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
@jeroenbourgois
jeroenbourgois / nginx-dev.local
Created February 26, 2011 18:23
nginx-site-conf
server {
listen 80;
server_name dropbox.local;
root /Users/Jeroen/Dropbox/development/online;
autoindex on;
location / {
index index.html index.php;
@jeroenbourgois
jeroenbourgois / nginx-apache-vhost.xml
Created February 26, 2011 18:28
nginx-apache-vhost
<VirtualHost *:8080>
ServerName dropbox.local
DocumentRoot "/Users/Jeroen/Dropbox/Private/development/online"
</VirtualHost>
@jeroenbourgois
jeroenbourgois / apache-restart
Created February 27, 2011 09:50
apache-restart
sudo apachectl restart
# 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 ]
@jeroenbourgois
jeroenbourgois / gist:912688
Created April 10, 2011 20:13
Mongoose group by
Model.find({}, [], {'group': 'FIELD'}, function(err, logs) {
// code
});
@jeroenbourgois
jeroenbourgois / gist:1847748
Created February 16, 2012 20:51
hook for stdout
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)