This file contains 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
#요기 /etc/httpd/conf/httpd.conf | |
LoadModule wsgi_module /usr/lib64/httpd/modules/mod_wsgi-py34.cpython-34m.so | |
WSGIPythonPath /opt/projectname:/opt/venv/lib/python3.4/site-packages | |
<VirtualHost *:80> | |
ServerName www.yourserver.com | |
DocumentRoot /opt/projectname |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
# 현재 가장 잘 동작하는 버전인듯 | |
# postgres는 설치했다고 가정하자. | |
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
# 환경변수에 LC_COLLATE=C 이거 있는지 확인 | |
This file contains 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 rds-command-line-tools | |
rds-create-db-parameter-group mysql-utf-param --db-parameter-group-family mysql5.5 --description "MySQL 5.5 configured for UTF-8" --region us-west-1 | |
rds-modify-db-parameter-group mysql-utf-param \ | |
--parameters="name=character_set_server, value=utf8, method=immediate" \ | |
--parameters="name=character_set_client, value=utf8, method=immediate" \ | |
--parameters="name=character_set_results,value=utf8,method=immediate" \ | |
--parameters="name=collation_server, value=utf8_general_ci, method=immediate" \ |
This file contains 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
express.post('/api/create-post-head', auth.filter.login(), function (req, res, next) { | |
prepareRoleAndForm(req, function (role, form) { | |
checkCategoryWritable(res, role, form.categoryId, function (category) { | |
checkFormThreadAndPost(res, form, function () { | |
insertThread(form, function (err, thread) { | |
if (err) return next(err); | |
insertPost(req, form, thread, function (err, post) { | |
if (err) return next(err); | |
res.json(200, {threadId: thread._id, postId: post._id}); | |
}); |