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
// bad | |
function foo() | |
{ | |
alert('Bar'); | |
} | |
// good | |
function foo() { | |
alert('Bar'); | |
} |
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 su postgres | |
psql | |
postgres=# create role askbot with createdb login encrypted password 'askbot'; | |
# --> CREATE ROLE | |
postgres=# create database askbot with owner=askbot; |
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 *:3000> | |
ServerAdmin webmaster@localhost | |
DocumentRoot PATH | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All | |
</Directory> | |
<Directory PATH > | |
Options Indexes FollowSymLinks MultiViews |
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) |
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
# 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
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
<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
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
server { | |
listen 80; | |
server_name dropbox.local; | |
root /Users/Jeroen/Dropbox/development/online; | |
autoindex on; | |
location / { | |
index index.html index.php; |