Skip to content

Instantly share code, notes, and snippets.

View jeroenbourgois's full-sized avatar
🐢

Jeroen Bourgois jeroenbourgois

🐢
View GitHub Profile
// bad
function foo()
{
alert('Bar');
}
// good
function foo() {
alert('Bar');
}
@jeroenbourgois
jeroenbourgois / postgres-setup.sh
Created August 29, 2012 21:03
postgres setup on the linode
sudo su postgres
psql
postgres=# create role askbot with createdb login encrypted password 'askbot';
# --> CREATE ROLE
postgres=# create database askbot with owner=askbot;
@jeroenbourgois
jeroenbourgois / vhost-proximinade-travisci.txt
Created July 31, 2012 08:04
Apache virtualhost for Travis CI
<VirtualHost *:3000>
ServerAdmin webmaster@localhost
DocumentRoot PATH
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory PATH >
Options Indexes FollowSymLinks MultiViews
@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)
@jeroenbourgois
jeroenbourgois / gist:912688
Created April 10, 2011 20:13
Mongoose group by
Model.find({}, [], {'group': 'FIELD'}, function(err, logs) {
// code
});
# 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 / apache-restart
Created February 27, 2011 09:50
apache-restart
sudo apachectl restart
@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 / 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;