In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| var db = mongoose.connect('mongodb://localhost:27017/DB'); | |
| // In middleware | |
| app.use(function (req, res, next) { | |
| // action after response | |
| var afterResponse = function() { | |
| logger.info({req: req}, "End request"); | |
| // any other clean ups |
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| kingkong:/tmp/gypfilecheck$ time couchtato iterate -u http://host/registry -p 5000 | |
| retrieved 5000 docs - 0 | |
| >> LDAP 1.1.4 has gypfile: true | |
| >> airtunes 0.1.3 has gypfile: true | |
| >> aligned-buffer 0.1.2 has gypfile: true | |
| >> allsync 0.0.3b has gypfile: true | |
| >> ancillary 2.0.0 has gypfile: true | |
| >> aplus 0.1.0 has gypfile: true | |
| >> base128 0.1.0 has gypfile: true | |
| >> bcrypt 0.7.5 has gypfile: true |
This gist assumes:
www-data (may be apache on other systems)| for i in `ls *.svg` | |
| rsvg-convert -f pdf -o PDF/${i}.pdf $i |