This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
#include "v8.h" | |
#include "helpers.h" | |
#include <iostream> | |
using v8::Local; | |
using v8::String; | |
using v8::Array; | |
void PrintLocalString(v8::Local<v8::String> key){ |
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 |
const fastify = require('fastify')(); | |
fastify.get('/', (request, reply) => reply.send({ hello: 'world' })); | |
if (require.main === module) { | |
// called directly i.e. "node app" | |
fastify.listen(3000, (err) => { | |
if (err) console.error(err); | |
console.log(`server listening on ${fastify.server.address().port}`); | |
}); |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
echo '[Unit] | |
Description=High-performance, schema-free document-oriented database | |
After=syslog.target network.target | |
[Service] | |
User=mongodb | |
Group=mongodb | |
ExecStart=/usr/bin/mongod -f /etc/mongod.conf | |
[Install] |