Best Practice
Best-practice config/cook-book/stack for popular opensource tools.
There are lots of efficient tools in my daily work. Collect the necessary config here.
Content
MongoDB
- Schema checking: variety
- Web UI: mongo-express
Nginx
The config file usually is put under /etc/nginx/conf.d/
.
See default.
Node.js
Framework
For web server, use express. For REST API server, use restify.
CSS
HTML
REST
REST style API design and ref framework: Swagger.
Useful REST framework:
- eve in python.
Security
Default Iptables rules with limit port open and access ratio.
$ iptables-restore < security/iptables.rules
sysctl
Optimized sysctl.conf for high-performance server.
Put sysctl.conf under /etc/sysctl/, and load it by
$ sysctl -p
vnc4server
Config file
The config file is ${HOME}/.vnc/xstartup.
Start some server
Let it listen on 1.
vncserver :1
Kill some server
Kill the server listening on 1.
$ vncserver -kill :1
Set password
$ vncpasswd
Contribution
fork
this project to your repo, likeuser/best-practice
, then clone to local.
$ git clone [email protected]:user/best-practice.git
$ cd best-practice
$ git config user.name "User"
$ git config user.email [email protected]
- Make some changes, commit and push to your Github repo.
$ #do some change on the content
$ git commit -am "Fix issue #1: change helo to hello"
$ git push
- Open GitHub and make a pull request.
- Remember to sync your repo often with my latest version.
$ git remote add upstream https://github.com/yeasy/best-practice
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master
$ git push -f origin master